Commit Graph
13406 Commits
Author SHA1 Message Date
trpcic-openai 4dd5f1e70b Limit MCP product attribution to configured REPL-backed calls (#60697)
## Why

MCP request metadata could forward a client-supplied `product_sku` to unrelated servers and connectors.

## What changed

Remove `product_sku` from turn metadata before forwarding it. For Node REPL-backed servers and the browser connector, populate it from the turn's `apps_mcp_product_sku` configuration, mapping unrecognized values to `other` and omitting empty or missing values.

## Testing

Add regression coverage for configured REPL and browser attribution, unrelated servers and connectors, unrecognized or absent configuration, and spoofed client metadata.

GitOrigin-RevId: bc24062526048ea1c1621099e609053cf167602f
2026-11-11 01:47:52 +00:00
tarunoai ac54a05173 Add a Signer Service backend for macOS notarization (#60695)
## What changed

Allow `APPLE_NOTARIZATION_BACKEND=signer-service` to sign Apple notarization JWTs through `grpcurl`, using GitHub OIDC authentication. Validate the returned signing key and algorithm, and redact transport and signing failure details.

Keep Azure Key Vault as the default backend and skip its configuration requirements when Signer Service is selected.

## Testing

Add coverage for JWT refresh with fresh OIDC tokens and for the binary wrapper running without Azure configuration. All six notarization tests pass.

GitOrigin-RevId: e38ea90e94639d87c11ab075c999d85b61b37c17
2026-11-11 00:58:44 +00:00
Joe Savona 87b7bdbf2e Fit composer footer hints to available terminal space (#60683)
## Why

Narrow composer footers can clip hints or crowd out mode indicators and actions.

## What changed

Use a shared layout for navigation, actions, mode indicators, context, and warnings. Shorten or drop whole labels in priority order instead of clipping them. Add a second row when input modes and queue or active side-conversation actions fit separately but not together, keeping navigation and modes above actions.

## Testing

Add coverage for fullscreen and scrollback layouts, narrow Plan mode hints, active side-conversation actions, oversized goal indicators, and warning hit areas.

GitOrigin-RevId: 849a53d45ef1b36b40c52282e329b48ec7d7d12e
2026-11-10 23:36:04 +00:00
Joe Savona 65dbdb5f03 Wrap built-in TUI status lines within the footer row budget (#60682)
## Why

Long built-in status lines were truncated to a single row even when the footer had room for more content.

## What changed

- Wrap status text to the available width and row budget, preserving styles and hyperlink targets across rows.
- Show an unlinked ellipsis when content exceeds the available space.
- Refresh wrapped content when the status text, agent label, or width changes.
- Keep reasoning-effort transitions on one row and restore wrapping after the final animation frame.

## Testing

Add coverage for wrapping and hyperlink boundaries across footer layouts, content and agent-label updates, resizing, and wrapping restoration after an effort transition. Update transcript and startup snapshots for multiline status text.

GitOrigin-RevId: 30e0795c473efd62fc4d0dca4deb6029b625a9e8
2026-11-10 23:35:28 +00:00
Joe Savona 192e2ef3ce Prioritize draft space when allocating composer footer rows (#60681)
## Why

Status content and footer hints need to fit within the composer's height budget while preserving room for editing and active search controls.

## What changed

- Share row allocation between composer measurement and rendering. Cap status and hints at two rows in inline scrollback, and scale the fullscreen cap from two to four rows with the available budget.
- Reserve space for active footer controls, give suggestions and image previews priority over additional status rows, and avoid reserving an empty hints row when status is enabled.
- Keep textarea row counts and scroll offsets as `usize`, saturating only the terminal height so very tall drafts remain scrollable with a visible caret.

## Testing

Add layout and snapshot coverage for constrained height budgets, status and hints, image previews, slash suggestions, and transcript search cursors. Add a regression test for rendering a draft beyond the `u16` row limit.

GitOrigin-RevId: 20fb0384ffc976dfd12e648004763feff0597dda
2026-11-10 23:34:54 +00:00
Joe Savona 8a7a723dcd Keep TUI status content separate from composer hints (#60680)
## Why

Composer hints could replace configured status content, and mode indicators and warnings reduced the width available to status extensions.

## What changed

- Give enabled status content a dedicated area below the composer in both inline and fullscreen layouts, preserving it during transient hint states.
- Keep shortcuts, queue hints, mode indicators, and warnings in the hint row.
- Measure extension status content at the full available width, allowing up to four rows while yielding space to the composer when height is limited.
- Suppress composer hints behind centered dialogs.

## Testing

Update layout assertions and snapshots for status persistence, extension resizing and clipping, warning placement, and reasoning-effort transitions.

GitOrigin-RevId: f11c2e4fb53c35b69c2fbdbe80cef31bb28faca4
2026-11-10 23:33:26 +00:00
Felipe Coury ad3d3521ed Avoid redundant reads and screen clears when switching side chats (#60675)
## Why

A live parent thread continues receiving lifecycle notifications while its side chat has focus, so returning to it does not need another liveness read.

## What changed

- Skip the parent liveness read when returning from a side chat while the parent is still attached and online. Keep the read when reattachment is needed.
- Stop scheduling a deferred screen clear when handling a transcript reset that preserves the screen.

## Testing

Add regression coverage for parent `thread/read` requests with and without reattachment, and assert that side-chat navigation leaves no deferred screen clear.

GitOrigin-RevId: a07f161ec86b0ae51250c5a0156402d328c42bdf
2026-11-10 22:32:59 +00:00
cassirer-openai d4b19eca27 Preserve agent message deliveries in rollout traces (#60673)
## Why

An accepted agent message may never appear in a later inference request or compaction snapshot. Rollout traces need to retain the delivery and its interaction edge even when the receiving agent makes no further request.

## What changed

Capture agent message payloads in `HistoryItemAccepted` events and create conversation items when those receipts are replayed. Reuse each item's ID when it later appears in a request or checkpoint, updating its body to the model-visible representation. Repeated receipts preserve that representation without duplicating the item.

## Testing

Extend the spawn-edge regression test to cover delivery before any child inference, stable item IDs across a later request, and preservation of trimmed content after a repeated receipt.

GitOrigin-RevId: c193d691e8240645800ce004c11f21e3f1c82915
2026-11-10 22:22:35 +00:00
tarunoai 568c592f9c Add sign-only mode and tighten macOS signing verification (#60671)
## What changed

- Add a `sign-only` operation to sign macOS CLI packages without notarization.
- Validate the configured signing certificate before signing both standard and provisioned packages.
- Require the configured team ID for every executable during verification and extend leaf certificate fingerprint checks to standard packages.

## Testing

Add coverage for signing a standard package without notarization and rejecting unexpected signing certificates in both standard and provisioned packages.

GitOrigin-RevId: 0794c7666abfe981b59b47311e3a9108223b8f57
2026-11-10 22:00:40 +00:00
felixxia-oai fad8b3d5bc Initialize Guardian evidence cursors from thread history state (#60670)
## What changed

Expose history initialization and the effective history mode to thread-ready contributors. Add `EvidenceCursor::at_thread_ready` with paginated-history validation:

- Start new or cleared threads at position zero without requiring an existing rollout.
- Start resumed, forked, or supplied-history threads at the durable tail to avoid backfilling existing evidence.
- Skip the initial `SessionMeta` header when capturing evidence from position zero.

## Testing

Extend evidence tests to cover initialization before a rollout exists, capture of the first original record, rejection of resume without a rollout, and exclusion of existing records on resume.

GitOrigin-RevId: 32aa8e2afb71eb4e882b5f1fb107ac8616b33c8e
2026-11-10 22:00:08 +00:00
dhavalkapil-oai 39f422522e Skip submodule worktree scans when checking repository changes (#60669)
## Why

Submodule worktree scans can execute clean filters selected by task-writable Git configuration.

## What changed

Pass `--ignore-submodules=dirty` to `git status` in `get_has_changes_in_repo` to skip uncommitted submodule contents while retaining gitlink changes.

## Testing

Add a regression test that configures a submodule clean filter and verifies the repository change check does not execute it. The test also confirms that `git status` without the option executes the filter.

GitOrigin-RevId: 5330402f0354c3bf9613358575f8bedc9f312886
2026-11-10 21:58:49 +00:00
Channing Conger 733a1cca06 Add a content helper for forwarding MCP blocks in Code Mode (#60665)
## Why

Code Mode needs a way to forward mixed MCP tool results while preserving their content types and order.

## What changed

Add `content(block)` and `content(iterable)` so callers can forward tool output with `content(result.content)`. Text, image, and audio blocks become their corresponding output items; resource links and embedded resources are serialized as text. Invalid blocks and encrypted text are rejected, and iterators are closed when a block is rejected.

Share MCP block conversion and image detail types with the protocol layer, while preserving existing `image()` and `audio()` input handling.

## Testing

Add coverage for mixed content ordering, iterator behavior and cleanup, invalid blocks, image metadata, short audio clips, and output suppression after exit. Add an integration scenario verifying that MCP text and image blocks reach the model in order.

GitOrigin-RevId: 83832ec6c530dd35ea1e3373680627997c6e13c1
2026-11-10 21:28:22 +00:00
viyatb-oai f7aad26f1d Defer exec-server sandbox preparation to the execution host (#60663)
## Why

Remote commands can use workspace paths from a different operating system. Preparing them on the client should preserve those paths and command arguments for the execution host.

## What changed

- Build exec-server requests directly, carrying the native command and sandbox context without applying the client's sandbox transform.
- Resolve workspace permissions and runtime read access in `SandboxManager` on the execution host, including helper binaries and validated managed-network CA bundles.
- Add explicit backend selection and required platform sandbox selection, rejecting launches when the required sandbox is unavailable.

## Testing

Extend request tests to cover foreign workspace paths, Unicode arguments, and empty arguments. Extend the remote process test on Unix to verify that restricted reads allow the sandbox helper and validated CA bundle while denying an untrusted certificate file.

GitOrigin-RevId: 5fc02ac4208912ecefb80a212742389afc14ac05
2026-11-10 21:26:11 +00:00
smurching-oai 45d1f24d79 Support gateway device-code sign-in in headless TUI sessions (#60662)
## Why

Gateway sign-in needs a way to complete authentication over SSH or when no local browser is available.

## What changed

- Prefer device authentication for gateways that support it in SSH sessions, headless Linux environments, or when no browser handler is available.
- Check the selected session's provider and complete required gateway sign-in before requesting models, including when resuming a thread.
- Display the verification URL, one-time code, and cancellation instructions. Handle sign-in results, cancellation, and connection failures while the prompt is open.
- Skip device login for older servers that do not support it while preserving errors from current servers.

## Testing

Add protocol tests for early sign-in completion, connection loss, provider selection, resumed threads, and legacy-server compatibility, plus snapshots of the device prompt and gateway sign-in loading text.

GitOrigin-RevId: 4f3675ab2fc7fccafbad17796c72a7736ebb86b5
2026-11-10 21:09:59 +00:00
sayan-oai c9bbed2dae Support environment updates in app-server settings APIs (#60655)
## What changed

Add experimental `environments` fields to `turn/settings/update` and `thread/settings/update`. Turn updates apply to later steps of the running turn; thread updates apply to future turns. Omission or `null` preserves the selection, while `[]` clears it. Providing `cwd` in a thread update without an environment list selects the defaults for that directory.

Include the ordered environment selection in `thread/settings/updated`. Wait for Core to accept thread settings updates before returning success, and return rejections as request errors.

## Testing

Add integration coverage for attaching, replacing, preserving, and clearing environments; rejected updates; and the distinction between later steps and future turns.

GitOrigin-RevId: bfebeda57c676be94427aeb0c567c0b94fd9c387
2026-11-10 20:35:28 +00:00
Benjamin Carlsson 82e6bacb9c Enable model and reasoning effort selection for Cloud conversations (#60651)
## Why

Cloud conversations previously used the model returned on activation without exposing model discovery or supporting model changes from the TUI.

## What changed

- Fetch the account-scoped Cloud catalog on demand through `/v2/models`, independently of the submission and attachment queue.
- Let users stage a supported model and reasoning effort for the next new turn in the current conversation. Send these settings with the user message and show acceptance after successful admission.
- Show a loading picker when the catalog is empty, preserve compatibility with Cloud servers that lack discovery, and discard stale catalog results and selections when the account changes.

## Testing

Add coverage for catalog request parameters and queue bypass, deferred discovery and compatibility, model and effort serialization, admission outcomes, account invalidation, and opening the picker after discovery.

GitOrigin-RevId: 2cd0e7fe5f760d4da9258eefe9f0dcbcd23f9b07
2026-11-10 19:52:49 +00:00
zm-oai a92eae0891 Restore PowerShell's working directory in the MXC sandbox (#60647)
## Why

When a workspace has an unreadable ancestor, PowerShell can start with `$PWD` unset and its filesystem drive at the root, breaking relative paths.

## What changed

Prefix PowerShell commands in the MXC sandbox with a guarded workaround that restores the location from the process working directory when `$PWD` is unset. Preserve locations already initialized by startup or a profile.

## Testing

Extend the MXC PowerShell integration test to cover an unreadable ancestor, checking that `$PWD` matches the process working directory, relative file access works, and the parent and sibling file remain inaccessible.

GitOrigin-RevId: 4fb067db52a7f3c6e819169016fe6bd104a277a1
2026-11-10 19:40:10 +00:00
Won Park a2b7c4a655 Use trusted Guardian templates for managed policies (#60646)
## Why

User-configured model catalogs can supply Guardian prompt templates that omit policy slots or add conflicting instructions. Managed rules need a trusted template to reach the reviewer.

## What changed

- Use the bundled Guardian policy template when managed policy or additional rules are present, while preserving explicit host-provided templates.
- Remove `auto_review.extra_policy` and `auto_review.experimental_policy_template` from configuration and the schema. Warn when they are used, directing additional rules to `guardian_extra_policy` in managed `requirements.toml`.

## Testing

Add regression coverage for managed rules with user-supplied catalog templates, explicit host templates, and migration warnings for the removed settings.

GitOrigin-RevId: 7f00bfaa85051272ed70ceb2fcb64ffc297b8755
2026-11-10 19:30:21 +00:00
Andrew Ambrosino 2c2d99f0e3 Update the safety consent test for the current dialog (#60645)
Pass `can_save: true` when opening the consent dialog and assert that the
popup displays “Include logs and session history?”.

GitOrigin-RevId: d6035a9a1b3e5114a6e92a6fd31547f02c4980fc
2026-11-10 19:26:46 +00:00
rhan-oai 30b42cb802 Keep interrupts responsive during host service-tier updates (#60644)
## Why

Waiting for host acceptance of a service-tier update in the submission loop can block interrupts while the host receipt is pending.

## What changed

Move the host acceptance wait out of the submission loop while keeping explicit thread settings replies pending until acceptance completes. Report handoff failures to the caller while preserving the locally committed settings, and allow a subsequent explicit request for the same tier to retry a failed handoff.

## Testing

Add a WebSocket regression test covering interrupts with pending host receipts, failure reporting, same-tier retries, and continued thread operation after startup caller cancellation.

GitOrigin-RevId: 1b27d156eba3ebb47e717a987f41f4f595635be8
2026-11-10 19:13:55 +00:00
Dmitriy Kovalenko 3f797555cd Refresh Apps tools outside the MCP runtime gate (#60639)
## Why

Holding the session MCP gate during `tools/list` blocks other runtime access. Releasing it requires preventing stale refresh results from publishing after configuration or authentication changes.

## What changed

- Capture the Apps client under the session gate, then release the gate before fetching tools.
- Validate runtime and authentication state before publishing the shared cache and client catalog; retry a superseded refresh once.
- Wait for in-flight Apps refreshes before capturing model tools, preparing Apps calls, or shutting down the runtime.

## Testing

Add regression coverage for stale refreshes after runtime invalidation or logout, publication validation after call preparation drains, and a model step that waits for refreshed Apps tools while MCP status queries remain available.

GitOrigin-RevId: 42d4be8c4a9218933f8e3d07fc7f32f2da9cbd9d
2026-11-10 18:33:49 +00:00
cazhang-oai 057d9140a8 Honor read-only MCP tool hints in automatic approval (#60638)
## Why

MCP tools marked with `readOnlyHint: true` could still require approval in automatic mode when `destructiveHint` was also true.

## What changed

Give `readOnlyHint` precedence over `destructiveHint` and `openWorldHint` when deciding whether annotations require approval. Explicit prompt mode and strict automatic review continue to require their respective approval checks.

## Testing

Update unit tests for conflicting annotations, prompt mode, and strict automatic review. Extend app integration coverage to verify that read-only calls proceed while writes prompt in both automatic and writes approval modes.

GitOrigin-RevId: 11a930b857886bf41d09fd54c3a38607ae3d1b4e
2026-11-10 18:33:19 +00:00
Felipe Coury 4a784f63e8 Show pending key chords in a shared floating shortcut guide (#60637)
## What changed

- Replace footer chord hints with a floating guide that shows available completions after a 350 ms delay, including custom prefixes.
- Share guide rendering across conversations, transcript overlays, the session picker, startup drafts, hook review, and daemon recovery. Preserve workspace-specific pane labels and filter startup drafts to supported actions.
- Adapt the guide to short inline viewports, retain `Esc` cancellation, and redraw when pending chords clear. Consume clicks on the guide so they do not activate controls beneath it.

## Testing

Extend tests and snapshots for delayed reveal, timeout, custom prefixes, compact and inline layouts, startup-safe completions, and picker redraws after chord completion or cancellation.

GitOrigin-RevId: afa2fe3ae1b5fbea4cd871c17d35206e749c842c
2026-11-10 18:32:00 +00:00
Benjamin Carlsson df82e2fe0a Support archiving and restoring cloud threads (#60635)
## What changed

- Add cloud archive and unarchive requests and support listing archived threads.
- Detach successfully archived threads and emit archive notifications. Report loaded cloud threads from live attachments rather than cached resume metadata, including after archive failures.
- Scope resume picker archive state and transcript previews by backend and thread so archiving a cloud session preserves a local session with the same ID.
- Limit cloud task archive cleanup to the selected thread, preserving child agents and their active session state, and update the confirmation text accordingly.

## Testing

Add regression coverage for archive acknowledgments, archived-thread discovery and restoration, attachment state after archive failures, same-ID sessions across backends, and preservation of attached child agents.

GitOrigin-RevId: bd155be85ee911375d4d326b18f9b5abe8e82b3d
2026-11-10 18:19:11 +00:00
malsamiri-oai 627b579219 Preserve script quotes in Windows sandbox cmd invocations (#60624)
## Why

CRT argument escaping adds literal backslashes before quotes in `cmd.exe /c` scripts, breaking quoted paths and executable names.

## What changed

Serialize single-script `cmd /c` invocations with `/s /c` and an outer quote pair, preserving the script's quotes. Share this handling across Windows sandbox process creation, ConPTY, and MXC execution requests.

## Testing

Add a regression test for `certutil -hashfile` with a quoted path containing spaces, and update the command-line test for a quoted PowerShell executable.

GitOrigin-RevId: 32b4b7b55f6af4dba206813eac150310f37ae1d4
2026-11-10 16:58:06 +00:00
Eric Traut 2df465732a Use app-server MCP configuration and startup events in the TUI (#60622)
## Why

Locally configured MCP servers may differ from those reported by the app server. Waiting for unreported servers can leave startup progress busy after the observed servers have finished.

## What changed

- Track startup progress from received server status updates, settling when no observed starts remain pending. Handle standalone outcomes after attachment or lag, deduplicate repeated diagnostics, and reactivate progress on new starts.
- Read effective MCP configuration through `config/read` to prevent task tools from shadowing the `codex_tui` namespace, including when configuration changes after startup.
- Use the same configuration reader to disable MCP servers for temporary structured threads.
- Remove client-side MCP requirement checks for the task-tools server and MCP requirements from debug configuration output, leaving enforcement to the app server.

## Testing

Update regression coverage for unreported local servers, startup rounds after lag, diagnostic handling, namespace conflicts, and server-enforced managed requirements.

GitOrigin-RevId: 370767b90ee55f8b0b1403872ef437d53257586b
2026-11-10 16:44:23 +00:00
Keyan Zhang c37fd5665f Allow sampling in-progress turns with thread/sample (#60620)
## Why

`thread/sample` previously required the source's latest turn to finish before it could be sampled.

## What changed

Add `allowInProgressTurn`, defaulting to `false`, to sample a snapshot of the latest turn while the source continues running. The requested turn must still be the latest, but source history changes during sampling no longer invalidate the result when this option is enabled.

For an in-progress snapshot, include a context note explaining that the source was not stopped and pending tool calls may appear as `aborted` in the copy. Suppress the copy's default interruption message.

## Testing

Add coverage for sampling running turns in legacy and paginated history modes, including pending tool calls and mid-turn compaction. Verify that the source continues independently and that finished-turn samples retain their existing context.

GitOrigin-RevId: 771b979bf677e4ff0686476bfaf21aff92f7e7ac
2026-11-10 16:31:52 +00:00
Alex Kira 0d37c062de Support incremental tool declarations on GCP (#60617)
## What changed

Allow GCP Responses requests to use `incremental_tools_legacy`. When enabled, tool declarations are sent through `additional_tools` inputs instead of the top-level `tools` array.

## Testing

Extend Vertex request coverage to check incremental tool declarations, including namespaces, tool search, and `exec_command`. Add GCP cases to the scenario that verifies tool catalog updates are appended without rewriting history, with incremental tools enabled and disabled.

GitOrigin-RevId: 8f4c02f8d62575e24e695d6fae0472a09625409f
2026-11-10 16:13:17 +00:00
Jay Wang 039d0f27d5 Clarify safety recourse messaging and add a reporting option (#60613)
## What changed

- Show a refusal status while preparing alternative suggestions and remove the pending notice above the composer.
- Clarify that choosing a rewrite starts a new chat with earlier context, and update overview suggestions to explicitly say users can ask Codex.
- Add an option to report safety-check concerns through the consent flow when reporting is enabled.

## Testing

Update safety recourse snapshots and extend coverage for reporting consent, returning to the picker, and Daybreak notices when enabled or unavailable for the selected model.

GitOrigin-RevId: 99f565ebec7064ec55d388e73acede2dfe639474
2026-11-10 15:54:09 +00:00
Felipe Coury 37103d7f01 Keep the TUI responsive while opening saved side chats (#60599)
## Why

Opening a saved side chat waits for thread resume and history loading. Keep the chooser usable during that work and switch conversations only if the user still wants to open the chat.

## What changed

- Prepare saved chats in the background and show opening, waiting, and retry states in the sidebar. Allow cancellation and keep only the latest queued destination, with at most two preparations in flight.
- Ignore stale completions after navigation, archiving, disconnects, or backend changes, and release unclaimed subscriptions on their original connection.
- Preserve live events, settings, read receipts, and pending approvals received during loading. Anchor paginated history to the resumed snapshot to avoid overlap with live events.
- Carry held-key suppression across conversation switches.

## Testing

Add regression tests for retry and supersession, cancellation, stale completions, subscription cleanup, live updates during attachment, and held keys, plus snapshots for waiting and retry rows.

GitOrigin-RevId: 2c7d94482078f16895049ce79b242d3eb0d92f40
2026-11-10 14:28:13 +00:00
vishnu-oai b32ada5320 Add published OAuth metadata discovery to the RMCP client (#60578)
## What changed

Expose `discover_authorization_metadata` using RMCP and the existing OAuth HTTP adapter with a caller-supplied HTTP client. Return published authorization-server metadata, including discovery through protected-resource metadata, while excluding synthesized legacy endpoints. Return `None` when authorization metadata is unavailable and propagate discovery errors.

## Testing

Add tests for published versus synthesized endpoints, discovery failures and issuer mismatches, and discovery through a separate authorization server without sending credentials.

GitOrigin-RevId: b273067bb3b33d11301ae0e2017b28cd8e25b548
2026-11-10 11:45:44 +00:00
Brent Traut 77fde36ae1 Allow searching persisted attached threads (#60574)
## Why

Title and content searches exclude attached threads, preventing clients from finding their saved conversations alongside ordinary threads.

## What changed

- Add `includeAttachedThreads` to `thread/list` and `thread/search`. For `thread/list`, require a non-empty `searchTerm` and preserve the usual provider and source filters.
- Expose `attachedToThreadId` on thread responses to identify the owning parent independently of fork and subagent lineage.
- Support inclusive searches through SQLite and filesystem fallback, repairing missing database entries with saved thread names during title searches.

## Testing

Add regression coverage for opt-in title and content searches, attached-parent metadata after restart, default search filters, filesystem searches without SQLite, and discovery and repair of unindexed title matches.

GitOrigin-RevId: ac12ec3c730ad7f1722bdf8e21600d17f12017f0
2026-11-10 11:17:06 +00:00
Anton Panasenko c82708f858 Add an OpenSSH ProxyCommand mode to codex tcp-tunnel (#60568)
## Why

The existing loopback listener mode does not provide the stdin/stdout transport needed by OpenSSH's `ProxyCommand`.

## What changed

- Relay one SSH session over HTTP/3 CONNECT with `--environment-id ENV --port PORT`, defaulting to the public Portals gateway and port 22. Also accept an explicit `--proxy-url` with `--target ENV:PORT`.
- Require ChatGPT OAuth login, enforce cloud configuration and application network policy, and restrict OAuth credentials to the built-in gateway origin. Leave SSH authentication and host-key verification to OpenSSH.
- Preserve binary stdio, propagate input half-close, exit on gateway EOF, and report rejected CONNECT requests by HTTP status without exposing arbitrary peer error text.
- Require ERS-issued v2 tunnel JWTs for Portals listener mode unless OAuth mode is selected, and reject older ERS tunnel JWTs during credential updates.
- Disable UDP segmentation offload for SSH tunnels on Linux to avoid stalled bulk transfers on affected paths. Document an OpenSSH configuration example.

## Testing

Add coverage for argument validation, gateway routing, credential boundaries, JWT startup and renewal checks, binary relay and half-close behavior, gateway EOF and rejection, and cloud policy enforcement before gateway connection.

GitOrigin-RevId: 0d9afbddef01748efcc1c4b88f7e19923deff7e1
2026-11-10 09:54:57 +00:00
chess 6dfaca4dad Avoid periodic wakeups in idle Windows file watchers (#60560)
## Why

The Windows `notify` backend wakes every 100 ms even when idle.

## What changed

- Patch `notify` 8.2.0 in Bazel to wait indefinitely for events or control requests.
- Wake the watcher when configuration requests are queued and share ownership of the wakeup semaphore with `Arc<OwnedHandle>`.

## Testing

Add a Windows regression test that verifies file changes are reported after unregistering one directory and registering another on the same watcher.

GitOrigin-RevId: b53b3c8bc514008554fdeffaef3f7bf8305a4803
2026-11-10 08:52:35 +00:00
Eric Traut f988a5f0da Preserve inherited previews for paginated thread forks (#60559)
## Why

Reference-backed forks can lack a local opening user message, causing them to disappear from thread listings or lose their inherited preview when a new turn is written. Compaction can also remove the opening message from the model context used to prepare a fork.

## What changed

- Persist inherited previews and preserve them when recording new turns and merging thread-list metadata.
- Include reference-backed forks with inherited history in thread listings before their first local message.
- Recover opening previews from transcript history within the requested fork boundary when compaction omits them from model context.
- Use the shared `user_message_preview` helper when deriving previews from rollout items.

## Testing

Extend thread-fork integration tests to check previews in listings before and after a new turn, after reopening, and when forking at a boundary after compaction.

GitOrigin-RevId: 5962cf71ea7104f07c9013cc77259b105e4c60d7
2026-11-10 08:52:02 +00:00
Eric Traut ae5c75dbfc Discard opening prompts when side chat creation fails (#60558)
## Why

A failed side chat's opening prompt and image attachments could be restored into the parent chat's draft when dismissing the failure.

## What changed

Clear the pending opening message when sidebar chat creation fails, and stop restoring the opening message when side conversation creation returns an error.

## Testing

Update the sidebar chooser test to verify that dismissing a failed creation preserves the parent draft and a subsequent prompt without restoring the failed prompt or its image attachment.

GitOrigin-RevId: 1423786b2209e9441e0bc1504ffcf51e74ba7cde
2026-11-10 08:50:53 +00:00
Eric Traut a7a9d82f15 Collapse completed turn activity beneath transcript prompts (#60557)
## What changed

- Fold earlier commentary, reasoning, and tool activity beneath an expandable prompt control in the full-screen transcript, keeping partial and final answers visible.
- Label the control with completion timing when available, or a previous-message count otherwise. Keep tool groups independently expandable within the turn.
- Preserve assistant message phases during live completion and replay, and retain untimed completion markers to identify completed turns.

## Testing

Add transcript coverage for nested expansion, keyboard and mouse controls, narrow viewports, search anchor preservation, detailed mode, and legacy messages without phase or timing metadata.

GitOrigin-RevId: b17d9d7c870990178d76d12a13d463ff9c32b96c
2026-11-10 08:36:09 +00:00
Eric Traut bcbb7f5a9c Group consecutive tool calls in the full-screen conversation (#60556)
## What changed

- Combine adjacent tool calls into one expandable summary, including calls that move from live output into history. Label successful command groups with summaries such as `Explored files` and `Ran 2 commands`.
- Include web searches in tool groups, hide duplicate provisional search entries, and show a single completed search directly. Preserve its reading position when it completes.
- Refresh summaries as history changes while preserving pinned content during selection and reading.

## Testing

Add regression coverage for web search completion, grouped search expansion, loading older history during selection, and command completion with an expanded summary.

GitOrigin-RevId: 98f4e0c49cbf8014c25874cf47d1c0c92ee6b30d
2026-11-10 08:35:36 +00:00
Eric Traut 7539b0a856 Extend output-free transcript summaries to more tools (#60555)
## What changed

- Add summary labels for MCP and dynamic tools, computer activity, terminal interactions, file edits, images, plan updates, agent calls, and historical tool fallbacks.
- Keep tool output out of summaries and give summaries disclosure identities even when their cells have no activity IDs.
- Bring focused disclosure headers into view and show `expand` or `collapse` in the footer, including for search-expanded entries.

## Testing

Add assertions for tool labels, a transcript snapshot verifying that image-generation output stays hidden, and coverage for expanded and collapsed footer hints.

GitOrigin-RevId: 076b8d74c17f26b10aa8221c65b8b38dbb5ad5ea
2026-11-10 08:34:50 +00:00
Eric Traut fdb8be1485 Add optional tool call summaries to the full-screen transcript (#60554)
## What changed

- Add `tui.collapse_turn_details`, disabled by default, and a “Collapse turn details” toggle in the full-screen settings panel.
- Summarize command executions with output-free labels, grouping multiple calls behind an expandable row. Keep full details available through transcript search and detailed view.
- Restore interruption notices at their turn boundaries when resuming and loading older history, including turns split across pages.

## Testing

Add coverage for live summary updates, expansion controls, search access to hidden output, settings visibility, and interruption ordering across history pages.

GitOrigin-RevId: 68987fb0239e39414dac383098acac190fc4f516
2026-11-10 08:34:17 +00:00
smurching-oai 36e074a2fb Add local diagnostic ZIP saves to the TUI (#60542)
## What changed

- Let users press `Ctrl+S` in the report note editor to save a diagnostic ZIP locally without sending it to OpenAI, including when uploads are disabled. Keep `Enter` for sending reports when uploads are enabled.
- Apply the attachment consent choice to both destinations, clarify the disclosures, and show the saved archive path on completion.
- Require a local app server for ZIP saves, report unsupported servers with an upgrade hint, and stop before collecting a note when no report destination is available.

## Testing

Add coverage for ZIP creation with and without log consent, no upload requests on save success or failure, destination availability, keyboard actions, and saved-path receipts. Update report UI snapshots.

GitOrigin-RevId: cbc0142988840e5e3f6475f31678915bf25d56a2
2026-11-10 07:06:53 +00:00
Charlie Marsh c875667eb8 Reuse installed Git objects when upgrading marketplaces (#60528)
## What changed

Use eligible installed marketplaces as Git clone references to avoid fetching objects already available locally. Limit fetch negotiation to the recorded installation commit so local branch revisions are not advertised, and use `--dissociate` to keep the upgraded checkout self-contained.

Enable reuse only with Git 2.20 or newer and a recognized release version. Fall back to a fresh clone if reference cloning fails, and retain existing ref and sparse-checkout behavior.

## Testing

Add coverage for installation-commit negotiation, exclusion of local branch revisions, self-contained object stores, fallback with older or unknown Git versions and shallow references, and Git release parsing.

GitOrigin-RevId: 8d0f6a4bed7e7e2a3136e3912ba2f92150be9354
2026-11-10 05:20:44 +00:00
jamy-OAI b6d93b4cba Disable Daybreak when the selected model lacks access (#60526)
## Why

Switching to a model whose access metadata excludes Daybreak can leave Daybreak enabled and block subsequent turns.

## What changed

Automatically turn Daybreak off when a model switch or catalog refresh confirms that it is unavailable for the selected model. Persist the disabled preference for the thread and new threads, and warn that prior cybersecurity context may still cause refusals. Switching back to a compatible model leaves Daybreak off until the user re-enables it with `/daybreak`.

Require explicit access metadata before disabling Daybreak, and recheck the selected model before applying a queued change.

## Testing

Extend session lifecycle coverage for pending model discovery, supported and unknown models, persisted disabling, and subsequent turns using the standard access program. Add a snapshot of the model-switch warning.

GitOrigin-RevId: 6c294939d854c7176ed9a346e8ea806ffcf6f715
2026-11-10 05:09:30 +00:00
dpatel-oai 86a5522ded Preserve first-party catalog display order in app-server model lists (#60525)
## What changed

Return first-party provider models in catalog order while retaining priority-based default selection and existing filtering. Apply this ordering only to provider-origin catalogs for the OpenAI provider using Codex backend routes or `model_catalog_url`. Bundled, configured, and third-party catalogs retain priority ordering.

## Testing

Add coverage showing that catalog display order can differ from priority order while the recommended model remains the default. Update custom-provider coverage to verify priority ordering with a reversed catalog response.

GitOrigin-RevId: 9c2361e070ba424c092a282ca7f1cf9952d270b3
2026-11-10 05:08:19 +00:00
ioanbudea-OAI ab541fb990 Encapsulate thread metadata construction (#60524)
## What changed

Move `ThreadMetadataBuilder` into its own module, make its fields private, and replace direct field assignments with fluent `with_*` methods. Initialize `updated_at` and `recency_at` from the creation time and default the approval mode to `OnRequest`.

Update `apply_rollout_items` to accept a boxed `ThreadMetadata` seed, keeping callers' async frames small while preserving existing database fields except for the seed rollout path. Add `build_thread_metadata` to use the state runtime's configured provider, and use `thread_id_from_rollout_path` directly for the doctor's filename fallback.

GitOrigin-RevId: a27e4c6b22832e902922dbdd60d7f5c11b4a1a83
2026-11-10 04:56:49 +00:00
viyatb-oai b514f638aa Add policy-checked TCP upstream tunneling for SOCKS (#60523)
## Why

Allowing a hostname must not bypass deny or review rules on its resolved IP addresses. Forwarding DNS resolution to an upstream proxy also requires checking whether those address restrictions can still be enforced.

## What changed

- Add `TcpUpstreamProxy` and `set_tcp_upstream_proxy` to require a configured HTTP `CONNECT` next hop for opaque SOCKS TCP traffic. Wait for a successful response before forwarding payloads and preserve bytes read past the response headers.
- Enforce resolved IP deny and review rules at direct connection time, carry destination-scoped authorization through HTTP, SOCKS, and MITM forwarding, and report blocked resolutions as policy denials.
- Recognize equivalent numeric IP spellings for restrictive rules. Permit remote TCP DNS only when local binding is allowed and no deny or review pattern can restrict IP addresses; reject upstream proxy loops.
- Restrict Linux proxy bridges to managed proxy environment keys and supplied loopback ports. Bound concurrent bridge workers and release them after connection failures while allowing queued responses to drain.
- Add test-only Linux DNS name mapping and SOCKS relay helpers with stable synthetic addresses and validation before opening upstream connections.

## Testing

Add regression coverage for CONNECT refusal and buffered tunnel data, resolved-address policy denials, approval handling across policy refreshes, equivalent IP literals, DNS mapping stability, rejected relay requests, and bridge cleanup after resets.

GitOrigin-RevId: bdd6e16de3373d0eb39995f689dad0230680b99e
2026-11-10 04:43:24 +00:00
Charlie Marsh d15bf1deb7 Fragment large Responses WebSocket messages into bounded frames (#60522)
## What changed

Send Responses text messages larger than 1 MiB as a single WebSocket message split into frames of at most 1 MiB, awaiting each frame send to apply backpressure. Keep smaller text messages and non-text messages on the existing send path.

Update the `tokio-tungstenite` and `tungstenite` fork revisions and associated Cargo and Bazel lockfiles.

## Testing

Add a unit test covering the 1 MiB boundary, continuation opcodes, the final-frame flag, and preservation of payload bytes when a multibyte UTF-8 character crosses a frame boundary.

GitOrigin-RevId: 372ee31b77e185b963d3bdca11847e50e9018421
2026-11-10 04:31:32 +00:00
Eric Traut 39b42aaacd Handle unfinished tool calls in restored history (#60519)
## Why

Forked and recovered sessions can restore a tool call before its output has been recorded. Missing outputs for these calls should be treated as interrupted work rather than an error.

## What changed

Track the restored history's sequence cutoff so custom tool and local shell calls in that history can receive synthetic `aborted` outputs without reporting a missing-output error. Keep the existing checks for newly recorded calls and clamp the cutoff when history is replaced.

## Testing

Extend the active-turn fork test with a pending `apply_patch` call and verify that the fork's model input includes its `aborted` output.

GitOrigin-RevId: d989fa0991db72f0f8fa8a6d5de403fb307c40c7
2026-11-10 04:11:29 +00:00
viyatb-oai d2efdf1986 Route sandbox CLI launches through the shared sandbox manager (#60517)
## What changed

- Use `SandboxManager` to prepare `codex sandbox` commands, including permission profiles, workspace roots, and managed network proxy settings.
- Return a `WrappedSandboxCommand` that can produce an execution request or a configured process command, preserving native executable paths and Linux helper `argv[0]`. Require the session launcher for native Windows token sandboxes.
- Move macOS inherited-terminal policy handling into the shared manager, retaining Unix socket grants and the terminal input injection denial.
- Prepare managed network context alongside proxy environment variables and pass it through sandbox transformation.

## Testing

- Extend sandbox network proxy tests to macOS, covering blocked direct loopback access and explicitly allowed requests.
- Add coverage for Linux helper executable paths and dispatch names, including non-UTF-8 paths.

GitOrigin-RevId: 8b7396d21b2f34122699388f16047329a3f5e5c6
2026-11-10 04:01:23 +00:00
Charlie Marsh 551fc719d6 Record an MCP refresh reason for session permission grants (#60513)
Add `McpRefreshReason::SessionPermissionsGranted` and pass it when marking the
MCP runtime dirty after a session-scoped permission grant. This supplies the
required reason argument and identifies the refresh cause in CLI diagnostics.

GitOrigin-RevId: 2ff8f6b9e1a40d68e1f799d0414c2d45e2576a1a
2026-11-10 03:40:10 +00:00