Commit Graph
12541 Commits
Author SHA1 Message Date
Joe Savona 7df454ceb5 Add TypeScript contracts for custom statusline providers (#62034)
## What changed

Bundle a generated `statusline.d.ts` reference with the `create-statusline` skill, covering status snapshots, UI trees, colors, and canonical statusline item IDs. Add test-only `ts-rs` derives and an `UPDATE_STATUSLINE_TYPES` regeneration path.

Clarify that rate-limit usage percentages can exceed 100.

## Testing

Add a Rust test that checks key type exports in the installed skill and a strict TypeScript fixture covering provider rendering and invalid item IDs, row props, and colors.

GitOrigin-RevId: f615e0b3c2cd3d0d95a75de36ce0a84467ecd5b6
2026-11-17 11:58:26 +00:00
Joe Savona 59ac39addb Surface status line discovery failures and lookup timeouts (#61993)
## Why

Status line provider discovery failures were silently ignored, and startup lookup timeouts appeared as unavailable providers.

## What changed

- Show incomplete provider discovery in the warnings viewer, with sanitized server names, bounded summaries, and no raw RPC error details. Preserve the warning across canceled scans and clear it after a successful scan.
- Share a single five-second startup deadline across provider lookup retries and report timed-out lookups as `Status line timed out`.

## Testing

Add coverage for discovery warning rendering and lifecycle, and for a hung lookup retry exhausting the remaining startup deadline. Update the startup timeout expectation.

GitOrigin-RevId: 0403af2ed688c31c175d1b5c47d2cdd4cd355653
2026-11-17 08:08:51 +00:00
Joe Savona a3fc418fb2 Classify status line provider failures and shorten error messages (#61990)
## What changed

Replace the generic provider error with concise status line messages for unavailable providers, timed-out reads, and other failures. Each message includes `/statusline` to help users reselect a provider.

Classify lookup, snapshot, transport, RPC, and resource validation failures, and log the failure category without carrying raw RPC errors or resource content.

## Testing

Update tests to assert specific resource validation errors and the displayed messages for invalid content, RPC failures, read timeouts, and provider lookup timeouts.

GitOrigin-RevId: 4ae4953cf2552c1c146d77463680655697d0d444
2026-11-17 07:54:43 +00:00
Joe Savona 568cccd4f5 Add a status line provider picker to /statusline (#61988)
## What changed

- Add a "Choose a statusline plugin" action when status line extensions are enabled. Discover MCP providers, show the current selection, and let users save a provider or return to the default status line.
- Preserve the highlighted row when discovery completes and start reading provider contents only after an explicit selection.
- Keep the item editor open across picker transitions and disconnects, allow switching to the default while offline, and guard transitions against repeated activation keys.
- Limit displayed numeric shortcuts to the first nine selectable rows.

## Testing

Add tests for discovery focus, stale discovery results, explicit reader activation, repeated Enter keys, disconnect handling, and numeric shortcuts. Extend the terminal integration test to switch between the default status line and an MCP provider through the picker.

GitOrigin-RevId: 76a254d7afee3a1b8cfc801617a2176893276e0e
2026-11-17 07:53:33 +00:00
Joe Savona 7fb4014d52 Preserve statusline provider selections across thread startup (#61986)
## What changed

- Pass the provider advertised by the picker into statusline resolution, preserving it when selection precedes the thread ID and avoiding a redundant global catalog lookup.
- Cancel failed readers and stop requesting provider-specific usage and workspace headline data until the provider is reselected.

## Testing

Extend reader tests to cover reselection before thread startup, resolution using only the thread catalog, and snapshot suppression after invalid provider content.

GitOrigin-RevId: 9531204cb6ef93c721dc7fafdc0a8fea8c20cb99
2026-11-17 07:27:10 +00:00
Joe Savona 47d9cde20e Refresh status line providers on config and connection changes (#61985)
## What changed

- Refresh the status line after reloading configuration so provider and feature-gate changes take effect.
- Restart the provider reader after saving a selection, including reselecting the same provider to retry a failed read.
- Cancel provider reads and show the built-in status line while disconnected, then restart the provider after reconnecting.

## Testing

Add regression coverage for configuration reloads, provider changes, retrying failed reads, and discarding stale results after provider changes or reconnects. Extend the terminal integration test to verify that a new thread picks up a provider changed in `config.toml`.

GitOrigin-RevId: e86531321d190786e8a41a0a0c93167c8a5298e6
2026-11-17 07:26:02 +00:00
Joe Savona 10a3126a03 Poll MCP statusline providers with fresh state and bounded reads (#61981)
## Why

MCP statusline resources were read only once, leaving the footer stale when thread state or the display mode changed.

## What changed

- Read the selected provider again one second after each successful read, capturing fresh statusline state for every request.
- Enforce a one-second resource read deadline and stop polling with an error footer on timeouts, RPC errors, or invalid content.
- Cancel outstanding reads when the reader is retired, including thread switches and parking a voice session, and disable provider reads in voice-only mode.

## Testing

Add paused-time tests for polling cadence, fresh state, empty content, failure handling, deadlines, and cancellation. Extend the stdio provider integration test to verify that switching out of raw mode updates the provider footer.

GitOrigin-RevId: 159f17ad9291923e438117d919c875051c9d9426
2026-11-17 07:10:46 +00:00
Joe Savona 46f5a1df9f Render selected MCP statusline providers in the TUI footer (#61979)
## What changed

- With `tui_extensions_statusline` enabled, resolve the saved MCP provider and read its resource with a snapshot of the displayed thread's statusline state.
- Show initialization and error messages, validate the JSON UI tree response, and preserve provider content through native statusline refreshes. Ignore stale results when the thread, provider, or working directory changes.
- Request workspace headlines and thread usage for custom providers even when no built-in statusline items are selected.

## Testing

Add unit coverage for response validation and footer lifecycle, plus end-to-end tests for embedded and remote app servers, startup delays, current thread metadata, and rejection of project-level provider overrides.

GitOrigin-RevId: 80a46ec780c1f1536f1fd4749f468629627dedf6
2026-11-17 06:33:13 +00:00
Joe Savona 7e59b27667 Use the current billing plan for TUI thread usage (#61978)
## Why

Account reads can use a cached subscription plan, and rolling quota updates can carry an obsolete plan. This can leave thread usage unavailable or cause `/status` to display costs using the wrong billing model.

## What changed

- Prefer a known plan from a full Codex quota read over the account plan, regardless of reply order. Ignore unknown quota plans and prevent rolling updates from changing the billing plan.
- Preserve quota plan state across chat widget replacement and apply accepted quota reads even after the requesting status card is gone.
- Refresh thread usage availability when the plan changes and pair asynchronous `/status` estimates with the corrected plan, including native dollar usage for `Ent26`.

## Testing

Add regression tests for reply ordering, unknown plans, corrected pending status cards, obsolete rolling updates, and quota replies arriving after widget replacement.

GitOrigin-RevId: 238fadb587fe98cda0eeb5111c1949928acc8153
2026-11-17 06:32:38 +00:00
Joe Savona 490394c184 Keep TUI quota state scoped to the active provider (#61977)
## Why

Starting or switching chats can carry quota usage, backend banners, and pending recovery from the previous provider, even when both providers report identical account details.

## What changed

- Refresh account state when the started or cached thread uses a different provider, and discard inherited quota and backend banner state across provider changes.
- Track the provider associated with quota inherited by the task list, where the local default can differ from the previous chat's provider.
- Invalidate pending recovery when the provider changes or the chat loses its ChatGPT account, and ignore queued recovery refreshes without a ChatGPT account.
- Preserve quota state and pending recovery when opening another chat on the same provider.

## Testing

Add regression coverage for provider changes with matching account details, stale recovery replies, cached side chats, and quota and recovery preservation across `/new` and task list transitions.

GitOrigin-RevId: f4513ca565f2068489327989ae10b24cada0a9bf
2026-11-17 06:31:18 +00:00
Matthew Ma 61f5910826 Add mouse scroll speed to the TUI config panel (#61976)
## What changed

- Add an Input setting for fullscreen transcript mouse-wheel speed, with presets of 0.5×, 1×, 1.5×, 2×, and 3×. Keep custom configured values available as the current choice.
- Save selections to `tui.mouse_scroll_speed` and apply them to the transcript without restarting.
- Refresh the displayed scroll speed from local settings when changing working directories.

## Testing

Add picker and snapshot coverage for custom values and preset selection, verify persistence and live application, and check that changing directories updates the setting and picker.

GitOrigin-RevId: 4be118e1403e74f5ce819e44949f4d96d9e17648
2026-11-17 06:18:06 +00:00
richardopenai 98323eddf9 Simplify SSH tunneling and honor system HTTPS proxies (#61975)
## What changed

- Make `codex tcp-tunnel` an SSH stdio helper, removing the loopback listener, stdin control protocol, and JSON diagnostics.
- Add `--token-file` for one-use credentials, consumed only after gateway verification, with environment-based OAuth routing or a legacy IPv4 `--target`.
- Honor system HTTPS proxy settings without attempting direct QUIC, and keep gateway credentials inside verified TLS.
- Race direct TCP addresses through TLS and HTTP/2 readiness so stalled peers do not block a working address.

## Testing

Add coverage for proxy credential isolation and stalled TLS peers, plus an opt-in Linux OpenSSH integration test for complete uploads and remote exit while local stdin remains open.

GitOrigin-RevId: 62423c8a8267842c9e401b3f9094c7278c47a490
2026-11-17 06:03:45 +00:00
Benjamin Carlsson 9a5a78925d Add a Cloud environment picker for new TUI conversations (#61974)
## What changed

- Open a searchable picker with `Ctrl+X E` to choose a saved personal or workspace environment, or use Default with the current GitHub project when available.
- Show the selected environment above the composer and expose `tui.keymap.global.choose_cloud_environment` for custom bindings.
- Preserve the composer draft and staged model, reasoning effort, and service tier when changing environments. Remember the saved environment when cycling through a local host and back to the same Cloud backend.

## Testing

Add coverage for picker search and selection, dismissal without losing the draft, keyboard routing, environment label truncation, staged settings on the first turn, and saved-environment reuse after host switching.

GitOrigin-RevId: ac9036fd46b252286852df4d792418a3330bae73
2026-11-17 05:52:43 +00:00
cassirer-openai c826ca1286 Preserve accepted tool outputs and local resets in rollout traces (#61973)
## Why

Accepted tool outputs may never appear in a later inference request, and request preparation can strip their history IDs. Replay needs to retain these outputs and match them to later snapshots, including trimmed results and outputs with identical wire bodies.

## What changed

- Capture accepted function and custom tool outputs, preserving their acceptance order, identity, and tool provenance during replay.
- Record stripped tool output IDs alongside inference requests so replay can restore identity without changing the captured wire payload. Reuse accepted items and adopt their first model-visible snapshot bodies.
- Record compaction checkpoints for local context-window resets using the selected input and frozen installed history, including goal edits retained during installation.
- Exclude `configuration_update` items from normalized conversation history.

## Testing

Add replay coverage for outputs accepted without subsequent inference, trimmed results, identical outputs with distinct IDs, and acceptance before or after a request snapshot. Extend checkpoint coverage to verify that retained goal edits are captured and later edits do not alter the checkpoint.

GitOrigin-RevId: 70f737782f5000812f389a4e01b9f9690e39549f
2026-11-17 05:35:07 +00:00
Benjamin Carlsson 39b5903898 Set explicit image detail in the restored-history prewarm test (#61969)
Construct the injected image as a `ResponseInputItem::Message` with
`ImageDetail::High` in the restored-history prewarm scenario.

GitOrigin-RevId: 6a414d2c52cb4d2195e6721365c97677c49c956e
2026-11-17 05:17:42 +00:00
richardopenai c8d1ba814e Add HTTP/2 fallback for SSH tunnels (#61964)
## Why

SSH tunnels need a working transport when UDP is blocked or a QUIC connection cannot complete an HTTP/3 CONNECT request.

## What changed

- Race TLS HTTP/2 CONNECT against HTTP/3 after a 250 ms QUIC head start, selecting the first successful CONNECT response.
- Verify the gateway before obtaining credentials, treat CONNECT rejection as terminal, and include admission in the setup timeout.
- Preserve bounded buffering, TCP half-close behavior, and SSH exit on remote EOF over HTTP/2. Keep peer-supplied debug text out of SSH errors.

## Testing

Add local TLS HTTP/2 and HTTP/3 peer tests for transport selection, blocked UDP, stalled HTTP/3, terminal rejection, setup deadlines, certificate verification, address retries, and bidirectional forwarding with both half-close orders.

GitOrigin-RevId: a1cde88dff7a4e5e6574cf12eacb453551f01b72
2026-11-17 04:41:39 +00:00
Adam Perry @ OpenAI d8d840d32a Capture local attachments before queuing turn input (#61962)
## Why

Queued input can outlive its local attachment files. Reading those files only when rendering a model message can lose media submitted while turn admission is pending.

## What changed

- Introduce `ResolvedUserInput` to carry captured image bytes, audio data URLs, or read errors through session queues and agent input.
- Resolve client attachments on the submitting host before queuing, using a blocking task for local file reads.
- Render messages from captured payloads while preserving original paths and text spans for display, along with image position mappings.

## Testing

Add coverage for rendering and serialization after source files are removed, steered audio retained during pending admission, and local audio errors and display content.

GitOrigin-RevId: 4bbb6bda44167439a8cfdae15d3c476a7b1d336b
2026-11-17 04:08:00 +00:00
bkotsopoulos 65a4450886 Prewarm restored file images on cold resume (#61959)
## Why

Cold resumes warm only base instructions, leaving historical file images out of the WebSocket warm-up.

## What changed

- Add the disabled-by-default `restored_history_prewarm` feature flag.
- Start the WebSocket handshake while history loads, then build the warm-up from restored settings and history when it contains file images.
- Retain the socket and normalized-image cache but discard the image warm-up response ID, so generation resends the full current history and subsequent turns continue from the real response.
- Keep base warm-up for history without file images and defer image preparation to generation when the handshake falls back to HTTP.

## Testing

Add request-history tests and snapshots covering text-only history, interrupted and injected images, resuming with a vision model after image omission, and HTTP fallback without duplicate image resolution.

GitOrigin-RevId: 9a828f44ef0952f7335b5a8c0f7844a069f90d80
2026-11-17 03:48:25 +00:00
rhan-oai 44834c58fa Support turn-scoped exhaustion in host usage accounting (#61958)
## What changed

- Add `UsageAccountingDecision::ExhaustedForTurn` so hosts can fail the current response with `SessionBudgetExceeded` while leaving later turns and peer threads eligible.
- Preserve completed response output and token usage before reporting exhaustion, and track posted charges to avoid accounting twice.
- When steering or mailbox preemption stops a stream, wait for accounting of any completion already observed before starting a follow-up request, and propagate budget errors.

## Testing

Add coverage for preserving output and usage on turn exhaustion, successfully starting a later turn, and reporting turn exhaustion during steering.

GitOrigin-RevId: e673bf30775f27a057fdc39d8429b74ff22121db
2026-11-17 03:28:51 +00:00
Benjamin Carlsson e9a2a9e115 Support saved environments when starting Cloud threads (#61956)
## What changed

- Add `EnvironmentSelection` to start Cloud threads with either a saved environment ID or a project checkout in the default environment.
- Expose saved environment discovery through the authenticated Cloud request handle, rejecting results if the account changes.
- Thread environment selection through the app-server client and TUI session startup, and defer executor readiness for either explicit environment choice.

## Testing

Extend prewarm request tests to cover saved environment IDs and deferred readiness. Extend TUI session tests to verify saved environment routing without local working-directory or workspace-root overrides.

GitOrigin-RevId: 626cec9926dad8f1a89b1a3ee9e4470850ae6a76
2026-11-17 03:17:05 +00:00
Charlie Marsh 50c227a6e2 Bound item loading for paginated read_thread calls (#61955)
## Why

`read_thread` returns at most 20 items per turn, but requesting full turns loads every item in paginated history before trimming the result.

## What changed

For paginated threads, request turn metadata without items, then fetch the newest 20 items per turn concurrently through `thread/items/list`. Restore chronological item order before building the response and share the item limit with the summary code.

## Testing

Add a regression test that verifies the newest 20 items are returned in order with `includeOutputs` both enabled and disabled.

GitOrigin-RevId: ba73a322cac7ee5262135a271f3574dc22d9d78c
2026-11-17 03:16:31 +00:00
Eric Traut 1443c64c62 Add undo and redo to the non-Vim prompt composer (#61954)
## What changed

- Add configurable `composer.undo` and `composer.redo` actions to the keymap picker. Default undo shortcuts are `Alt+Z` on Unix, `Ctrl+Z` on Windows, and `F7`, with `Super+Z` also available on macOS. Add `Shift` to redo.
- Group contiguous typing and consecutive Backspaces into separate undo steps, and keep detected paste bursts separate from preceding typing. Restore complete drafts, including attachments and large pastes.
- Make startup draft transfers undoable, preserve editing history across Vim mode changes, and clear history when a submitted draft is consumed. Track edits while disconnected so new input invalidates redo.

## Testing

Add regression coverage for grouped edits, paste detection and selection replacement, clipboard images, startup draft transfers, disconnected editing, and keybinding conflicts.

GitOrigin-RevId: 46cadf3c69320367dc972e47e0e8b3d3aac3c4ec
2026-11-17 03:15:14 +00:00
Eric Traut d3b7695db9 Refactor composer undo and redo history (#61951)
## What changed

Rename `VimHistory` to `EditHistory` and update composer edit transactions and history-search state to use it. Consolidate undo and redo stack transfers and history trimming in `EditHistory::step`, preserving the existing Vim-mode bindings and edit grouping.

GitOrigin-RevId: 355993a8c2344971c23805b3e21d587a9f368ede
2026-11-17 02:59:02 +00:00
Adam Perry @ OpenAI 5b3d2c7fce Extract user input preparation into codex-user-input (#61949)
## What changed

Move local attachment snapshotting and conversion from `UserInput` to model request content out of `codex-protocol` into a dedicated `codex-user-input` crate. Update core, the TUI, and the queue extension to use the new crate, replacing the `ResponseInputItem` conversion methods with `from_user_input`.

Move the associated attachment and message conversion tests alongside the implementation, preserving coverage for image positions, media labels, serialization, and error placeholders.

GitOrigin-RevId: 77d0f94a4cd4c2edc008b9e2e63a989995aab058
2026-11-17 02:43:52 +00:00
viyatb-oai ad161203cb Mask system SSH config drop-ins in the Linux sandbox (#61947)
## Why

Host root-owned SSH config drop-ins can appear to belong to `nobody` inside the user namespace, causing OpenSSH to reject them and preventing SSH connections.

## What changed

Mask `/etc/ssh/ssh_config.d` with an empty, read-only directory by default for filesystem-restricted commands. Preserve explicit read grants to drop-ins and overlapping write grants, and avoid masking through symlinks or unsafe ancestor directories.

The main `/etc/ssh/ssh_config` and user configuration still apply. Settings in masked drop-ins, including `KnownHostsCommand`, are skipped.

## Testing

Add an isolated SSH handshake regression test that verifies a connection succeeds with system drop-ins masked and that a changed host key is still rejected.

GitOrigin-RevId: e8d9cd7a4bd29480d1b930efc96510362a88d3fc
2026-11-17 02:32:53 +00:00
Ankush Gupta 0637230e89 Include enclosing tool context in nested Guardian approvals (#61946)
## Why

A nested MCP approval can arrive while its enclosing tool invocation is still running. Follow-up Guardian reviews may use a transcript delta that no longer includes that invocation, leaving out the context in which the nested action was requested.

## What changed

- Add the disabled-by-default `guardian_nested_approval_context` feature to include the host-verified enclosing tool name and arguments in synchronous nested approval requests, while preserving the nested action as the action under review.
- Match the enclosing invocation by call ID and omit ambiguous or unavailable evidence. Exclude Node REPL JavaScript preflight requests.
- Admit enclosing-call context only when it fits the remaining fixed or elastic budget, without displacing ordinary transcript evidence or screenshots.

## Testing

Add MCP elicitation coverage and a request-history snapshot for independent nested reviews and transcript deltas. Add tests for call-ID matching, budget-based omission, and screenshot priority.

GitOrigin-RevId: 9c44a0e8f29f84f84a5322b8362f910f2c91ac55
2026-11-17 02:31:45 +00:00
rhan-oai 34c7cbb454 Allow host-started forks to inherit the root session ID (#61945)
## Why

Host-started forks rejected `InheritedSessionId`, preventing hosts from assigning the root session ID to forked children as they already could for fresh children.

## What changed

Accept `InheritedSessionId` for new or forked threads started directly by the host. Resumed threads continue to use persisted session IDs, and native children continue to use their controller's session ID.

## Testing

Extend hosted-child tests to cover prepared forks, verify that inherited session IDs persist across resume while thread IDs remain distinct, and check that explicit session inheritance is rejected for resumed threads and native children.

GitOrigin-RevId: 90fd24a25e4e927c48395dfae7186bb7fd0e537e
2026-11-17 02:15:09 +00:00
viyatb-oai c656014177 Centralize exec-server launches in WrappedSandboxCommand (#61942)
## What changed

- Move process spawning and Windows token session preparation into `codex-sandboxing`. Keep filesystem overrides, proxy enforcement, and the restricting SID with the prepared command, and reject conversion to a plain command request when a Windows session launcher is required.
- Route shell snapshot capture and replay through the prepared command. Limit script replacement to the submitted shell invocation while preserving its sandbox, environment, and proxy.
- Pass borrowed launch facts to sandbox integrity checks, and distinguish explicitly supplied runtime readable paths from automatic proxy CA bundle discovery.

## Testing

Extend coverage for Windows TEMP permissions and managed proxy routing with empty workspace roots, native launch and prewarm input validation, and proxy availability after the process leader exits while a descendant holds stdout open.

GitOrigin-RevId: fe2bdb9e44f4fb273295fbde66b44bf01f0b7fbc
2026-11-17 02:02:21 +00:00
Chris Dong 1d97869412 Route turn-start client metadata through a dedicated helper (#61941)
## What changed

Add `apply_start_responsesapi_client_metadata` and use it in both turn-start paths. The helper delegates to `update_responsesapi_client_metadata`, preserving existing metadata behavior.

GitOrigin-RevId: 6eb677592492bec5847257ef7162d4002834570d
2026-11-17 02:01:50 +00:00
Benjamin Carlsson 9b2d2c12db Add saved environment listing to the Cloud client (#61940)
## What changed

Add `Client::list_saved_environments` and export `SavedEnvironment` with each environment's ID, name, and workspace-sharing status.

- Fetch personal and workspace environments from the authenticated `/v1/environment-configs` picker API, following pagination independently for each scope.
- Request non-draft configurations and filter out the default environment, empty IDs, and blank names.
- Bound the catalog request to 10 seconds and each response page to 1 MiB. Return `EnvironmentCatalogUnavailable` for request, parsing, or limit failures and repeated cursors.

## Testing

Add a client test covering pagination, cursor encoding, scope ordering, default-environment filtering, workspace-sharing status, and authenticated request headers.

GitOrigin-RevId: ca7793a53eade36ba510a53b4a827f945a109072
2026-11-17 02:01:18 +00:00
ningyi-oai cc356fd384 Preserve partial Git metadata when worktree status is slow (#61939)
## Why

Memory requests have a one-second Git metadata deadline. Waiting for all Git lookups together discards an already observed HEAD or remote URL when the worktree scan exceeds that deadline. Shared status scans can also describe a different HEAD from the independent lookup.

## What changed

- Publish HEAD, verified remote URLs, and worktree status incrementally, retaining available metadata at the memory request deadline.
- Read HEAD and change status together using Git porcelain v2, and reject status observations that conflict with an independently observed HEAD.
- Run a positive-only change probe over up to four recently modified root directories during memory extraction preparation. Use a completed probe only when full status is unknown and its HEAD matches the request metadata, without waiting for it before sending the request.

## Testing

Add coverage for partial metadata at the deadline, delayed lookups, stale and unborn HEAD observations, positive-only probes, shared scans, and porcelain parsing. Extend remote credential redaction coverage to partial clones.

GitOrigin-RevId: e7b7c250bfc0e23fb8962fcd5cd5febd7c69e2bd
2026-11-17 01:59:51 +00:00
Charlie Marsh 9537934ed6 Allow independent app-server thread resumes to overlap (#61934)
## Why

A slow thread resume, such as one waiting for MCP startup, can block unrelated resumes behind the exclusive thread-list permit.

## What changed

Allow resumes using canonical thread IDs to share thread-list access for independent root threads. Keep aliases, paths, supplied history, daemon recovery, and agent-owned or uncertain sources under exclusive ordering.

Check source identity and ownership during resume, upgrading to exclusive access when needed. Preserve probe order during upgrades and keep later list mutations behind earlier probes.

## Testing

Add coverage showing that an independent cold resume completes while another waits for MCP startup, that only canonical ID resumes share access, and that permit upgrades preserve probe order ahead of a queued writer.

GitOrigin-RevId: 23fa6ddd551689be478fcca8e8bac2f8210984e2
2026-11-17 01:43:38 +00:00
iceweasel-oai d32c2ba608 Log Windows MXC deny-read glob expansion timings (#61931)
## What changed

Record elapsed milliseconds, pattern count, scan root count, and `glob_scan_max_depth` when expanding deny-read globs on Windows.

Pass the host's resolved Codex home directory to the MXC launcher and initialize runtime sandbox logging from it, so the log location does not depend on the workload's `CODEX_HOME` environment variable.

GitOrigin-RevId: c8106cdb34ea467702f4efd24f3930a8656321d9
2026-11-17 01:11:13 +00:00
felixxia-oai e3b721754e Freeze Guardian review views at ordered evidence cutoffs (#61929)
## Why

Overlapping reviews need board views that match their captured history boundaries, so later evidence does not appear in an earlier review.

## What changed

- Add `RootEvidence::freeze` to capture and enqueue history in source order, returning a `ReviewCutoff` with the source position and reviewer subscriptions.
- Open each review's board view after routing its captured evidence and before routing the next capture.
- Retry transient history failures on subsequent activity, preserve evidence validation failures for later reviews, and skip incomplete delivered messages with a warning once per accepted capture.

## Testing

Add tests for overlapping reviews with a later revocation, retryable history failures, persistent evidence rejection, and incomplete deliveries across activity wakes and freezes.

GitOrigin-RevId: b87040e99bf0e56626d25a8acdd036cf3eed32ce
2026-11-17 00:59:25 +00:00
Charlie Marsh 4f556fdd6d Encapsulate app-server thread-list locking in ThreadListState (#61928)
## What changed

Introduce `ThreadListState` to wrap the single-permit semaphore shared by thread and project request processors. Centralize exclusive permit acquisition and error handling while preserving the existing locking behavior.

GitOrigin-RevId: e596241d5f2620ea791c3bf95f5d97aabc1e8623
2026-11-17 00:58:52 +00:00
Benjamin Carlsson 885a1df5ee Allow agent search by thread ID and Git branch (#61926)
## What changed

Extend agent search to match case-insensitive substrings of thread IDs and Git branch names, alongside the existing name, preview, and working-directory matches.

## Testing

Extend live search coverage for branch names and partial thread IDs, and verify that history search finds a persisted thread by a case-insensitive partial ID.

GitOrigin-RevId: 6872c5af589ab5f4ffb563facb07de692fde972f
2026-11-17 00:39:06 +00:00
Felipe Coury 42248f5ef9 Add conversation files to the TUI sidebar chooser (#61922)
## What changed

- List conversation files alongside side chats and open selected files in the sidebar without jumping to a referenced line.
- Show filenames with directory context and add a scrollable full-path view through `p` or the footer action. Show why file previews are unavailable on unsupported hosts.
- Support mouse-wheel scrolling independently of selection, keyboard paging, and hover highlighting. Preserve the selected file as the inventory changes.
- Activate sidebar rows, tabs, and footer actions only after a matching mouse press and release, rejecting drags and stale targets.

## Testing

Add coverage for grouped file rendering, full-path scrolling, selection preservation, and chooser scrolling and keyboard navigation. Update sidebar interaction tests and snapshots.

GitOrigin-RevId: aa402b928c09732df4f9a5c982691b97aadb00ca
2026-11-17 00:15:16 +00:00
Felipe Coury fd05a402b2 Track conversation files for the TUI sidebar (#61920)
## What changed

Build a per-conversation file inventory from message links, completed file changes, generated images, and previously opened documents. Deduplicate destinations while preserving source locations and prioritizing recent references.

Scan older conversation items while the sidebar chooser is open without advancing transcript history. Cancel stale scans when the chooser closes or the connection changes, and refresh the inventory after reconnecting.

## Testing

Add coverage for inventory ordering, remote paths, directory filtering, review and voice items across page boundaries, and reopening the chooser. Verify that older-file discovery leaves the transcript history cursor unchanged and ignores stale completions.

GitOrigin-RevId: a80ea4f4a4e58da8dc142a099cfd048d69276836
2026-11-17 00:13:43 +00:00
Felipe Coury a669d8ffb2 Add sidebar image previews and present generated images after answers (#61919)
## What changed

- Open PNG, JPEG, GIF, and WebP file links as sidebar image previews, fitted to the available space with format and dimension labels. Show a fallback when terminal graphics are unavailable, and preserve text previews for files such as Git LFS pointers.
- In the owned transcript, place completed, saved image results after the assistant's answer, with larger, left-aligned previews and a clickable `Generated image` label. Preserve this ordering during replay and history pagination, including interrupted turns.
- Reuse native Kitty image IDs and move existing placements without retransmitting their pixels. Probe Kitty graphics support in `herdr` before enabling previews.

## Testing

Add regression coverage for sidebar preview fallbacks, generated-image ordering, pagination and search, preview layout, Kitty placement reuse, and graphics probe replies interleaved with pasted input.

GitOrigin-RevId: 22d8aa2724f17bfa7f8280a2d11d4a7e2cb66728
2026-11-17 00:13:04 +00:00
jif f8e58064fc Preserve remote compaction summaries when interrupting child agents (#61916)
## Why

Child agents configured to interrupt at item boundaries should retain the summary when interrupted during remote compaction. An interrupt during post-turn compaction should also preserve the answer already completed.

## What changed

- Keep sampling interrupt registration active through summary installation, then honor the pending interrupt without running post-compaction hooks.
- Deliver an already completed answer when post-turn compaction is interrupted.
- Keep queued follow-ups for a new turn instead of continuing the interrupted turn.

## Testing

Add a streaming scenario test and context snapshot covering interrupts during mid-turn and post-turn remote compaction. Verify that resumed requests retain the summaries, the completed answer is delivered, and each queued follow-up starts a separate turn.

GitOrigin-RevId: 939eb8b3ed24dbdbff10c9f62226e38a0198fd6f
2026-11-16 23:58:12 +00:00
Joe Savona 30be9534c8 Fall back to the built-in status line for invalid providers (#61915)
## Why

An invalid `tui.status_line_provider` should not prevent startup in normal mode.

## What changed

Use the built-in status line when the effective provider selection is invalid and emit a startup warning identifying its source. Keep the invalid selection's precedence so it overrides lower-priority providers, while preserving the original configuration for diagnostics and `config/read`.

With `--strict-config`, reject invalid provider selections in every configuration source.

## Testing

Update coverage for malformed user settings and incomplete profile selections, and add a CLI case verifying strict provider validation before terminal checks.

GitOrigin-RevId: 797d1c71dd4803db59ca91880a07e2e2118ce097
2026-11-16 23:57:23 +00:00
tvh-openai 56e43660f8 Default Statsig metrics exports to Zstandard compression (#61911)
## What changed

Enable OTLP HTTP Zstandard support and use it by default for the Statsig metrics exporter. Leave compression selection to the SDK when any of `OTEL_EXPORTER_OTLP_COMPRESSION`, `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION`, `OTEL_EXPORTER_OTLP_HEADERS`, or `OTEL_EXPORTER_OTLP_METRICS_HEADERS` is set.

GitOrigin-RevId: 67c8088cf35fb95be3618337ea3ad2fe5a75586d
2026-11-16 23:27:21 +00:00
viyatb-oai c9df641eac Preserve native sandbox executable paths and PTY dispatch names (#61910)
## Why

Sandbox helpers with non-UTF-8 paths can lose their exact executable path when converted into command requests. PTY launches with a custom `argv[0]` can also try to execute the dispatch name instead of the configured program.

## What changed

- Carry native executable paths through sandbox requests, local execution, shell snapshots, and sandbox integrity checks.
- Use native Unix PTY spawning when `argv[0]` differs from the executable, preserving the dispatch name and controlling terminal setup.
- Preserve PTY executable lookup through the child environment's `PATH` and fallback to its home directory when the requested working directory is missing.

## Testing

Add regression coverage for non-UTF-8 sandbox helper paths, PTY dispatch names, child `HOME`/`PATH` lookup, controlling terminals, and exit-code preservation.

GitOrigin-RevId: 6a2af0486220d98195f5d67fde2597e3c4515e11
2026-11-16 23:26:42 +00:00
jif cff061fca9 Add opt-in item-boundary interrupts for subagents (#61909)
## What changed

Add the multi-agent v2 setting `interrupt_at_item_boundary`, disabled by default. When enabled, `interrupt_agent` lets a subagent finish and retain its current output item while cancelling tools immediately. Later output items are discarded, and retained tool calls that have not run receive an aborted result.

Wait for the interrupted turn's terminal event before starting follow-up input, and prevent idle contributors from restarting the interrupted child.

## Testing

Add streaming tests for retaining an assistant message or tool call, discarding later output, and preserving history and follow-up input when the child resumes. Update configuration and interrupt-routing tests.

GitOrigin-RevId: 8b2b9b1383bfb4eefea7369a40012bebc5fff07b
2026-11-16 23:26:07 +00:00
Chris Dong 837f8b50be Pass a per-call voice session ID through TUI realtime startup (#61908)
## What changed

Generate a UUID v4 for each TUI realtime call, send it in the `voice-session-id` header, and forward the same value as `voiceSessionId` in `thread/realtime/start`.

## Testing

Extend realtime request tests to verify that the ID is a canonical UUID v4 distinct from the thread ID and matches across call creation and realtime startup.

GitOrigin-RevId: 8446b4bf9965b6034422b3f8cf83e20840425c43
2026-11-16 23:24:42 +00:00
Charlie Marsh b08fd8a6f1 Filter thread listings before scanning rollout previews (#61902)
## What changed

Apply source, model provider, working directory, and attached-thread filters as soon as the first session metadata record is read. Stop reading excluded rollouts before scanning for preview and user-message events.

## Testing

Add a regression test confirming that copied metadata with a different source cannot override the canonical session metadata when filtering thread listings.

GitOrigin-RevId: 2a9ab6cf419c94884b672b6f03ec23b43b244c83
2026-11-16 22:54:58 +00:00
viyatb-oai a11d2403a5 Fix proc mount fallback detection for Bubblewrap 0.12 (#61900)
## Why

Bubblewrap 0.12 reports proc mount failures at `/proc` instead of `/newroot/proc`, so the Linux sandbox preflight did not recognize failures that should enable the existing fallback.

## What changed

Recognize both destinations for `Invalid argument`, `Operation not permitted`, and `Permission denied`. Match the destination and error on the same diagnostic line to avoid treating unrelated errors as proc mount failures.

## Testing

Extend unit tests to cover both diagnostic formats and reject unrelated destinations, unsupported errors, and errors on separate lines. Exercise the fallback and explicit PID namespace inheritance integration test with both destinations.

GitOrigin-RevId: 7cb0d004cd88ec3dcf14960497c1fac665e6e74a
2026-11-16 22:41:51 +00:00
viyatb-oai 641b4cac88 Tie Linux sandbox proxy bridges to the launcher lifetime (#61898)
## Why

Host proxy bridges must close active connections when a sandbox exits or is cancelled. Proxy descriptor exhaustion must also leave synthetic mount cleanup able to run.

## What changed

- Run host proxy bridges as threads in an outer supervisor that forwards signals and preserves the sandbox command's exit status. Use parent-death signals to terminate supervised children when their parent exits.
- Give bridge routes private descriptor tables where supported, retry accepts after descriptor exhaustion, and keep mount cleanup in a separate supervisor.
- Create the transparent TCP namespace in the bubblewrap child after re-executing the sandbox helper, clearing inherited credentials from memory and restoring dumpability for user namespace ID mapping.

## Testing

Add regression tests for bridge teardown after normal exit, process-group cancellation, launcher termination, and caller-thread exit; exit status propagation with inherited `SIGCHLD` ignored; and SOCKS connectivity and synthetic mount cleanup under descriptor pressure.

GitOrigin-RevId: dd297af98e9383942098fab5683ef2474c5ae554
2026-11-16 22:27:42 +00:00
sayan-oai ce7079b506 Add opt-in UTC dates to environment context (#61897)
## What changed

Add the disabled-by-default `utc_environment_date` feature to compute the model-visible environment date in UTC and render it as `<current_date_utc>`. Preserve local dates when the feature is disabled.

Track the date's time basis in environment snapshots so switching to UTC emits an update even when the date is unchanged. Use the matching date tag when reporting an unavailable clock.

## Testing

Extend coverage for UTC midnight rollover, unchanged dates within a day, legacy snapshot refresh, and date removal and recovery. Update local and remote compaction snapshots to exercise the UTC date tag.

GitOrigin-RevId: 6e983d05ca2914629c9f8575e2efe3ed274a2f77
2026-11-16 22:27:05 +00:00
cassirer-openai ef6ce8100a Bound rollout trace capture with configurable storage limits (#61896)
## What changed

- Add `rollout_trace.max_payload_bytes` and `rollout_trace.max_bytes`, defaulting to 64 MiB per body or separated value and 256 MiB per bundle. Root and child threads share the bundle budget.
- Record explicit truncations and omissions when limits are reached, reserve space for later events, and stop at the last complete event if the event log fills.
- Reuse identical prepared-prompt items and store inline images separately from message structure. Preserve exact JSON bytes for complete composite payloads and surviving content and links in partial captures.
- Let reducers handle partial payloads while retaining lifecycle information and reporting `closed_with_partial_payloads` for closed bundles with incomplete captures.

## Testing

Add coverage for payload reuse and byte-exact reconstruction, truncation, compressed bundle budgets, later events after omissions, readable prefixes after event-space exhaustion, and CLI capture-limit configuration and startup failures.

GitOrigin-RevId: be99a68da427414a7a12bf8209f232c1a0bbe545
2026-11-16 22:26:31 +00:00