Commit Graph
11554 Commits
Author SHA1 Message Date
Anthony Tafoya 13f580ef09 Deduplicate cloud and executor skill listings before budgeting (#49127)
## Why

Skills available from both cloud and executor providers consume duplicate catalog space, leaving less room for descriptions of unique skills.

## What changed

- Prefer model-visible cloud skills over executor listings with the same `plugin:skill` name before allocating the metadata budget.
- Preserve aliases from the full visible executor inventory so filtering duplicates does not renumber remaining packages. Continue choosing full locators when they fit the budget better.
- Keep executor packages available through `skills.list` and `skills.read`, and retain executor listings when cloud skills are disabled.

## Testing

Add regression tests and a model-request snapshot covering description retention, stable aliases across turns, executor availability changes, package reads, and full-locator selection after deduplication.

GitOrigin-RevId: 477e4cf16b8968dbe61438dd5af1eca9cbfa78c8
2026-09-29 01:57:57 +00:00
Won Park 8bd5a136ff Add recovery guidance to content-filter retries (#49119)
## Why

Responses stopped by `content_filter` previously followed generic stream-error retry handling without guidance about the block. Retried requests need instructions to explain the limitation and offer a permitted alternative.

## What changed

- Recognize content-filter failures as a distinct error while preserving retryability and the existing public error representation.
- Append developer guidance to the conversation after each sampling block, retaining delivered output and using the existing retry handling.
- Support a model catalog override through `model_messages.content_filter_guidance`. Missing, null, blank, or values exceeding 512 UTF-8 bytes fall back to bundled guidance.
- The bundled guidance tells the model to avoid reproducing or working around blocked content, briefly explain the limitation, offer a permitted alternative, and continue unrelated authorized work.

## Testing

Add a scenario and request-history snapshot covering repeated blocks, catalog guidance on each retry, retained partial output, and eventual completion. Add error-mapping assertions for retryability, public error classification, and error text.

GitOrigin-RevId: ba0c201b3a5a3acf5cfa971332027240e0690225
2026-09-29 01:14:41 +00:00
Celia Chen 6c49240565 Correct provider authentication storage documentation (#49118)
Clarify in the `requires_openai_auth` field documentation and configuration schema that credentials use the backend selected by `cli_auth_credentials_store`, rather than always being stored in `auth.json`. Also clarify that `env_key` specifies the environment variable containing the API key.

GitOrigin-RevId: e65753a72258e43b24c4e40b51ff26830c5b3756
2026-09-29 01:01:34 +00:00
papayo-oai 2e6cc4ed8d Attribute analytics requests to each thread's product SKU (#49117)
## Why

Sessions can share an analytics client while using different product SKUs. Analytics requests need per-thread attribution to reflect each session's configuration.

## What changed

- Register each thread's `apps_mcp_product_sku` and send `X-OpenAI-Product-Sku` on analytics requests grouped by product, without changing authentication.
- Send product groups concurrently while preserving event order within each group.
- Flush buffered tool events before changing or evicting their product attribution, and clear attribution when a session disables analytics.
- Bound retained thread registrations and concurrent product groups. Drop attribution when registration cannot be queued or a batch exceeds the product-group limit.

## Testing

Add tests for shared-session attribution, clearing attribution on resume with analytics disabled, buffered events across product changes, queue overflow recovery, registry limits, and concurrent delivery with preserved event order.

GitOrigin-RevId: 25a98788cd44d4a85f97ee87aadf3a6909607f6a
2026-09-29 00:49:23 +00:00
oli-oai 69043f05c4 Point remote compaction tests at the mock ChatGPT server (#49114)
Set `chatgpt_base_url` to the supplied mock server URI in
`make_remote_compaction_session`.

GitOrigin-RevId: de5c6e208fd104cbe07a8873e7e33c108dac7a57
2026-09-29 00:43:03 +00:00
Felipe Coury 0196495288 Add X11 primary selection and middle-click paste support (#49112)
## What changed

- Publish released mouse selections from both transcript views to X11 `PRIMARY` as plain text, even when copy-on-select is disabled. Preserve configured `CLIPBOARD` copying when it is enabled.
- Paste `PRIMARY` into the editable fullscreen composer on middle-click, including while a transcript selection remains active.
- Limit support to local Linux X11 sessions, excluding Wayland, SSH, tmux, WSL, and VS Code terminals.
- Retain the latest deferred selection publication and order it before a pending `PRIMARY` read, while giving explicit copies priority. Cancel stale deferred work when its selection or paste target is invalidated.
- Clarify that scrollback mode uses native terminal copy, paste, and scrollback.

## Testing

Add regression tests for selection publication with copy-on-select enabled and disabled, publication-before-read ordering, explicit-copy priority, cancellation of deferred work, and middle-click paste invalidation.

GitOrigin-RevId: 6ba7bddffda60183b7f9ad5cd69a97da8a4a8dcd
2026-09-29 00:40:54 +00:00
Benjamin Carlsson 8f6517772b Add history pagination to the agent command center (#49106)
## Why

The command center seeded only ten recent sessions, with no way to browse older history from the task list.

## What changed

- Add a keyboard-selectable “Show more” row that discovers up to ten more tasks, with loading and retry states that remain accessible during search.
- Retain per-source cursors and buffered rows across requests, merging interactive and non-interactive history by recency without discarding existing tasks on failure.
- Refill vacancies after tasks are archived or deleted, and prevent stale refreshes from restoring removed tasks.
- Limit routine detail refreshes to recent and loaded tasks, plus explicitly targeted threads, as retained history grows.

## Testing

Add regression coverage for pagination across mixed sources, cursor retries without row loss, automatic refill, queued pagination, and “Show more” navigation, loading, search, and retry rendering.

GitOrigin-RevId: 0bfcc970c9adf0c8d509b275a92ecf01c29595ad
2026-09-29 00:18:20 +00:00
Eric Traut 136391a23e Resume unsent TUI input after reconnecting (#49105)
## Why

Reconnecting paused all recovered input, including queued messages that had never been sent. Those messages can resume automatically once any uncertain submissions are resolved.

## What changed

- Track unsent and unconfirmed messages separately. Reconcile submitted prompts and steers using exact client message IDs from restored history, buffered events, and later receipts.
- Remove confirmed submissions from the recovered queue and resume unsent input after replay. Keep uncertain submissions paused without resending them, and show a notice identifying the message whose delivery could not be confirmed.
- Preserve pauses for unavailable conversations, pending compact/review requests, and existing input recovery failures.
- Simplify reconnect status text and remove blanket disconnect/reconnect transcript notices.

## Testing

Update reconnect integration tests and snapshots for automatic queue resumption. Add coverage for matching and unrelated receipts, missing history, late confirmations across navigation, pending compaction, and preservation of image-failure recovery pauses.

GitOrigin-RevId: d0b9aa43c4019d472985d12bbce8ba9bbfb9253b
2026-09-29 00:17:56 +00:00
jgershen-oai 7e049b3eaa Balance Windows Bazel test shards using duration estimates (#49103)
## Why

Hash-based sharding does not account for differences in test duration. Use estimated test time to balance the Windows Bazel workload across shards.

## What changed

- Add checked-in duration weights and a deterministic selector that assigns the longest targets first to the least-loaded shard.
- Assign every queried target exactly once, default missing weights to one second, and ignore stale weights.
- Run queries and selection in the foreground so failures stop the job before tests run with a partial target list.
- Emit LF-delimited target labels for Git Bash and report estimated shard loads on stderr.

## Testing

Add seven passing selector tests covering deterministic coverage and balancing, missing and stale weights, invalid inputs, duration-file overrides, and CLI output. Run them on the first Windows CI shard.

GitOrigin-RevId: d415ae093bfe57794ee53a2eb9d712022202dad8
2026-09-28 23:52:19 +00:00
Benjamin Carlsson c2d2f422e6 Preserve SQLite vacuum modes and surface pool initialization errors (#49102)
## Why

Changing an existing database from `FULL` to `INCREMENTAL` auto-vacuum requires a writer lock and can block pool initialization. SQLx also retries connection initialization failures, masking the original error as `PoolTimedOut`.

## What changed

Preserve existing auto-vacuum modes when opening writable pools, while continuing to initialize empty databases with incremental auto-vacuum. Return the first connection initialization error directly to the caller, retaining SQLx's normal error handling for later lazy connections.

## Testing

Add regression tests for fresh database settings, opening an existing `FULL` auto-vacuum database under a write lock, and preserving the WAL conversion lock error while allowing a subsequent open to succeed after the lock is released.

GitOrigin-RevId: b586c68e43a5a0d3b47268378716919d01b749cf
2026-09-28 23:44:39 +00:00
Dmitriy Kovalenko bfdb157178 Reuse the HTTP connection pool for remote plugin requests (#49100)
## Why

Each call to `PluginsConfigInput::remote_plugin_service_config` created a new HTTP client pool, preventing connection reuse across service configurations.

## What changed

Share one lazily initialized, route-aware pool across a `PluginsConfigInput` and its clones. Newly constructed inputs retain separate pools, while service configurations continue to use the current endpoint and product SKU and requests use the supplied authentication.

## Testing

Add tests for lazy initialization, pool sharing across repeated calls and early clones, isolation between new inputs, and requests using updated endpoints, product SKUs, and authentication with the shared pool.

GitOrigin-RevId: 3e929c34052798779a4f153e4db03b3f75b6f87d
2026-09-28 23:33:10 +00:00
Dmitriy Kovalenko 1260716393 Cache parsed plugin manifests across plugin workflows (#49099)
## Why

Repeated plugin discovery and loading reparse unchanged manifests and repeat warnings for invalid fields.

## What changed

- Share a manifest cache through `PluginStore` across marketplace listing, plugin loading, capability inspection, and tool suggestion metadata.
- Reuse successful parses by plugin root, manifest path, and content digests, including the Codex overlay. Reread files on each load so manifest edits and overlay changes or removal remain visible.
- Bound the cache to 128 entries and bypass caching for inputs larger than 64 KiB. Retry failed parses and share entries across store clones while keeping independent stores isolated.
- Reuse loaded manifest data when loading apps and MCP metadata.

## Testing

Add unit coverage for parse reuse, warning deduplication, revision invalidation, repair after parse failures, equivalent Windows paths, store isolation, and oversized inputs. Add an app-server regression test that verifies repeated `plugin/list` requests observe manifest and overlay revisions in one running server.

GitOrigin-RevId: ed082cd7d198015cd8ed35db7f2af74e13f49915
2026-09-28 23:32:45 +00:00
zm-oai f5430515a8 Resolve Windows sandbox PowerShell fallbacks on the exec server (#49098)
## Why

Remote controllers cannot resolve a sandbox-compatible PowerShell executable on the execution host.

## What changed

Apply the existing PowerShell fallback during exec-server request preparation for the `Elevated` and `Mxc` Windows sandbox backends. Match `pwsh` and `powershell` executable names case-insensitively and replace inaccessible Store PowerShell paths when a compatible executable is available.

## Testing

Add Windows RPC regression tests for lowercase and mixed-case PowerShell aliases with a restricted server `PATH`, verifying successful command execution in the `Mxc` sandbox.

GitOrigin-RevId: 365541af2f026a662b1988429f5d182c98e4a236
2026-09-28 23:21:26 +00:00
xli-oai 9563713df2 Notify lifecycle extensions of compaction usage limits (#49097)
## Why

Usage-limit failures during manual or post-turn compaction did not notify turn lifecycle extensions, leaving them unable to react to these errors.

## What changed

Emit the turn error lifecycle notification for `UsageLimitExceeded` in both compaction paths. Preserve the completed answer after post-turn compaction fails, and avoid duplicating the error already emitted by manual compaction.

GitOrigin-RevId: f31155e5991d762a0779030921aedbd1f818cfbb
2026-09-28 23:00:28 +00:00
cassirer-openai 2ce64843be Update h2 from 0.4.16 to 0.4.19 in Cargo and Bazel lockfiles (#49096)
GitOrigin-RevId: d38aedc1363465faf4aa5d8c61d10f4d32c8e1bf
2026-09-28 22:55:43 +00:00
Eric Traut 19892aee0c Simplify startup promotions to platform-specific desktop app tips (#49093)
## What changed

- Replace plan-specific and Fast-mode promotions with the desktop app tip for the current platform, while preserving announcement priority and random-tip fallback.
- Share desktop app tips between the preferred slot and random tip pool, including Windows. Keep Linux app tips limited to graphical sessions outside WSL.
- Clarify installation and launch instructions for macOS, Windows, and Linux, and format launcher commands as code.
- Remove the Fast-mode status plumbing used by tooltip selection.

## Testing

Add snapshots for all three platform tips at a narrow terminal width. Update tests to cover plan-independent tip selection and platform availability.

GitOrigin-RevId: 34bbc95c47c83618f9ac1691a1b69ca4690b8665
2026-09-28 22:40:35 +00:00
Eric Traut 222e24b737 Render follow-up directive labels in the TUI and copied responses (#49089)
## Why

Follow-up directives contain display labels and prompt attributes. Show the labels without exposing directive syntax or prompt text in rendered responses and streaming previews.

## What changed

- Render `:codex-followup[label]{prompt="..."}` as its label, preserving inline Markdown styling and source offsets.
- Replace recognized follow-up directives with their labels when copying whole responses, while retaining the original source.
- Withhold unfinished directives in rich streaming previews and avoid cropping into prompt attributes when the preview window advances.
- Preserve literal code, escaped directives, and malformed source when rendering completed messages or copying responses.

## Testing

Add regression coverage for label formatting, nested brackets and backticks, literal and malformed directives, whole-response copying, and streaming holdback across long prompts and preview window boundaries.

GitOrigin-RevId: dce61d1164de0a576fe95fb2c67b177a1ed414e8
2026-09-28 22:20:29 +00:00
Tamir Duberstein 88e9a8329d Track app-server running turns incrementally (#49084)
## Why

Every thread state mutation scanned all tracked runtimes to recount running turns while holding the state lock. This count supports graceful restart draining introduced in https://github.com/openai/codex/pull/12517.

## What changed

Maintain `running_turn_count` in `ThreadWatchState`, adjusting it when a runtime's `running` flag changes or a running thread is removed. Publish the cached count while preserving notifications only when the count changes.

## Testing

Extend the running-turn watch test to cover duplicate starts, two simultaneous running threads, and removal of a running thread, with counts checked against the runtime map.

GitOrigin-RevId: e7d7ebb33b9ff4d24dc70d8f01ae981378fed5f8
2026-09-28 21:33:00 +00:00
jif 46d2585ea4 Skip remote Git discovery for Guardian diff paths (#49082)
## Why

An offline secondary executor can stall Guardian approval revalidation while diff display setup searches for Git roots, even when the review concerns another executor.

## What changed

Use each environment's working directory as the diff display root for Guardian sessions, regardless of `CwdRelativeTurnDiffs`, so this setup does not wait for remote Git discovery.

## Testing

Add a regression test that withdraws authorization during a pending approval and disconnects an unrelated secondary executor. Verify that Guardian retries with the updated authorization and denies the request.

GitOrigin-RevId: 3661759119935c68539e9eab8df2e862987d0d92
2026-09-28 21:18:17 +00:00
Eric Traut fe50d010e2 Update and centralize TUI subscription labels (#49079)
## What changed

Use a shared subscription label mapping for status and analytics views. Rename
`Pro Extra` to `Pro 200`, `Pro Standard` to `Pro 100`, and `Pro Max` to `Pro 500`,
while preserving the existing differences between status and analytics labels
for other plans.

## Testing

Update the status plan-label test expectations for the three Pro tiers.

GitOrigin-RevId: 47af1e7d56ef9f7701caff8af315f530087920b8
2026-09-28 20:59:25 +00:00
Tamir Duberstein 011f803f3c Avoid collecting unused Git metadata in skill analytics (#49076)
## Why

Skill invocation analytics only needs the repository's origin URL, but
`collect_git_info` also checks the repository and reads its commit and branch.

## What changed

Extract and export `get_git_origin_url` and use it directly in skill analytics
to skip the extra Git commands. Reuse the helper in `collect_git_info`,
preserving URL sanitization and command timeouts.

GitOrigin-RevId: f878936937d0ff8c6313bb8168448e0b25ba1a39
2026-09-28 20:45:16 +00:00
sayan-oai 3749d1eff7 Preserve pending environments when spawning subagents (#49075)
## Why

Spawning a subagent before an environment was ready dropped the starting environment from the child's selections. The child needs to retain that environment and receive its configuration or failure when preparation finishes.

## What changed

- Pass the spawning step's environment snapshot to children, preserving ready and starting environments and configuration ownership.
- Propagate the original owner's first configuration result through descendants, applying each session's validation and leaving independently configured children unchanged.
- Preserve pending configuration waits across executor retries. Later owner updates do not overwrite the child's inherited configuration.

## Testing

Add regression coverage for fresh and forked subagents, readiness through turn-settings updates, failure propagation to children and grandchildren, child configuration precedence, and executor retries. Add a request snapshot showing a child using `wait_for_environment` before execution tools become available.

GitOrigin-RevId: a2afed740391f88d195596cfe28e418332b60d43
2026-09-28 20:42:04 +00:00
Tamir Duberstein 22d1d9336f Propagate Cargo package versions to Bazel Rust targets (#49074)
## What changed

Expose resolved Cargo package versions in `rules_rs` workspace `DEP_DATA` and pass them through `codex_rust_crate` to build scripts, libraries, binaries, and tests. This replaces the hardcoded `0.0.0` build-script version and supplies explicit versions to the other Rust targets.

GitOrigin-RevId: a3555beec3c5ecfc38d69c352b43696986352c49
2026-09-28 20:34:59 +00:00
Eric Traut 15c08beee2 Surface realtime voice catalog failures in the TUI (#49073)
## Why

Failed `thread/realtime/listVoices` requests silently fell back to the built-in catalog, allowing voice selection and conversation startup to proceed without the server's voice catalog.

## What changed

- Propagate catalog errors and show an error instead of opening the voice picker or starting a realtime conversation.
- If the catalog lookup fails after saving a preference, report that the preference was saved but the effective voice could not be confirmed. Leave the in-memory voice settings unchanged.

## Testing

Extend remote voice tests and snapshots to cover catalog failures when opening the picker, saving a preference, and starting a conversation. Verify that the preference is persisted, in-memory settings stay unchanged, and failed startup clears realtime state without sending `thread/realtime/start`.

GitOrigin-RevId: ba40800d6f9002e02e2b33de8dc858188c3cddd7
2026-09-28 20:34:33 +00:00
Dmitriy Kovalenko 33a0f766a6 Reclaim unused SQLite log database pages in the background (#49069)
## Why

Deleting logs leaves free SQLite pages available for reuse without shrinking the database file. Reclaim excess free space while preserving a reserve for future writes.

## What changed

- Start a background incremental-vacuum worker with `StateRuntime`, enabling reclamation only for the logs database. Use a per-home file lock to select one worker and wait for it to finish during shutdown.
- Reclaim pages when at least 64 MiB and 25% of the database are free, preserving a reserve of at least 16 MiB or 10% of the database.
- Use short transactions with page and cooperative time budgets, defer work on contention, and reduce batch sizes with exponential backoff when interrupted passes make no progress.
- Record reclamation counts, durations, and reclaimed pages in telemetry.

## Testing

Add a regression test that interrupts a vacuum commit, verifies foreground writes can resume without data loss, then confirms a resumed pass shrinks the database and passes `PRAGMA integrity_check`.

GitOrigin-RevId: 8421f87b0aeef6540eda5690c84216906673c72e
2026-09-28 20:19:10 +00:00
zm-oai 5a5a4aa796 Keep configuration values out of Windows sandbox policy events (#49067)
## Why

Configuration parser errors can include entire configuration lines containing credentials. Persistent policy-rejection events must avoid recording those values.

## What changed

Replace free-form error text in Windows sandbox provisioning policy-rejection events with known stage labels and typed cloud, HTTP, I/O, and Win32 error codes. Use fixed fallback labels when the stage or cause is unrecognized.

## Testing

Add regression coverage using malformed requirements and cloud configuration fragments containing a synthetic secret. Verify that diagnostics exclude parser values while retaining safe error codes, and that unknown errors produce fixed fallback text.

GitOrigin-RevId: 4f2fa5f6f602c34451776ec31381a102213660b8
2026-09-28 19:56:33 +00:00
cassirer-openai a1f05faddb Update Guardian handoff snapshot for separate agent messages (#49065)
## What changed

Update the `guardian_handoff_delegation` snapshot to include three separate `agent_message` items interleaved with user transcript messages, with corresponding transcript numbering and message counts.

GitOrigin-RevId: cae688e00f96d9545eccd7891426cfb4948a6dbf
2026-09-28 19:48:54 +00:00
Dmitriy Kovalenko e07e58c842 Update Guardian messaging snapshots for native agent messages (#49060)
Refresh the Code Mode messaging snapshot to include a native `agent_message`
entry between transcript segments, with updated message and action numbering.
Adjust retained-instruction spacing in the encrypted parent reply snapshot and
refresh assertion-line metadata in both snapshots.

GitOrigin-RevId: 1ee003cfb9df89faabd2f35e9d656423f16e0501
2026-09-28 19:08:32 +00:00
Darius Karel df3e439c02 Fix Windows sandbox ACL repair for long runtime paths (#49058)
## Why

Runtime ACL repair needs to handle nested files and directories beyond the legacy Windows path limit.

## What changed

Use Rust's `OpenOptions` for ACL reads and handle-based `SetSecurityInfo` for updates to support extended-length paths. Request ACL-write access only when grants need updating, and share allocation cleanup across success and error paths.

## Testing

Add a regression test covering long directory and file paths alongside a short-path control. Verify repeated repairs grant read/execute access without granting write, delete, or ACL-management rights, and that already-correct grants remain no-ops.

GitOrigin-RevId: 325c17085fa4379eebe982d49175dd2151b0681e
2026-09-28 19:01:20 +00:00
jif 6288753b46 Add handoff-aware root context for Guardian reviews (#49057)
## What changed

Add the disabled-by-default `guardian_root_handoff_context` feature to select worker-specific root evidence for Guardian reviews. Use recorded `spawn_agent`, `send_message`, and `followup_task` calls targeting a worker or its ancestors to select the three preceding root messages per handoff, plus the three latest root messages so recent cancellations remain visible before another handoff.

Preserve verified tool answers and evidence without known ordering, and retain the existing shared message cap. Fall back to the existing root context when no usable handoff window remains or the latest authorization message is a heartbeat. Update the review context revision when the selection changes.

## Testing

Add a delegation scenario and Guardian request snapshot covering ancestor handoffs, separate worker branches, cancellation visibility, and fallback after compaction removes handoff calls. Extend heartbeat coverage to exercise the new feature and verify that the latest turn's trusted skills are retained.

GitOrigin-RevId: 87dc39158f78b2b7e9f4f2e4afc653257ea12025
2026-09-28 18:51:10 +00:00
Eric Traut 4f63088cce Update Pro plan display names in the TUI (#49043)
## What changed

Update plan labels in the analytics views and status display:

- `PlanType::Pro`: `Pro (More)` → `Pro Extra`
- `PlanType::ProLite`: `Pro` → `Pro Standard`
- `PlanType::ProMax`: `Pro (Max)` → `Pro Max`

## Testing

Update the status display-name test expectations for all three Pro tiers.

GitOrigin-RevId: 9bd9f1cd8a701019fd40047cd8131e6193f66cb9
2026-09-28 17:58:35 +00:00
Felipe Coury 3074be908a Copy selections within inline code as plain text (#49041)
## Why

Copying text selected entirely within inline code added Markdown backticks that were not part of the selected content.

## What changed

Return only the selected content as plain text when the selection is contained within one inline code span, including in a single table cell. Preserve Markdown formatting for selections that also include surrounding content, and continue filtering control characters from table copies.

## Testing

Add regression coverage for full and partial inline code selections, embedded backticks, Unicode, whitespace, wrapping and resizing, and table selections with mixed content or control characters.

GitOrigin-RevId: c63e13cb781f9fca28ae53500cb4f9ae08b72c96
2026-09-28 17:51:00 +00:00
felixxia-oai 368e5eae2f Preserve encrypted agent messages in Guardian reviews (#49038)
## Why

Guardian transcripts omitted encrypted agent messages, leaving reviews without evidence such as encrypted parent replies.

## What changed

- Carry encrypted `agent_message` items through synchronous reviews and asynchronous scoring, preserving their order, author, recipient, and ciphertext.
- Account for native messages in context budgets and omit them whole with an explicit notice when limits require it.
- Support mixed text and native messages during review admission while retaining user-content annotations.

## Testing

Add coverage for transcript ordering and budget eviction in both reviewer profiles, plus a mocked scenario verifying that an encrypted parent reply appears exactly once in each of two incremental Guardian reviews.

GitOrigin-RevId: abc2f1ce5accd83beb06f799ef9ed9d7fa2cd90a
2026-09-28 17:40:25 +00:00
Felipe Coury 64bf4e7e62 Show the Plan mode cycling hint in the fullscreen status line (#49037)
## Why

The fullscreen status line showed Plan mode without explaining how to leave it.

## What changed

Show `Plan mode (shift+tab to cycle)` when the composer is idle and accepts input, and the hint fits alongside the status text. Fall back to the mode label when space is limited, and hide the shortcut during tasks, popups, interactive footer use, or other non-composer modes.

## Testing

Add a rendering snapshot and regression assertions for wide and narrow layouts, running tasks, interactive search, empty status text, disabled input, and parent-owned threads.

GitOrigin-RevId: a1cf2762b33f5442ab0611a15205f2e36c84b075
2026-09-28 17:39:56 +00:00
felixxia-oai 41ed72c32b Add opt-in conversation history retrieval to Guardian reviews (#49036)
## Why

The transcript supplied to Guardian may omit earlier user instructions, restrictions, or revoked permissions. History retrieval lets the reviewer check relevant authorization before approving actions with side effects.

## What changed

- Add the disabled-by-default `guardian_conversation_history_tools` feature. With Apps enabled, expose `user_message.search_messages` and `user_message.read_messages` through the parent's live Apps connection and conversation identity.
- Recheck the parent's current app and tool policy on each call, rejecting disabled tools and calls requiring approval.
- Add retrieval instructions that distinguish user authorization from assistant context and account for later revocations and incomplete results. Allow overrides through `auto_review.experimental_conversation_history_prompt`.
- Limit history responses to an estimated 4,000 tokens by default, configurable through `auto_review.conversation_history_max_output_tokens`, while preserving stricter parent and reviewer limits.
- Allow explicit extension registries for isolated sessions and prevent those sessions from inheriting the implicit Apps connection.

## Testing

Add scenarios covering history tool exposure, parent connection and identity reuse, custom prompts, output truncation, stricter reviewer budgets, and live permission changes on a reused reviewer. Extend configuration coverage for blank prompt overrides.

GitOrigin-RevId: 055a69b113c8548bd58e7d5618ea026ba6d1ffb1
2026-09-28 17:29:52 +00:00
jif 46fdd5ef39 Avoid SQLite stalls from connection setup and stderr span logging (#49032)
## Why

Setting `auto_vacuum` on every connection can wait for a writer lock even when the mode is unchanged. Logging every span entry and exit can also block SQLx workers on undrained stderr while they hold a write transaction.

## What changed

- Set incremental vacuum only for empty databases or databases using full auto-vacuum, before enabling WAL. Preserve existing nonempty databases with auto-vacuum disabled.
- Emit span creation and closure events in app-server text and JSON stderr logs, preserving busy/idle timings and explicit events while omitting span entry and exit records.

## Testing

Add regression tests for opening and expanding writable pools while another connection holds a writer lock, and for transaction completion with undrained stderr in both log formats. Verify vacuum modes and retained log diagnostics.

GitOrigin-RevId: 40d4ef32c7efc49f4240b987277ba45551259335
2026-09-28 17:00:25 +00:00
Benjamin Carlsson d8fc718809 Clarify ChatGPT sign-in success copy (#49031)
Describe permissions and approvals explicitly in the Codex docs link text,
and clarify that the user's ChatGPT plan rate limits and training data
preferences apply. Remove the “Before you start” preamble to shorten the
success screen.

Update the rendering snapshot and hyperlink styling assertions for the
revised copy and layout.

GitOrigin-RevId: 5166ddade6a433191fa86c960899c4da5092b9f5
2026-09-28 16:52:39 +00:00
aionescu-oai f817e16905 Use the numeric ioctl value in the macOS sandbox policy (#49028)
Older macOS policy compilers do not define the `TIOCSTI` symbol. Generate the sandbox CLI's Seatbelt deny rule with the numeric value from `libc::TIOCSTI` so it remains compatible while blocking terminal input injection.

GitOrigin-RevId: de8113fbab92bb399f37b9a22762c5c649f25972
2026-09-28 16:45:54 +00:00
iceweasel-oai 4fd5745e84 Use a compatible PowerShell fallback for the Windows MXC sandbox (#49019)
## Why

Microsoft Store PowerShell cannot run under MXC. The existing fallback to an unpackaged PowerShell executable only applied to the elevated Windows sandbox.

## What changed

Extend local PowerShell fallback discovery to MXC in `unified_exec`, using the executor's Windows sandbox selection. Keep discovery local and automatic `-NoProfile` insertion specific to the elevated sandbox. Skip this preparation for non-Windows target paths.

## Testing

Extend command-preparation tests to cover MXC and add a Windows integration test that replaces a Store PowerShell path before launch, writes a file successfully, and verifies `windows_mxc` sandbox metadata.

GitOrigin-RevId: 6c581396525a8fec7e1fb538b3e63b0de2ddb926
2026-09-28 15:58:17 +00:00
jif 69f7140559 Isolate the memory startup metadata test from Git enrichment (#49000)
## Why

Best-effort workspace enrichment can time out independently of the detached
request metadata checked by the memory startup test.

## What changed

Keep the phase-one service-tier and detached-metadata test fixture outside Git
and assert that `workspaces` is absent. Update the header assertion message to
refer to turn metadata.

GitOrigin-RevId: 9541668fc62a28d1ff3131d7f71b351149b6e152
2026-09-28 14:46:32 +00:00
jif c0d26949be Avoid full metadata rewrites for thread timestamp updates (#48983)
## Why

Updates that only change `updated_at` should not rewrite unrelated thread metadata or its indexes.

## What changed

Use `touch_thread_updated_at` for timestamp-only patches when the SQLite row exists and the rollout path is unchanged. Preserve the full update path for missing rows, changed rollout paths, and patches containing other metadata, including staged changes.

## Testing

Add regression coverage for legacy and paginated histories that verifies missing-row reconstruction, timestamp-only writes using SQLite triggers, preservation of other metadata, and application and removal of staged metadata.

GitOrigin-RevId: d5bc70d57e591e3eb8e9521f0c31a7ef75f244d3
2026-09-28 13:43:55 +00:00
eknight-oai 06971ec9aa Prevent message-board notifications from reopening final answers (#48982)
## Why

Message-board notifications delivered as ordinary injected input could cause an agent to sample again after its final answer.

## What changed

Route notifications through the current turn's mailbox as `InterAgentCommunication`, checking atomically that the turn is running and still accepts mailbox delivery. Skip notifications when delivery is closed. Accepted notifications may remain in conversation history for a later turn without reopening the finalized answer or starting a new turn.

Report pending inter-agent communications as mailbox activity, while preserving priority for steering input.

## Testing

Add regression scenarios for notifications arriving before and after finalization, asserting no extra sampling and the expected notification presence in the next turn. Extend input-queue coverage to recognize already-pending mailbox activity.

GitOrigin-RevId: 41d786041b4eccc5ccf926f2f190473676a3ac2f
2026-09-28 13:35:22 +00:00
jif 1b1835f751 Isolate realtime auth fallback test from startup prewarm (#48973)
## Why

Startup prewarm can reconnect after its empty WebSocket connection closes,
consuming the scripted realtime session reply in the environment-key fallback
test with ChatGPT authentication.

## What changed

Use separate WebSocket servers for startup and realtime traffic, configuring
`experimental_realtime_ws_base_url` to point to the realtime server. Assert that
it receives exactly one handshake and that the handshake uses the environment
key for authorization.

GitOrigin-RevId: 0e8ba4bdd66ef8aa3c619e36454dded9dcf55444
2026-09-28 12:05:27 +00:00
Eric Traut 44fe510ce3 Expand native Mermaid flowchart syntax support (#48895)
## What changed

- Default `flowchart` and `graph` to top-down layout when no direction is specified.
- Support solid and dashed edges with directed, undirected, or bidirectional endpoints: `-->`, `---`, `<-->`, `-.->`, `-.-`, and `<-.->`.
- Accept pipe labels on these edges and spaced directed infix labels such as `A -- send --> B` and `A -. retry .-> B`.
- Expand `&` groups into all source-to-target edges, including in chains. For example, `A & B --> C & D` creates four edges. Enforce the 24-edge limit after expansion and cap each group at 24 node references.

## Testing

Add coverage for equivalent syntax, edge styles and endpoints, malformed input, and expansion limits. Extend rendering snapshots across all four directions and the TUI native-renderer test with the new syntax.

GitOrigin-RevId: 6e51653ebf6b8b7e7e1edec0c2e09a5d9c8dec74
2026-09-28 06:30:53 +00:00
Felipe Coury 1cc7e23612 Show a short, neutral TUI interruption notice (#48830)
## What changed

Render interrupted turns with secondary text styling and shorter wording,
removing the suggestion to tell the model what to do differently.

## Testing

Update interruption snapshots and assert that the notice uses secondary text
styling.

GitOrigin-RevId: 7cb042ed9e6781d107a93d5677fa193f082c764d
2026-09-28 01:10:27 +00:00
zm-oai e6f4af1d92 Wait briefly for the Windows sandbox provisioning service to start (#48829)
## Why

Allow the provisioning service time to start without holding up desktop readiness checks for the full provisioning timeout.

## What changed

- Poll service status while startup is pending, waiting up to five seconds within the caller's deadline. Treat absent, deletion-pending, or other non-running service states as unavailable.
- Preserve the original provisioning deadline for pipe availability and request processing, and reject requests whose deadline expires during server authentication.
- Recheck service status when the pipe disappears while waiting for an available instance.

GitOrigin-RevId: ea89175cb41749b9768ac5915083bbfd8ad32713
2026-09-28 00:59:19 +00:00
Benjamin Carlsson 81d5405882 Allow archiving threads before their first turn (#48828)
## Why

Fresh threads have no rollout until their first turn, so archiving them previously failed with a missing-rollout error.

## What changed

Persist loaded, non-ephemeral threads before looking them up for archival. This lets a newly started thread be archived without creating a user turn.

## Testing

Update the archive regression test to cover threads with no turns in both legacy and paginated history modes. Verify the archive notification, empty turn history, `NotLoaded` status, and archived rollout path.

GitOrigin-RevId: 507351c6238ad96f5e3ffbd2ed7f432058e3d52c
2026-09-28 00:58:56 +00:00
Benjamin Carlsson 6af89155d0 Show a hand pointer over transcript links in Ghostty and Kitty (#48827)
## What changed

- Show a hand pointer over actionable transcript links while Codex captures mouse input in Ghostty and Kitty, excluding sessions inside terminal multiplexers.
- Share link hit testing between hover and click activation, and refresh hover after rendering so scrolling and live output cannot leave a stale hand pointer.
- Suppress link hover during mouse presses and drags, overlays, and popups, and clear remembered mouse coordinates on focus loss, resize, and resume.
- Restore the terminal's pointer policy when releasing mouse capture, releasing Kitty's override and using a text pointer in Ghostty. Deduplicate pointer updates and preserve cleanup after write failures.

## Testing

Add tests for wrapped links containing wide characters, hover/click target agreement, scrolling, pointer transitions and restoration, write-failure retries, and hover invalidation.

GitOrigin-RevId: 1cf52e039a229e12260fa334879784c9bc1c8c87
2026-09-28 00:53:05 +00:00
Benjamin Carlsson 84cc4b3fb5 Keep voice RTP timestamps aligned to 20 ms packets (#48824)
## Why

Capture jitter and mute transitions can shift RTP timestamps off the 20 ms source grid, causing receivers that assemble fixed-duration frames to reject subsequent audio.

## What changed

Advance elapsed gaps in whole 20 ms packets and keep the track clock on that grid. Bias empty gap durations by 1 ns to avoid losing an RTP tick to floating-point truncation.

## Testing

Update jitter and mute tests to assert exact clock advancement, including a 580 ms gap, and verify that resumed RTP timestamps stay aligned to 960-sample packets.

GitOrigin-RevId: 1511c739b77ee5871f72723fd34cb67aa9a48c95
2026-09-28 00:43:04 +00:00
Matthew Zeng 456212ca21 Use explicit histogram buckets for tool and skill context metrics (#48819)
## What changed

- Give tool fragment sizes and namespace counts logarithmic boundaries through 32,768.
- Give enabled and kept skill counts integer boundaries from 0 through 512, removed description characters logarithmic boundaries through 131,072, and skill truncation flags boundaries at 0 and 1.
- Record these metrics with explicit boundaries, separating zero values and retaining overflow buckets above each range.

## Testing

Extend tool and skill metric tests to assert explicit boundaries. Add an export test covering zero, one, the upper boundary, and overflow, including bucket counts, ordering, and sample totals.

GitOrigin-RevId: 9fbf3acbe352d7c74f3ad11f0b690148c083a6ef
2026-09-28 00:05:54 +00:00