Commit Graph

9595 Commits

Author SHA1 Message Date
Eric Traut
aee8a55ab6 Show task tokens and usage estimates in the agent command center (#44970)
## What changed

- Display input/output token counts and estimated credits and USD cost in task details. Prefer live token totals, falling back to complete totals from usage breakdowns.
- Fetch estimates for the selected task on a one-minute cadence for supported Business and Enterprise plans. Cache results, preserve prior nonzero estimates when a response reports zero, and stop fetching when the capability is unavailable.
- Clear cached usage and discard pending results on account changes, reconnects, or missed server events. Prioritize activity and usage over the original prompt when space is limited.

## Testing

Add a rendering snapshot and tests covering caching, stale results, unavailable usage, token resets, and incomplete usage breakdowns.

GitOrigin-RevId: b72c96053557389fdc723a70fab0dab841a52e49
2026-09-12 04:29:48 +00:00
Eric Traut
7efb0262d6 Open tasks managed elsewhere as read-only history in the command center (#44969)
## Why

The command center previously refused to open tasks managed by another app server, preventing users from viewing their saved history.

## What changed

- Fall back to a frozen, read-only history snapshot when attaching fails because another server owns the task. Preserve drafts and skip buffered request replay and paused-goal prompts while viewing.
- Keep the snapshot when reopening the displayed task, and allow explicit retry to attach once the other server releases it.
- Allow pasting into the command center while a read-only conversation is displayed, while keeping the conversation composer protected.
- Box the TUI startup future to keep it out of the CLI caller's frame.

## Testing

Add coverage for read-only history, draft and selection preservation, retry before and after ownership release, and history-read failure without leaving the current conversation. Assert that opening a read-only task does not start a turn and that the TUI startup future remains below 64 KiB.

GitOrigin-RevId: f1bdb5b2d9182079de4e53346a56742a4a02a1c7
2026-09-12 04:28:14 +00:00
Eric Traut
53ff712a48 Add model grouping to the agent command center (#44957)
## What changed

- Cycle task grouping through project, status, and model with `Ctrl+S`, and show the active grouping in the footer.
- Group tasks by model with the most recently updated tasks first within each group. Use `Unknown` for missing or empty model names.
- Display the model in task details and refresh it when thread settings change.
- In model grouping, dispatch new tasks without inheriting the selected task's working directory, matching status grouping.

## Testing

Add coverage for model grouping, selection preservation, navigation, and new-task dispatch across grouping modes. Update snapshots for model details and grouping hints.

GitOrigin-RevId: 429cf61c1e7438ba3b2f989d3ed14e12545856f7
2026-09-12 02:24:02 +00:00
Benjamin Carlsson
944d6fd1ba Keep voice captions visible across speaker updates and history handoff (#44952)
## Why

Completed voice captions could disappear before their queued history insertion ran. Interleaved user and assistant updates could also hide the other speaker's caption and restart its animation.

## What changed

- Preserve separate live caption cells for both speakers, rendering the user above the assistant without restarting settled text.
- Render completed captions while history insertion is pending, then move them into history in one app event. Keep them visible when agent streaming delays insertion.
- Invalidate the transcript overlay when an interleaved caption is cleared.

## Testing

Add regression tests for caption visibility through deferred history insertion, settled animations with either speaker arriving first, and empty caption completion during active and stopping sessions. Update replay coverage to exercise the app's history handoff.

GitOrigin-RevId: 31de6fc74b6dc7ff148c554e3176bf3ee92dced9
2026-09-12 01:21:25 +00:00
pakrym-oai
89c8bcf37d Add context snapshots for async questions and plugin refresh (#44948)
## What changed

- Add a multi-turn scenario covering `request_user_input_async`, continued work while awaiting an answer, and delivery of the answer into the active turn.
- Add a scenario covering plugin configuration reload in an existing thread, including discovery and use of newly installed skills and MCP tools across turns.
- Render explicit tool output names and namespaces in context snapshots, with a regression test ensuring outputs do not inherit metadata from their calls.

GitOrigin-RevId: 64fca8cb51a3a697fa84bf444ce55b8408961ab5
2026-09-12 00:34:18 +00:00
rhan-oai
132c739171 Retire Friendly and Pragmatic personality selection (#44946)
## What changed

- Use literal model instruction templates and the standard fallback prompt, ignoring legacy personality variables. Retain catalog decoding compatibility and report `supports_personality` as `false` for generated model presets.
- Stop emitting `<personality_spec>` developer messages and assigning an implicit Pragmatic configuration default.
- Filter Friendly/Pragmatic overrides from TUI requests while preserving explicit `personality = "none"`. With `features.personality` enabled, this opt-out still strips the model's personality section.
- Refresh inherited model instructions for agent roles only when the personality opt-out changes, preserving custom instructions.

## Testing

Update coverage for literal legacy templates, deprecated overrides on turn start and resume, role instruction refresh, and forwarding the explicit opt-out through thread start, resume, and fork requests.

GitOrigin-RevId: 1391db4e565e010569f0885f80013d1f86b45825
2026-09-12 00:22:04 +00:00
Eric Traut
cebdb732ea Route TUI Windows sandbox setup through the app server (#44945)
## What changed

Use `windowsSandbox/setupStart` for elevated and unelevated setup, and handle completion notifications while retaining the pending approval preset and permission profile selection. Verify the effective sandbox mode before enabling Agent mode.

Keep input locked and setup pending when the start request times out or its response is lost. Block thread replacement during setup, ignore completion notifications for a different mode, and clear interrupted setup state with a restart message after reconnection. Preserve the fallback prompt when elevated setup fails and report unelevated setup failures.

Remove the TUI's direct sandbox setup helpers and sandbox-mode configuration writes.

## Testing

Add regression coverage for uncertain setup responses, matching completion modes, blocked thread replacement with retained input, and interrupted setup during reconnection.

GitOrigin-RevId: 5ec1101a1a69b3f96f01fc2ba6a03112705f4918
2026-09-12 00:20:30 +00:00
alexsong-oai
39d193d72d Enforce managed provider requirements on existing app-server threads (#44944)
## Why

Existing threads retain their model provider configuration, which can stop matching managed requirements after those requirements change.

## What changed

- Check retained providers against current managed `model_provider` and `model_providers` requirements before turn start/steer, review, compaction, manual queue start, and active goal updates. Reject requests when requirements cannot be loaded or no longer match; provider mismatches prompt users to restart Codex.
- Load managed requirements independently of user, project, system defaults, and thread configuration, and resolve Bedrock provider overrides before comparison.
- Keep interrupt, realtime stop, and goal pause/clear available. Realtime connections use separate routing and are outside these checks.
- Make detached reviews inherit their parent thread's configuration.

## Testing

Add unit and integration coverage for provider selection and definition changes, Bedrock overrides, requirement load failures, unchanged queue and goal state after rejection, and continued operation after local configuration changes. Extend detached review coverage to verify inheritance of the parent's provider route.

GitOrigin-RevId: 21abf08ad2bcc2ea4698209fa33a17485eed4740
2026-09-12 00:12:26 +00:00
Eric Traut
c210f4c222 Respect execution hosts in Windows sandbox setup (#44939)
## Why

The Windows TUI cannot configure a remote executor's sandbox. Required elevated sandbox setup also needs to reflect the local app server's readiness rather than the TUI's local setup files.

## What changed

- Restrict setup prompts and actions to local connections with local executors, including local daemon connections. Let remote servers own Agent permission selection, and warn when local and remote executors are configured together.
- Query `WindowsSandboxReadiness` at startup when elevated sandboxing is required locally, and track successful setup across chat widget replacement and reconnects.
- Restore pending initial input to the composer when mixed executors prevent required setup or a local connection goes offline.

## Testing

Add regression coverage for local, remote, and mixed host selection, remote Agent permission selection, pending input restoration with mixed executors, and setup state preservation during daemon reconnects.

GitOrigin-RevId: bd45b308ac3ae4c2489b0bd2ac5d7e12a7fc35d6
2026-09-11 23:44:29 +00:00
priyanshusingh-de
2e572378f4 Add connector auth failure detection without an install URL (#44938)
## Why

`connector_auth_failure_from_tool_result` requires an install URL to return an auth failure, even when the tool result contains valid auth failure metadata.

## What changed

Export `is_connector_auth_failure_from_tool_result` from `codex-mcp` to detect auth failures independently of an install URL. Share metadata validation with the existing parser, requiring an error result, an explicit auth failure flag, and a nonempty connector ID that does not conflict with the metadata.

## Testing

Add unit tests for detection without an install URL, rejection of missing or mismatched connector identities and non-auth errors or successful results, and detection for all three supported auth reasons.

GitOrigin-RevId: 6e4e177f26d9a34c56874b0360bae63f6c89107e
2026-09-11 23:36:17 +00:00
rhan-oai
12e82f44f8 Remove personality selection from the TUI (#44935)
## What changed

Remove the `/personality` command, selection popup, tooltip, and associated settings update and persistence handlers. Stop sending a personality override with TUI user turns.

GitOrigin-RevId: 0549a1f9dcfd8118340fad4b60fd24d4eee7f93a
2026-09-11 23:28:38 +00:00
pakrym-oai
e8271aa8b4 Add scenario snapshots for remote compaction and Code Mode tools (#44934)
## What changed

Add two integration scenarios for `gpt-6-astra` that snapshot request history and settings:

- A multi-turn conversation with local and plugin skills, remote compaction, and a follow-up containing an image.
- A release check combining direct collaboration calls with Code Mode shell commands, MCP calls, image viewing, and patch application, including reading back the edited file.

GitOrigin-RevId: 9b8a48a817c3dba4b139d1b0d015e8084dcb219b
2026-09-11 23:14:52 +00:00
Eric Traut
f3c4d082d9 Remove Windows world-writable scans and warnings from the TUI (#44933)
## What changed

Remove TUI-triggered world-writable scans at startup and during permission changes, along with their warning dialogs, acknowledgement handling, and scan telemetry. Permission selection and shortcuts no longer check for these warnings, and terminal color probing no longer waits for a startup scan.

GitOrigin-RevId: a8d2fb5de7f891dcae5261286743fe3a125b82aa
2026-09-11 23:02:27 +00:00
pakrym-oai
202d61c629 Unify context snapshots and group requests into windows (#44932)
## What changed

- Use one renderer for captured requests, raw request bodies, and input items. Show only appended items when inputs extend the previous request and settings match; start a new snapshot window otherwise and explain the boundary.
- Add optional request settings and tool inventory deltas. Normalize volatile values with stable labels, preserve multiline content, and fingerprint omitted content so changes remain visible.
- Migrate existing context snapshots and expand compaction snapshots to include request history.

## Testing

Add focused tests for window boundaries, cache key changes, tool deltas, shared item rendering, stable normalization, and fingerprints. Assert that the follow-up request after pre-turn compaction includes the working directory override.

GitOrigin-RevId: 6445b014081208ea432b1f3e2ac835c5e4955cb0
2026-09-11 22:55:38 +00:00
viyatb-oai
4d205c7a4d Stop setting YARN_NO_PROXY in the managed proxy environment (#44931)
GitOrigin-RevId: f690a944b8c6d4d846b35a66b95953645028bb1b
2026-09-11 22:33:24 +00:00
rhan-oai
c18277043e Embed friendly instructions in bundled GPT-5.4 and GPT-5.5 (#44930)
## What changed

Replace the selectable personality templates in the bundled `gpt-5.4` and `gpt-5.5` definitions with fixed friendly instructions. Personality selection becomes unavailable for these models in the TUI, and submitted turns omit the personality override. Remove personality overrides from Python SDK examples and the walkthrough notebook.

## Testing

Update core and TUI tests to cover fixed friendly instructions, ignored pragmatic updates, unavailable personality selection, and omitted turn overrides. Preserve coverage for selectable personalities in legacy catalogs, and add coverage for resumed legacy sessions and explicit empty instruction overrides.

GitOrigin-RevId: 869a71445584272405fcbd1325efc31c224808c8
2026-09-11 22:29:54 +00:00
Benjamin Carlsson
16491f7f70 Preserve voice meter history through quiet samples (#44928)
## Why

A quiet sample cleared all earlier activity from that channel's voice meter, making recent speech disappear immediately.

## What changed

Let quiet samples scroll into the microphone and speaker meter history so earlier activity remains visible until it ages out.

## Testing

Update history assertions and the meter snapshot to cover quiet samples on each channel and the eventual return to silence after a full history window.

GitOrigin-RevId: 834157df28c9d2cfbe9fa17bbfaf32b81313a295
2026-09-11 22:17:40 +00:00
Benjamin Carlsson
1b5e27c7f0 Accept voice response audio before captions on quiet turns (#44925)
## Why

Starting a voice turn while the speaker is idle suppresses response audio until assistant captions arrive, preventing audio that arrives first from being accepted.

## What changed

Make speaker suppression conditional when user transcripts start a new turn. Keep idle output ready for audio while preserving interruption of active assistant output and older, uncaptioned speech that is queued or accepted.

## Testing

Add regression coverage for quiet turns with incremental or final-only user transcripts and for interruption of older pending speech across queue and caption states.

GitOrigin-RevId: 288d2071766a1d0c1b8c7a10c0ab434dc4d7cee1
2026-09-11 22:09:26 +00:00
Benjamin Carlsson
7ef70f95d5 Refresh the speaker format when restarting voice output (#44924)
## Why

Opening a Bluetooth microphone can change the speaker format, leaving the previously cached sample rate unsupported when the speaker stream restarts.

## What changed

Requery and validate the speaker configuration after stopping the old stream. Update playback and render resampling to the current sample rate, and revalidate callback timing. Discard stale echo references while preserving capture history and audio processing state.

## Testing

Extend the speaker reset test to cover 48, 24, and 44.1 kHz output rates, checking that render output matches a fresh converter while capture history and pending samples are preserved.

GitOrigin-RevId: 3a4fba577288a83a7509fc78be86171ac85a3c0a
2026-09-11 22:09:02 +00:00
Benjamin Carlsson
ce7fbb373b Bundle native voice runtimes in Windows releases (#44922)
## Why

Windows release packages need the voice helper and native audio libraries. Realtime TLS connections on fresh Windows installations also need platform certificate validation so Windows can retrieve missing trusted roots on demand.

## What changed

- Build and sign the voice helper and audio DLLs for Windows x64 and ARM64, bundle a pinned Microsoft CRT DLL, and verify signatures and runtime receipts before packaging.
- Add verified, pinned Cygwin and native build tools plus MSVC linker, compiler, and path handling fixes for the Windows Bazel builds.
- Include voice resources in primary release archives and WinGet packages. Preserve WinGet executable names, update manifest hashes, and recognize the package root through matching entrypoint metadata. Keep Python runtime wheels voice-free to preserve their existing Windows support floor.
- Use Windows platform TLS validation for realtime WebSockets when no custom CA bundle is configured, preserving custom CA behavior.

## Testing

Add coverage for build-input integrity and unsafe paths, signed Windows runtime assembly, WinGet file and hash preservation, package discovery, and TLS trust selection, untrusted certificate rejection, and hostname validation.

GitOrigin-RevId: 423da35872fa5549d69fd4ca97d922bb49599386
2026-09-11 21:59:24 +00:00
Benjamin Carlsson
3f59eb965a Enable TUI voice conversations by default (#44921)
## What changed

Promote `realtime_conversation` to stable and enable it by default, removing its experimental announcement. Update popup and tooltip tests to use explicit experimental voice fixtures now that the feature is stable.

GitOrigin-RevId: 4e947189f41de465d1f343e95100b26d6200db24
2026-09-11 21:59:01 +00:00
Owen Lin
3052bbcf8c Remove the deprecated thread/rollback API (#44915)
## What changed

Remove `thread/rollback`, its request and response types, generated bindings, and the core `Op::ThreadRollback` operation. Requests now follow the generic unknown-method rejection path. Document `thread/revert` as the alternative for paginated threads.

Keep historical `ThreadRolledBack` markers and legacy error deserialization so existing rollouts remain compatible with replay and migration.

## Testing

Adapt retained-context and Guardian history tests to append legacy rollback markers and resume threads, preserving coverage of surviving instructions, answers, and review history.

GitOrigin-RevId: b3da1becdf86b1869275aacb0ffc2817cee5af2e
2026-09-11 21:32:04 +00:00
Matthew Zeng
c62d191c4c Expose disabled plugin settings in the app-server API (#44905)
## What changed

- Accept `disabledPluginIds` in `thread/settings/update` and `turn/start`. A supplied list replaces the saved selection; omission or `null` preserves it, and `[]` clears it.
- Return the selection in thread start, resume, and fork responses and `thread/settings/updated` notifications. Update generated schemas and client types.
- Restore disabled plugin IDs from the history retained at the requested fork boundary, preserving explicit overrides.

The selection persists across resume but does not yet filter plugin capabilities.

## Testing

Add coverage for replacing, preserving, and clearing selections without inference; turn-start notifications; resume; and fork boundaries across legacy and paginated history, with loaded and restarted parents. Add a core regression test for history restoration and explicit clearing.

GitOrigin-RevId: 654a8c2a0527228d422c0dd4919228447e2663db
2026-09-11 20:27:37 +00:00
iceweasel-oai
42cd1ec497 Wire up the native Windows MXC helper entry point (#44903)
## What changed

- Dispatch `--__codex-windows-mxc` before normal CLI parsing, launch the decoded request, and propagate the child exit code.
- Build the native request from the helper's environment and working directory, discovered Windows platform directories, and volume roots, including UNC working-directory roots. Reject non-Unicode environment values and empty child environments.
- Allow Win32k calls and desktop handles needed for PowerShell startup while retaining clipboard, input-injection, and desktop/system-control restrictions.
- Keep policy, transport, and native launch internals private, and report an explicit error when the helper is invoked outside Windows.

## Testing

Add a wrapper regression test covering exact argument preservation, Windows quoting, separate policy and command working directories, and explicit environment forwarding.

GitOrigin-RevId: 674d0d61a3265bd517b77da9f9de2cd9fad62917
2026-09-11 20:10:02 +00:00
faizan-oai
e3a52b87b2 Expose available access programs in model discovery (#44893)
## What changed

Carry optional `available_access_programs` metadata through model information, presets, caches, and the TUI, and expose it as `availableAccessPrograms` in app-server `model/list` responses. Update the generated JSON schemas, TypeScript types, and Python models.

Preserve the distinction between missing metadata and an empty `cyber` list. Ignore unknown cyber program names when reading the catalog so new server programs do not prevent older clients from loading it. Discovery metadata does not grant access; inference still enforces authorization.

## Testing

Add coverage for absent, null, empty, and populated metadata, unknown program names, and app-server serialization. Extend cache tests and verify that online refreshes persist changed access metadata even when the catalog ETag stays unchanged.

GitOrigin-RevId: b3ef5805c1c61b8d64b9b896c9c0a79120143667
2026-09-11 19:13:04 +00:00
jif
4dcce4f0c4 Reject token-budget history notes for unsupported starting models (#44883)
## What changed

After resolving startup configuration and model defaults, reject `features.token_budget.use_history_notes_extension` when the starting model lacks `supports_experimental_context`. Return an error directing users to disable the option or select a compatible model.

## Testing

Add startup coverage for explicit configuration and model defaults, verifying rejection for unsupported models and successful activation for supported models and standalone token budgets. Update history-notes test fixtures to declare experimental context support.

GitOrigin-RevId: abf1a024efc5acf97cfc858fbb93821363769dc0
2026-09-11 17:55:03 +00:00
Ian MacLeod
33bdf976cc Fade Astra composer stars and stabilize cursor redraws (#44879)
## What changed

- Fade Astra stars over one second after 15 seconds from the first visible frame, or quickly on composer input, drafts, voice input, and popups. Disconnected key handling also dismisses the animation.
- Preserve placeholder and draft text, including spaces. Stop scheduling animation frames when unfocused or finished, while allowing the idle deadline to elapse without terminal focus.
- Hide the terminal cursor before repainting and cache its style to avoid redundant anchor repairs. Invalidate cursor state after screen transitions, external programs, resume, and caught-panic recovery.

## Testing

Add regression tests and snapshots for fade timing, input dismissal, focus changes, text preservation, and frame scheduling. Add cursor redraw tests and a PTY test for cursor visibility and shape restoration after a caught panic. Update the reconnect test to wait until both the draft and notification are visible.

GitOrigin-RevId: 0c9aaa13e6bde820f88e3757457063680d7921a3
2026-09-11 17:43:36 +00:00
riley-oai
7b491281c8 Return public key metadata from user verification enrollment (#44877)
## Why

The trusted UI host needs the local credential's public metadata to complete backend registration. `userVerification/enroll` previously returned only `credentialId`.

## What changed

- Return `algorithm` and `publicKey` for newly created or reused credentials. The algorithm is `ecdsaP256Sha256X962`; the public key is unpadded base64url SPKI-DER.
- Keep both fields optional in the protocol for compatibility with older app-servers, while current servers populate both.
- Document caller-owned backend registration and revocation, including checking metadata, signing an enrollment challenge with `userVerification/verify`, matching credential IDs, and preserving the authenticated account throughout registration.

## Testing

Add protocol coverage for absent or null metadata and populated-response round trips. Add an RPC assertion for enrollment metadata and extend the local enrollment test to check metadata when creating and reusing a key.

GitOrigin-RevId: f0726e8c430e27559e1a01ba2ea635993cbeba09
2026-09-11 17:36:50 +00:00
iceweasel-oai
2c9e1a5775 Add managed network policy support to the Windows MXC sandbox (#44872)
## What changed

Add `create_command_args()` to encode argv, permissions, policy cwd, and optional managed network context through the existing bounded environment transport.

For managed networking, generate a policy that allows IPv4 and IPv6 loopback while denying direct non-loopback egress and general inbound access. Require nonempty, nonzero proxy ports and reject `allow_local_binding=false` at both launcher and policy boundaries because native host-loopback access is bidirectional.

Document the MXC launch contract, platform requirements, and limitations.

## Testing

Add portable tests covering managed network transport and policy translation, plus rejection of missing proxy ports, zero ports, and unsupported local-binding restrictions at both boundaries.

GitOrigin-RevId: 8d31b98f94a2ba3769369aa50de8e53dc143bac4
2026-09-11 17:19:23 +00:00
Benjamin Carlsson
68bc5369ba Enable worktrees by default and clarify local daemon errors (#44870)
## What changed

- Mark `worktrees` stable and enable it by default, removing it from `/experimental`. Point users who explicitly disable it to their Codex configuration.
- When a local daemon lacks `thread/backgroundTerminals/list`, block worktree creation and `/cd` with guidance to run `codex app-server daemon update` and restart Codex.

## Testing

Add regression coverage for unsupported local daemon methods, unrelated errors, embedded servers, and empty background terminal lists. Update feature-gating tests to disable worktrees explicitly and remove worktrees from the experimental menu snapshot.

GitOrigin-RevId: 3f21d0ebaa02da11a6aaa2e1ac615b4518fc98d8
2026-09-11 17:08:59 +00:00
Abhinav
122d55cba8 Preserve originating budgets for code mode notifications (#44867)
## Why

A yielded code mode cell can emit a notification after the session switches models. Its output should retain the originating model's truncation budget instead of using the receiving model's budget.

## What changed

Carry the cell's output token limit, including the serialization allowance, through notification dispatch and attach it as `history_truncation_token_limit` metadata. Allow `inject_if_running` to accept response item envelopes so queued notifications preserve this metadata in history and rollouts.

## Testing

Add regression coverage for delayed notifications across a model switch, verifying per-cell truncation budgets, full notification text in raw events, and persisted rollout metadata. Add a task-completion test that checks notification budgets are preserved alongside queued user input.

GitOrigin-RevId: 28380a039a6d41ea324401fcf1f611d81a279477
2026-09-11 17:03:21 +00:00
Abhinav
2fc4bda3ca Preserve originating context for yielded code-mode tool calls (#44866)
## Why

A code-mode cell can outlive its turn. Nested tool calls dispatched during a later turn need the original step's tools and context, while approval handling must still work across that turn boundary.

## What changed

- Retain each cell's originating `StepContext` for nested tool dispatch and cancel queued calls whose context has been released.
- Keep MCP approval metadata available for the lifetime of the running invocation, keyed by server and call ID.
- Apply Guardian denial accounting and interruption to the active turn, including reviews from an earlier cell.
- Carry `turn_id` in legacy MCP begin/end events so history reconstruction and rollout migration assign late completions to their original turn. Preserve the current-turn fallback for older records without it.

## Testing

Add regression coverage for originating tool selection across turns, callback and metadata cleanup, delayed MCP elicitation review, Guardian interruption of the active turn, and late MCP completion attribution with legacy compatibility.

GitOrigin-RevId: 4533379aae6e4ecb4aabe5a25e4aca5d65385d76
2026-09-11 17:01:17 +00:00
Abhinav
3305c4f31d Scope code mode callback delegates to individual executions (#44865)
## Why

A delegate bound at session creation cannot provide different callbacks for cells sharing that session. Each execution needs to retain its own delegate across yields and release it when the cell is cleaned up.

## What changed

- Pass `CodeModeSessionDelegate` to `execute` instead of session creation.
- Route tool calls, notifications, and cell closure callbacks through the execution's delegate in the in-process runtime and the gRPC and stdio transports.
- Retain delegates with pending executions and live cells, releasing them through closure and cancellation cleanup.

## Testing

Add coverage for distinct delegates across yielded cells, gRPC callbacks before cell admission, and delegate release after completion or abandoned execution cleanup. Update transport tests to verify callbacks reach the owning cell's delegate.

GitOrigin-RevId: 7469f52104b993e790a40c65fb800ad02b7fd606
2026-09-11 17:00:07 +00:00
jif
bc5957eac9 Preserve parent cache affinity for ephemeral forks (#44862)
## Why

ChatGPT derives Responses cache affinity from the `session-id` header. Ephemeral forks need to reuse their parent's cache routing while retaining their own session and thread identities.

## What changed

- Inherit the parent session ID as the `prompt_cache_key` for ephemeral root forks.
- Use the prompt cache key for root-agent Responses `session-id` headers, including WebSocket handshakes. Preserve the actual session identity in turn metadata and leave non-root-agent routing unchanged.
- Keep enabled goal tool definitions visible on ephemeral threads, but reject execution with `Goal tools require a persistent thread.` and disable automatic goal continuation without persistent state.

## Testing

Add regression coverage for inherited cache routing with distinct fork identities, matching parent and fork tool definitions, WebSocket session headers, and rejection of ephemeral goal tool execution.

GitOrigin-RevId: d235e97630068b27f7ebd562dd23ac6266ebc1b9
2026-09-11 16:41:56 +00:00
Eric Traut
0818b6550b Add consistent theme-based thread colors across the TUI (#44857)
## What changed

Assign thread colors deterministically from the full thread ID and the active syntax theme's accents. Use the same color for thread names and titles in the status line, status previews, agents overview, and resume/fork pickers, independent of renaming or list order.

Preserve thread colors when picker rows are selected and honor `tui.status_line_use_colors`. Load the configured theme before startup pickers render and refresh the cached palette when the theme changes. Fall back to the terminal's default color when no accents are available.

## Testing

Add unit and snapshot tests for palette extraction and refresh, default accent coverage, selected titles in both picker layouts, color suppression, and preview/footer consistency during automatic naming.

GitOrigin-RevId: 2b83a66bb3e80d4a1daea48ab9a86dbf2b525eef
2026-09-11 16:20:50 +00:00
Nick Steele
654b0a77d0 Add trusted enterprise MCP auth configuration (#44832)
## Why

Enterprise MCP authorization must remain controlled by host, user, or managed configuration. Project settings and plugin declarations must not redirect enterprise credentials or downgrade the selected authentication mode.

## What changed

- Add `auth = "ema_auth"`, shared `mcp_enterprise_managed_auth` IdP configuration, and per-plugin enterprise registration settings.
- Require enterprise registrations to come from one non-project configuration layer, preserve managed IdP precedence, and reject project overrides that change authorization or re-enable disabled enterprise servers.
- Add the disabled-by-default `use_xaa` feature flag and require non-project opt-in or a managed requirement.
- Reject plugin declarations that select `ema_auth`. Keep EMA connections unsupported and block ordinary MCP OAuth login and credential fallback for this mode.
- Extend the configuration schema and serialization for the new settings.

## Testing

Add coverage for IdP precedence, incomplete registrations, alternate credential validation, project-only opt-in, plugin self-declaration rejection, configuration round-tripping, and trusted-project attempts to downgrade enterprise auth to OAuth or ChatGPT auth.

GitOrigin-RevId: f193bdfda74208c98e496a23bf2916955b131a1c
2026-09-11 14:25:56 +00:00
Gabriel Peal
7a6f469dcf Expose advertised MCP server capabilities in status responses (#44826)
## What changed

Add `serverCapabilities` to `mcpServerStatus/list` responses in both `full` and `toolsAndAuthOnly` modes, including thread-scoped reads. Return the initialized server's capabilities object, including its `extensions` map, or `null` when unavailable.

Capture capabilities during initialization so they remain available when tool discovery fails. Clear them on each new connection attempt and keep them independent of shared tool caches. Update the protocol schemas, generated TypeScript and Python types, and documentation.

## Testing

Add coverage for extension capabilities surviving tool-discovery failures in both detail modes. Extend existing tests to check advertised extensions, absent capabilities after initialization failure, and serialization of unavailable capabilities as `null`.

GitOrigin-RevId: 8e9d67c10fac3a54e82bef8be5d99caaf82597d1
2026-09-11 13:55:24 +00:00
jif
624ccf7947 Test approved command execution with managed unified exec disabled (#44814)
## What changed

Add an app-server integration test for `requirements.toml` with `unified_exec = false` and `shell_tool = true`. Verify that:

- The model receives `exec_command` without `write_stdin`.
- Command approval carries the expected thread, item, and environment IDs.
- Accepting approval completes the command and turn successfully.
- The model receives command output without a running session ID.

GitOrigin-RevId: 67977c20b9b206e210807d0ce1e305259d25b7ba
2026-09-11 12:37:04 +00:00
Eric Traut
02a8f038b8 Check folder consent before creating or resuming TUI tasks (#44755)
## What changed

- Check directory trust when dispatching tasks from Agent Command Center, resuming sessions, and opening loaded tasks.
- Return connected users to Agent Command Center when they cancel folder consent. Clear launch prompts and images on startup cancellation, and restore the composer draft when task dispatch is canceled.
- Reload local configuration after saving folder trust and review startup hooks before creating a new task.
- Label connected consent screens with “Back to Agent Command Center”; retain quit behavior for embedded sessions.

## Testing

Add a terminal integration test covering unknown and untrusted folders, server-authoritative trust, cancellation and retry, resumed tasks with changed directories, and hook review before task creation. Update consent-screen snapshots.

GitOrigin-RevId: db88d2113fd47bc4c57369cc20ebf3042e6fb7ab
2026-09-11 07:13:19 +00:00
Eric Traut
b9934480bf Render Markdown in agent overview task details (#44752)
## Why

Task details displayed prompts as plain text and flattened agent messages, losing Markdown formatting and layout.

## What changed

Render prompt and last-message previews as Markdown at the details panel width, using the source thread's working directory. Preserve newlines and tabs within the 512-character preview limit, strip other control characters, and unwrap Markdown fences around agent messages. Keep prompts limited to two rendered lines and wrap long code lines to fit the panel.

## Testing

Add snapshots for Markdown formatting, long lines, and tables; verify cached and live messages render identically; and test preview layout preservation, control-character filtering, and Unicode character limits.

GitOrigin-RevId: b605d3f5920f0d15cc7682f45988a2e933e00602
2026-09-11 07:05:47 +00:00
Benjamin Carlsson
ab95cd4dd9 Preserve voice caption order when replaying TUI history (#44749)
## Why

Retained voice captions were appended after replayed history, placing earlier speech after later typed turns when switching back to a thread.

## What changed

Anchor completed captions to the next live turn and restore them before that turn during replay. Handle buffered item, delta, and completion events even when the turn-start event has been evicted. Restore remaining captions at the end of replay.

## Testing

Extend regression coverage to verify caption order and avoid duplicates across repeated thread switches. Add coverage for inactive-thread captions replayed before a later buffered turn without its start event, with and without a message delta.

GitOrigin-RevId: 6860a649bdcdda4937afb3ab4bbd75cf4ea5b4e6
2026-09-11 06:56:37 +00:00
richardopenai
eab107fed0 Update quinn-proto and allow the pinned H3 Git source (#44747)
## What changed

- Bump `quinn-proto` from `0.11.14` to `0.11.15` in the Cargo and Bazel lockfiles.
- Allow `hyperium/h3` as a Git source in `codex-rs/deny.toml` for the pinned revision needed by `CONNECT` request handling until released.

GitOrigin-RevId: 1e977e28d9e57acd8eac6a49a5e15fe04602c38d
2026-09-11 06:45:09 +00:00
Eric Traut
84e7d4a1fe Check folder trust after resolving the startup destination (#44746)
## Why

Resume and fork selection can change the working directory. Folder consent needs to cover the selected destination, and existing tasks in untrusted folders may retain settings and history loaded while trusted.

## What changed

- Move startup consent after destination selection and reload local configuration when trust is saved.
- Check both selected and saved folders for local daemon resumes, and reread the task after consent to catch working directory changes.
- Resolve local trust using project markers, Git roots, and normalized paths, honoring explicit working directory decisions and canonical path precedence.
- Offer restricted-folder consent without changing saved trust, with distinct wording for existing tasks that may retain configuration or hooks. Preserve remote checks scoped to explicit `--cd`.

## Testing

Extend trust lookup coverage for parent/child decisions, repositories without project configuration, path aliases, and custom project markers. Update restricted-folder snapshots and add an existing-task snapshot.

GitOrigin-RevId: caf8c70f1e953c4f7b4ddc89dd29bb1fd8ed62f1
2026-09-11 06:44:40 +00:00
Eric Traut
eaa8b6d917 Make archive confirmation number shortcuts act immediately (#44744)
## What changed

Allow `2` to confirm archiving a task and its child agents in the agents overview without an additional confirmation keystroke. Keep explicit confirmation for permanent deletion.

## Testing

Add a regression test verifying that `1` cancels and `2` dispatches the archive action, with both shortcuts closing the confirmation popup.

GitOrigin-RevId: 9a4b941f36a7876eccf9d8b0ea6a63e799f53b98
2026-09-11 06:34:46 +00:00
Benjamin Carlsson
eabb7c91d1 Preserve editor yanks across new sessions and thread switches (#44742)
## Why

Starting a new session with `/new` or switching threads replaces the chat composer, losing the last editor kill or Vim yank.

## What changed

Transfer the kill buffer to the replacement composer, preserving both its text and whether it is characterwise or linewise. Yanked text remains available to paste within the same TUI session.

## Testing

Add regression tests for new sessions and root thread switches that delete a line with Vim `dd`, then paste it with `p` in the replacement composer and verify the text and rendered output.

GitOrigin-RevId: edb4790d4de7b7425de6ef6af4e2786f6a4771c1
2026-09-11 06:27:28 +00:00
Eric Traut
40b0409aa1 Clarify folder trust prompts and add restricted widget support (#44732)
## What changed

- Explain that folder settings can run code automatically and that the trust decision is saved. Label the actions “Trust and continue” and “Quit”, and show the Escape shortcut.
- Add a restricted state to `TrustDirectoryWidget` with an “Open restricted” action and a disclosure of which project features remain disabled. Skip trust persistence for this state. Onboarding still initializes the widget with `restricted: false`.

## Testing

Add a restricted-folder rendering snapshot and a test that accepting or cancelling the restricted widget does not persist trust. Update existing trust snapshots and the interactive startup safety test for the revised prompt.

GitOrigin-RevId: d913f5624ac7c24ff1a16c19b5889573ab2752e6
2026-09-11 05:38:18 +00:00
Benjamin Carlsson
da20788df9 Bundle Linux voice runtimes and improve audio reliability (#44714)
## Why

Linux voice needs system ALSA plugins and enough buffering to accommodate PipeWire graph cycles without losing capture samples. Voice startup failures also need actionable diagnostics without exposing native error details.

## What changed

- Build and bundle GNU voice helpers and runtimes with primary Linux musl release archives, and sign the archives. Keep Python wheels free of these libraries to preserve `manylinux_2_17` compatibility.
- Discover ALSA plugins in fixed system directories and increase Linux capture and playback buffering to support larger PipeWire graph cycles.
- Report voice failures by stage, preserve negotiation timeout classification, and discard native error sources. Suppress the misleading `requested` closure message after failure cleanup.
- Add explicit Windows MSVC, pkgconf, and CMake toolchain configuration and preserve host architecture in native build environments.

## Testing

Add coverage for Linux release assembly, ALSA plugin discovery, PipeWire capture and playback, classified startup failures, failure cleanup rendering, and Windows build environment handling.

GitOrigin-RevId: d805eace96a669ce3a4489f12e2db6f68f9f7f53
2026-09-11 03:16:01 +00:00
Eric Traut
08e49689b8 Return to the command center after session cancellation or deletion (#44711)
## Why

Deleting a session, canceling an archived session resume or fork, and pressing `Esc` in a conversation open in another app previously exited the TUI. Local daemon and remote connections can instead return to the command center to select another conversation.

## What changed

- Return to the command center after successful deletion on local daemon and remote connections. Shut down side conversations before deletion and clear the deleted thread's local state.
- Return to the command center when an unarchive prompt is canceled, discarding startup input intended for the canceled resume or fork. Keep explicit quit actions and embedded server exit behavior.
- Make `Esc` open the command center from a conversation open in another app. Reselecting that conversation preserves its read-only snapshot and draft; `R` explicitly retries attachment.
- Update deletion confirmation text and keyboard hints to reflect these destinations.

## Testing

Add lifecycle tests for deletion success and failure, side conversation cleanup, unarchive cancellation and quitting, and read-only snapshot preservation. Add snapshots for command center navigation hints and deletion confirmation.

GitOrigin-RevId: 55a96358edb7af73949877a515614943bdc73643
2026-09-11 03:10:55 +00:00
vkg-oai
fc948f8c47 Add a provider for thread-scoped instructions (#44701)
## What changed

- Expose `ThreadInstructionsProvider` through `StartThreadOptions`. Load its snapshot at startup and model-request boundaries, composing it after global instructions and before repository instructions. Empty or blank output clears only the thread contribution.
- Reject thread instructions exceeding 10,000 estimated tokens independently of the repository instruction budget. Allow host-provided instructions without a filesystem source and rename the shared future type to `LoadInstructionsFuture`.
- Retain the provider across warm resumes; require hosts to supply it again for cold resumes and offline forks. Live forks and subagents inherit applied snapshots without inheriting the source thread's provider, including when the parent is unloaded during setup or reload.
- Include thread instructions in guardian reviewer inheritance and reuse decisions.

## Testing

Add coverage for composition and clearing, refresh within an active turn, size rejection before sampling, cancellation-safe refresh, fork and resume behavior, parent eviction, and reviewer reuse invalidation.

GitOrigin-RevId: 7be9a523cbbfd67704067dfd526188dad89a3c88
2026-09-11 01:57:54 +00:00
Alex Ryan
aff3e0db94 Preserve selected profile settings over managed new-thread defaults (#44693)
## Why

Managed new-thread defaults could overwrite model, reasoning effort, and service tier settings from an explicitly selected profile.

## What changed

- Treat effective profile settings as explicit launch choices when applying managed defaults. A profile setting for either `model` or `model_reasoning_effort` opts out of both managed values; `service_tier` remains independent.
- Count a profile setting only when it supplies the highest-precedence active value, so settings shadowed by project configuration do not block defaults.

## Testing

Add regression coverage for profile precedence at startup, session replacement, and background task creation, plus custom-provider profiles, service tiers, unrelated profile settings, and project settings that shadow profiles.

GitOrigin-RevId: 98f036b8b7059bab8598283600dbc6967c71d3e3
2026-09-11 00:59:27 +00:00