Commit Graph
3323 Commits
Author SHA1 Message Date
Eric Traut c2e4631a34 Preserve unrelated side conversations when archiving or deleting threads (#58237)
## Why

Archiving or deleting a thread in the command center shuts down side conversations belonging to other threads.

## What changed

Limit side conversation shutdown to those whose parents belong to the affected thread's known subtree. Proceed once those conversations close successfully, even if unrelated side conversations remain. Continue shutting down all side conversations on exit.

## Testing

Extend the delete lifecycle test to verify that an unrelated side conversation remains open after deletion.

GitOrigin-RevId: f27efcd1fc49cf5c617c9fa454d83eed91ae185f
2026-10-30 04:00:20 +00:00
Abhinav 55c099a142 Keep chats accessible across model provider changes (#58202)
## Why

Switching model providers can hide saved chats from resume lookup or prevent them from opening. Keep their history readable when the server rejects resuming because of a provider mismatch, missing configuration, or policy conflict.

## What changed

- Include all providers in the resume picker, named resume lookup, and `resume --last`, while retaining provider filtering for fork lookup.
- Open chats with provider errors as read-only history and show an explanation with recovery shortcuts: `c` to continue in a new chat, `n` to start fresh, and `Esc` to choose another chat.
- Continuing in a new chat prepares an editable, unsent prompt referencing the saved conversation.
- Preserve drafts and rejected prompts or steers, suppress automatic submission, and retry provider admission when reopening the chat.

## Testing

Add coverage for cross-provider discovery, read-only history, configuration recovery, continuation drafts, rejected input recovery, error rendering, and Escape handling during transcript browsing.

GitOrigin-RevId: 5aaa7a404b9a6231101599adef18d2f1e4a8020a
2026-10-30 00:45:30 +00:00
jamy-OAI 708e3e2c70 Allow providers to opt into Cyber access programs (#58190)
## Why

Cyber access program selection was restricted to the `openai` provider ID, preventing custom providers from accepting explicit program selections.

## What changed

- Add `capabilities.cyber_access_programs` to provider configuration and preserve it through remote thread configuration. Default to enabled for `openai` and disabled for other provider IDs, with explicit overrides taking precedence.
- Use the capability when forwarding `access_programs.cyber` and determining Daybreak availability in exec and the TUI. Refresh TUI eligibility when the server changes the selected provider.
- Preserve authentication, API-key feature gates, and catalog access checks; the capability does not grant program access.

## Testing

Add coverage for capability defaults and overrides, configuration round trips, custom-provider requests with both authentication types, API-key feature gating, compaction, WebSocket response reuse, exec selection, and TUI provider changes.

GitOrigin-RevId: 579f7c33c9e857ff5fedd08311aa8e3129740c1f
2026-10-29 23:24:52 +00:00
viyatb-oai dfcb5b5994 Support managed network requirements under permissions.network (#58182)
## What changed

Allow shared network constraints in `[permissions.network]` in `requirements.toml`, alongside `[permissions.filesystem]`. Apply them throughout configuration loading, network approvals, Windows sandbox policy validation, and `configRequirements/read`, and show their source in `/debug-config`.

Retain `[network_proxy]` and `[experimental_network]`, but reject mixing either with `[permissions.network]`, even across requirements layers. Preserve independent network and filesystem precedence and source attribution, and report unknown nested network fields.

Reserve `network` as a managed requirements table name and reject empty or profile-shaped tables with migration guidance. Profiles named `network` remain valid in `config.toml`. Document that policy publishers must keep using `[experimental_network]` until all readers support the chosen replacement.

## Testing

Add coverage for layered constraints and source attribution, conflicting spellings, profile-name migration errors, unknown-field diagnostics, and cloud validation. Extend API, project discovery, network approval, and Windows policy tests to cover `[permissions.network]`, and verify managed proxy settings remain independent of disabled feature configuration.

GitOrigin-RevId: 994dfca9abf5a7aea914276c0ded8b40d7ed0372
2026-10-29 22:36:06 +00:00
Abhinav 7f1c09979c Expose system proxy support as an experimental setting (#58157)
## What changed

- Add “System proxy” to `/experimental` for opting into macOS or Windows system proxy settings. Keep `respect_system_proxy` disabled by default.
- Update doctor’s macOS proxy guidance to point to `/experimental` and `codex features enable respect_system_proxy`, and tell users to restart Codex after changing the setting.

## Testing

Add snapshots for the experimental setting and doctor guidance, plus a Responses test verifying that `x-codex-beta-features` includes `respect_system_proxy` only when enabled.

GitOrigin-RevId: caa3e1a7cbe222069f35022b06c59da578b8a4dd
2026-10-29 19:16:28 +00:00
Matthew Ma 03b7e22f94 Support pasted search text in the skills toggle view (#58130)
## What changed

Append pasted text to the skills search query and immediately refresh the filtered list. Normalize whitespace for a single-line query and ignore whitespace-only pastes.

## Testing

Extend the filtering test to cover pasting after typed text, verify the rendered search results with a snapshot, and check that whitespace-only pastes leave the view unchanged.

GitOrigin-RevId: fa82d2b5f1c78a7c3a7f61fc2d4f24c94c960386
2026-10-29 17:35:44 +00:00
Ian MacLeod 468b71f7a6 Honor the tooltip preference for TUI startup help (#58127)
## Why

The startup command list was shown even when tooltips were disabled.

## What changed

Show the getting-started help only when `show_tooltips` is enabled. Keep regular tooltips and model-change notices suppressed on the first session event.

## Testing

Extend the first-event test to cover both tooltip preferences and update the startup header snapshot.

GitOrigin-RevId: 7b4a043737053f1a078cb21528dc459f0cfd762b
2026-10-29 17:18:43 +00:00
jif 9cc14e7988 Add managed command checkpoints requiring fresh human approval (#58045)
## Why

Managed command policies need to require a human decision independently of automatic review, hook allowances, and saved approvals.

## What changed

- Support `decision = "prompt-user"` in managed `requirements.toml` prefix rules, requiring a fresh, one-time human decision for matching commands.
- Add experimental `humanCommand` approval requests for clients advertising both `experimentalApi` and `requiredHumanApproval`. Accept only `accept`, `decline`, or `cancel`; reject commands when no capable client is available.
- Restrict responses to capable clients that received the request, and replay pending prompts to compatible clients on reconnect.
- Enable the capability in the TUI and update protocol schemas and client bindings.

## Testing

Add coverage for fresh decisions overriding saved allowances, hook allowances, and automatic review, plus child-thread approval routing and rejection of responses from incompatible or unrelated clients.

GitOrigin-RevId: 0b95ff6aab7f8a04b7298c8a4329d1fddf6a603e
2026-10-29 11:23:51 +00:00
Joe Savona 797bab4746 Add an experimental UI tree renderer for the status line (#57970)
## What changed

- Add the disabled-by-default `tui_extensions_statusline` feature to render configured status items and their picker preview through a shared UI tree renderer.
- Support text, HTTP(S) links, rows, spacers, dividers, and gaps with rendering budgets, text sanitization, and width-aware truncation that keeps the ellipsis outside hyperlinks.
- Use plain text for the extension status line and hide the picker's theme color toggle while preserving the saved color preference.

## Testing

Add coverage for tree serialization and URL validation, Unicode widths, hyperlink clipping, picker previews, color preference preservation, and token usage updates across renderer switches.

GitOrigin-RevId: a6b87c2b1096765d61296d73e142834fcd53ceee
2026-10-29 03:07:15 +00:00
Joe Savona 6c776cfc8c Preserve status-line hyperlinks through footer layout and animations (#57883)
## Why

Footer hyperlinks must follow their text when the status line is truncated or animated. Inferring link targets from underlined cells loses that association, and Unicode width differences can shift links onto the wrong cells.

## What changed

- Carry explicit hyperlink ranges with status-line content through footer layout and reasoning-effort transitions.
- Fit content to the space allocated beside right-hand indicators, keeping the truncation ellipsis outside links.
- Measure and truncate rendered graphemes consistently while preserving source columns for transcript tab expansion.
- Box the composer's footer state to reduce its stack footprint during session navigation.

## Testing

Add regression tests for clipped links after halfwidth katakana and Arabic prefixes, hyperlink positions during effort transitions, and narrow status rows beside the Plan mode indicator.

GitOrigin-RevId: ede62690e191daefc85f38e637f9bcc9796268b7
2026-10-29 02:10:32 +00:00
Benjamin Carlsson e75e4af229 Reuse the cached runtime keymap for default configuration (#57876)
## What changed

Return the cached built-in runtime keymap when `TuiKeymap` matches the default configuration, avoiding repeated keymap resolution. Keep custom configurations on the existing resolution and validation path.

## Testing

Add a startup regression test that edits `config.toml` after the directory-trust read and verifies that `thread/start` uses the updated `service_tier`, including with an embedded app server.

GitOrigin-RevId: 0c079c96cb2925c1367782e289595c637612e2cc
2026-10-29 01:30:00 +00:00
Benjamin Carlsson f9c10053fb Keep resume picker pagination moving across backends (#57862)
## Why

A slow session backend could block further pagination from responsive backends. Sessions arriving later also need to appear in the correct sort order without moving the selection to a different session.

## What changed

- Let each backend continue pagination independently while accepting delayed results from the current listing.
- Distinguish pending backend replies from available pages so search waits for results without issuing redundant requests.
- Ignore rows and errors from previous listings, and update search progress when a backend fails.
- Sort merged sessions globally by the selected timestamp and preserve the selected session and pending page-down distance.

## Testing

Add regression coverage for independent backend pagination, delayed failures, fallback errors, stale listing events, search query changes during loading, and selection preservation when rows are reordered. Update the mixed-backend table snapshot test to ingest sessions in separate batches.

GitOrigin-RevId: 15773717567c634d8b9bf7639c3bfc78369fee03
2026-10-28 23:27:31 +00:00
alexsong-oai f91edce53b Add Google Cloud Vertex AI setup to TUI onboarding (#57857)
## What changed

- Add a sign-in wizard behind `features.gcp_setup_wizard`, disabled by default, to collect a project ID, optional location, and optional credential file. Users can leave the credential file blank to use Application Default Credentials.
- Delegate credential validation and configuration persistence to the app-server, showing progress and allowing retries after errors.
- Share editable single-line fields with Bedrock setup and compact the sign-in menu when terminal height is limited.

## Testing

Add onboarding tests and snapshots covering feature gating, field editing, navigation, validation failures, successful configuration persistence, and compact menu rendering.

GitOrigin-RevId: 96eb31e847aa1c2d503176be68ff2e2efe4722fa
2026-10-28 23:06:34 +00:00
Alex Zamoshchin f5f1d59856 Load TUI plugin mentions from installed plugins (#57855)
## Why

Loading plugin mentions should not fetch the browsable plugin catalog.

## What changed

Use `plugin/installed` instead of `plugin/list` to fetch mention candidates for the current working directory. Update the failure warning to name the endpoint being called.

## Testing

Adapt the existing eligibility test to `PluginInstalledResponse`, retaining coverage that includes active and shared plugins and excludes uninstalled, disabled, and admin-disabled plugins.

GitOrigin-RevId: 9c1bc2b91e25ca11fdfd0391bbc3615986b371c5
2026-10-28 22:53:11 +00:00
Abhinav 7ce5fa7bdc Validate thread providers before resume and input (#57840)
## Why

Existing chats retain their provider configuration when the selected provider changes. Reject resume and input until the configured provider matches the chat, while keeping history readable and allowing recovery after configuration is restored.

## What changed

- Validate saved providers before applying resume overrides, preserving the provider when only model or reasoning settings change.
- Check the current provider selection, including profiles and launch overrides, before accepting input. Reject input when configuration cannot be loaded.
- Return structured `ModelProviderError` data for provider mismatches, missing definitions, and policy conflicts, with generated JSON Schema, TypeScript, and Python types.

## Testing

Add coverage for override bypass prevention, provider restoration, readable history after rejection, and blocked requests sending no inference traffic. Verify schema fields and Python round trips match the error wire format.

GitOrigin-RevId: 051f97c3815c547d8411c71b770df30eae969f68
2026-10-28 21:33:02 +00:00
Eric Traut 78a3185ecb Improve TUI reconnect recovery and offline exit handling (#57820)
## What changed

- Allow `/quit` and `/exit` while offline, exiting without waiting for server shutdown.
- Retry `thread/resume` when the server reports `serverShuttingDown` instead of treating the conversation as unavailable.
- Report which reconnect stage timed out, including waiting for server shutdown, without exposing transport errors that may contain endpoint credentials.

## Testing

Extend regression coverage for offline quit commands and stage-specific timeout messages. Update the reconnect integration test to exercise a draining server and verify that local approval and sandbox settings are preserved.

GitOrigin-RevId: 4f6ed33db809f56ea09fc9423f3ffe28f22b7cc5
2026-10-28 20:12:44 +00:00
Eric Traut 1cc3cf8060 Skip non-regular files when detecting pasted image paths (#57774)
## Why

Probing a pasted serial device or FIFO path for image dimensions can block the TUI input loop.

## What changed

Only probe regular files for image dimensions, leaving pasted device and FIFO paths as literal text.

## Testing

Add a Unix regression test that pastes a FIFO path and verifies it remains editable with Backspace.

GitOrigin-RevId: c9ae3479f8b14920232e75fe6d2cee86c3300bda
2026-10-28 16:15:21 +00:00
jif 6c839b3694 Separate test-only Rust sources from Bazel library and binary inputs (#57741)
## What changed

Add `unit_test_srcs` to `codex_rust_crate` to exclude test-only modules from library and binary sources while making them available to unit tests through `compile_data`.

Configure `codex-core` and `codex-tui` to use this option for their test modules and support files.

GitOrigin-RevId: 437b5ddb75e66a96f3c5cb9b309cb0e2608ba169
2026-10-28 13:53:43 +00:00
Abhinav 727283cea5 Support managed OpenTelemetry configuration requirements (#57649)
## What changed

- Allow `requirements.toml` to manage OpenTelemetry logging flags, tool-result byte limits, environment, and log, trace, and metrics exporters.
- Apply higher-priority managed values over user configuration, replacing exporters atomically and warning when configured values conflict. Preserve unmanaged settings, including `span_attributes` and `tracestate`.
- Expose managed `otel` settings through `configRequirements/read`, apply them in `config/read` without ordinary field origins, and reject configuration writes that overlap managed fields.
- Distinguish omitted tool-result limits from explicit values while preserving the runtime default.

## Testing

Add coverage for requirement precedence, relative TLS paths, override warnings, managed write protection, effective configuration reads, and exporter serialization through the app-server API.

GitOrigin-RevId: 6a3343563bd3acb53a366ea6723684e3d0a4a01d
2026-10-28 05:11:45 +00:00
alexsong-oai 4aa14ea373 Show Bedrock setup for explicitly configured OpenAI providers (#57626)
## Why

Setting `model_provider = "openai"` hid the Amazon Bedrock setup option during onboarding, even though leaving the provider implicit allowed it.

## What changed

Allow the Bedrock setup wizard when the effective provider is `openai`, whether selected explicitly or by default. Preserve the existing feature, authentication, login-method, and embedded app-server requirements.

## Testing

Update onboarding tests to cover explicit OpenAI configuration, continued exclusion of custom providers, and the Bedrock sign-in option with configuration loaded from `config.toml`.

GitOrigin-RevId: 73ca1b43c3be6b098a56ac72f7831e5547947a66
2026-10-28 02:40:06 +00:00
Felipe Coury c0e88f3c04 Disable terminal status sequences on older VTE backends (#57612)
## Why

VTE versions before 0.54 lack the parser that safely ignores unknown OSC sequences. Terminal status reporting needs to account for the VTE backend even when the terminal identifies itself as GNOME Terminal or another application.

## What changed

- Track VTE backend versions independently of terminal application identity.
- Disable `OSC 7501` and `OSC 21337` status reporting when the detected VTE version is below 0.54. Preserve existing behavior for newer or unknown versions.
- Prefer `VTE_VERSION` over the terminal application version, treating empty or malformed values as unknown.

## Testing

Add regression tests for GNOME identity with VTE metadata, version precedence, and status protocol selection around the VTE 0.54 boundary, including unknown versions.

GitOrigin-RevId: 1aa57901d1b1457f9971c07cb51ec4554915ae3b
2026-10-28 01:04:30 +00:00
Benjamin Carlsson fab1a57545 Preserve rich composer content in Vim registers (#57564)
## What changed

- Retain mention targets, image paths, and collapsed paste contents when copying or deleting into the register. Pasting creates fresh element identities and image/paste labels.
- Preserve rich register contents across draft clears and composer replacement.
- Capture `Ctrl+Y` register contents for dot-repeat, restore exact mention bindings through undo/redo, and keep pasted rich objects atomic in Replace mode.

## Testing

Add composer tests and snapshots for repeated rich pastes, register handoff, undo/redo, Replace-mode Backspace, and selection replacement. Add a test ensuring register contents are omitted from debug output.

GitOrigin-RevId: d543d21fd542492af49cce01c2a673e6d3d01664
2026-10-27 21:13:45 +00:00
Benjamin Carlsson 33d306d457 Keep submitted prompts shaded when terminal colors are unavailable (#57554)
## Why

Terminals that do not answer the default-color probe lose the background shading on submitted prompts.

## What changed

Use an ANSI `DarkGray` background as a fallback. Keep the default text foreground when the background's RGB value is unknown, and preserve the red voice marker in terminal history and transcript selections.

## Testing

Add regression coverage for prompt shading without a terminal palette, voice marker colors under both history wrapping policies, and spoken-prompt selection contrast in compact and detailed transcripts.

GitOrigin-RevId: b8217a2ee1d37a2ea4a011faa75427c881202b82
2026-10-27 19:55:40 +00:00
Eric Traut 4c54667b40 Add profile and provider status line items (#57516)
## What changed

Add selectable `profile` and `provider` items to the TUI status line, including setup previews and theme colors. Render them as `profile: <name>` and `provider: <id>`, omitting the profile when unset and the provider until a thread is active. Accept `model-provider` as an alias for `provider`.

## Testing

Extend status line tests to cover omitted values, the active thread's provider, provider updates, and a selected profile. Update the setup popup snapshot to include both items.

GitOrigin-RevId: e7cbb7fb1e7017cfbd6ee71e1df7d0ddb1836ed4
2026-10-27 17:08:08 +00:00
Eric Traut c8e73bf719 Use the native clipboard for WSL SSH sessions with X11 forwarding (#57504)
## Why

Copying in a WSL SSH session with X11 forwarding should use the forwarded display's clipboard instead of writing to the Windows host clipboard.

## What changed

Treat a nonempty `DISPLAY` in an SSH session as X11 forwarding and bypass the Windows clipboard backend on WSL. Keep terminal clipboard forwarding in place.

## Testing

Add a regression test that verifies a WSL SSH session with X11 forwarding uses the native clipboard without invoking the Windows clipboard backend.

GitOrigin-RevId: 29f98dc39e5851d63d0459a55e234346167da26f
2026-10-27 16:22:08 +00:00
Eric Traut f40f3dfeb9 Preserve local image attachments when restoring killed text (#57502)
## Why

Restoring killed text should restore its local image attachments along with their placeholders.

## What changed

Keep image paths in the composer's kill buffer, including across composer replacement, and restore attachments with fresh labels when text is pasted back. Preserve plain-text insertion in Vim Replace mode so per-character recovery continues to work.

## Testing

Add regression coverage for restoring images after submission, transferring the kill buffer between composers, and preserving existing images and Backspace recovery in Vim Replace mode.

GitOrigin-RevId: 9bc052a1b372d5a1245ddc54c7ffafee4a637494
2026-10-27 16:21:15 +00:00
Eric Traut b07a347381 Render escaped percent signs in TUI math (#57501)
## What changed

Recognize `\%` as a literal `%` in inline and display math, so expressions such as `$3.8\%$` render as `3.8%`.

## Testing

Extend inline and display math snapshots to cover escaped percent signs, including an inline expression with multiplication and a fraction.

GitOrigin-RevId: a0f9935dc8492fe1cd5a0d33d62930c48c5433b8
2026-10-27 16:20:45 +00:00
Tom Leach (@toml) 6a6e2fb1f0 Distinguish policy-restricted capacity failures from server overloads (#57452)
## What changed

- Recognize `policy_capacity_unavailable` in HTTP and streaming API errors and expose it as `policyCapacityUnavailable` through the app-server protocol and generated bindings.
- Display “Policy-restricted capacity is unavailable. Please try again later.” while preserving overload retry behavior based on `Retry-After`.
- Handle the new error in TUI overload rendering, reviewer retries, and error telemetry.

## Testing

Add coverage for HTTP and streaming error classification, retry advice, WebSocket terminal error attribution, protocol serialization, and TUI rendering with and without an upstream message.

GitOrigin-RevId: 1b9536fba1e11cc891dcf689aee35410d82f5412
2026-10-27 13:31:38 +00:00
Eric Traut d0f33fab36 Render integral limits and parenthesized matrices in TUI math (#57393)
## What changed

- Stack integral limits above and below the integral in top-level display math, while keeping compact limits in lists and blockquotes.
- Render `pmatrix` environments with centered cells and scalable Unicode parentheses, aligning surrounding math to the matrix midpoint.
- Require spatial layouts, including single-row matrices, to fit the available width; preserve the source when they cannot fit or appear in nested Markdown.

## Testing

Add snapshots for integral limits and matrices, narrow-width fallback assertions, and rejection tests for ragged matrices and mismatched environment endings.

GitOrigin-RevId: 73b589c4422568b90d15f55bf7c9dddec0dccc97
2026-10-27 08:05:46 +00:00
Eric Traut d30fe145fc Drain pending terminal reports before returning to the shell (#57391)
## Why

Terminal reports still in flight when Codex exits can leak into the parent shell's input.

## What changed

Pause terminal event polling during shutdown and flush pending input before restoring normal terminal input mode. On Unix, use a primary device attributes (DA1) reply to wait for outstanding reports after disabling reporting, with a two-second timeout when startup detected DA1 support. During panic unwinding, flush queued input without locking the event reader.

## Testing

Extend PTY tests to cover mouse-report bursts with a split DA1 reply, clean shell input after exit, and queued input cleanup during panic unwinding.

GitOrigin-RevId: 304859b654fb2b2c8882e6cac4cb6522fe05475c
2026-10-27 08:04:25 +00:00
Anthony Tafoya 2cab11ca40 Pin the Rust toolchain to 1.95.0 (#57373)
## What changed

- Replace Rust `1.99.1` pins with `1.95.0` across Cargo, Bazel, CI, release workflows, and Windows setup, and update the Bazel lockfile.
- Adjust Rust APIs, borrowing, and lint-related code for the pinned toolchain, and box MCP tool dispatch to bound compiler async-layout query depth.
- Update the halfwidth sound mark snapshot and allow optional symbol hash suffixes in the code mode host package smoke test.

GitOrigin-RevId: 75460c3d0465dc601811e619bce373a4f7ff2912
2026-10-27 05:52:01 +00:00
Eric Traut 155dde7ff6 Show the selected ChatGPT workspace in /status (#57366)
## What changed

- Return the selected workspace's display name as `workspaceName` in ChatGPT account responses, caching it alongside workspace routing and updating generated schemas and bindings.
- Display a `ChatGPT workspace` row with the name and account ID, falling back to the ID when the name is unavailable or invalid. Refresh workspace details with account identity updates and hide the row for providers that do not use ChatGPT authentication.

## Testing

Update account-response tests to cover workspace names and null values, add workspace details to the status snapshot, and verify that switching to a custom API-key provider hides the workspace row.

GitOrigin-RevId: 4b30ab8a39e1fa7ad1ba7367c5295544be8f6001
2026-10-27 05:22:23 +00:00
Eric Traut 6c0db39b94 Offer safer rewrites after safety blocks in the TUI (#57365)
## What changed

- Show selectable safer follow-ups alongside safety-block explanations, with an option to enable Daybreak when disabled.
- Submit the selected rewrite in a verified fork before the blocked turn, preserving the original chat's draft and current model settings. Mark the new turn with `safety_recourse_follow_up`.
- Filter suggestions that could invoke commands, skills, apps, or plugins, and suppress recourse for unsupported servers and non-primary threads.

## Testing

Extend coverage for fork history, draft preservation, model selection, turn metadata, suggestion filtering, and the Daybreak picker.

GitOrigin-RevId: 49052df6301b6bfbba07262d40b007dcf97bb7c9
2026-10-27 05:17:43 +00:00
Eric Traut 118aae2a5f Explain safety policy blocks with turn-scoped recourse in the TUI (#57363)
## What changed

- Handle `TurnModerationMetadata` for the active turn, showing a temporary block notice while an explanation is pending.
- Validate safety recourse metadata and render topic-specific explanations with safer ways to continue for biological and cybersecurity policy blocks. Apply the explanation only when the terminal policy error matches its domain; otherwise retain the existing error handling.
- Queue input while recourse is pending and preserve prepared images when queued messages are submitted.

## Testing

Add an integration test covering biological and cybersecurity blocks, the loading notice, and fallback for a mismatched policy error, plus a snapshot of the cybersecurity explanation. Extend queued-image coverage to verify submission succeeds after the original image file is removed.

GitOrigin-RevId: dd9ca57cf3b2d842e3deb8aff5d7c3c73a92e14d
2026-10-27 05:15:31 +00:00
Benjamin Carlsson b7f7e7f7e8 Separate TUI session resume preparation from activation (#57342)
## What changed

Split saved-thread resume into preparation and activation. Preparation resolves configuration and attaches to the destination thread before activation replaces the displayed conversation.

Keep stored-backend configuration and local settings separate from active settings during preparation, while retaining the existing eager settings refresh for active-backend resumes. Use the destination backend for working-directory, permission, and directory-trust checks.

Carry the backend identity in the prepared result and reject activation through a different backend before changing the active conversation or composer.

## Testing

Extend coverage for preserving active settings and composer drafts during preparation, rejecting activation through another backend, applying destination remote-permission checks, and retaining active-backend settings refresh behavior.

GitOrigin-RevId: 7171f1abcf4bdd62793c21232a8b895bb809cf70
2026-10-27 04:09:04 +00:00
Benjamin Carlsson b01148de59 Keep failed subagents from marking tasks as needing attention (#57315)
## Why

A subagent failure ends its work without requiring user action, but the agent command center treated it as needing attention and promoted its parent task into the `Needs you` group.

## What changed

Classify failed subagents as inactive when computing task groups and selecting details. Recognize subagents by either a parent thread or a subagent session source, including background workers without a parent.

Keep approval and user-input requests from descendants actionable, even beneath a failed agent. Show these requests as `Needs input` rather than `Error` when the displayed task is a failed subagent. Errors in non-subagent tasks continue to require attention.

## Testing

Add and update regression tests and a snapshot covering stable ordering after subagent failures, idle parents staying ready, failed background workers, and pending requests beneath failed agents.

GitOrigin-RevId: 1a06d5d00c08bb77c9ed36aadffd5e0514f0b2c6
2026-10-27 00:29:59 +00:00
BOZHANG-OAI 126a0ee92e Add GPT-6.1 Terra to model catalogs (#57293)
## What changed

- Add `gpt-6.1-terra` to the bundled catalog and GCP Vertex model picker.
- Add `openai.gpt-6.1-terra` to Amazon Bedrock catalogs, including Global and US cross-region runtime variants.
- Use `gpt-6.1-terra` as GCP's preferred memory consolidation model.

## Testing

Extend catalog, model picker, thread startup, and Vertex request tests to cover GPT-6.1 Terra.

GitOrigin-RevId: edb3be3c4286c191349cdee742005ed3c67029e8
2026-10-26 22:13:14 +00:00
Ian MacLeod b52a272cff Render async questions and replies with Markdown in the TUI (#57292)
## Why

Async question replies appeared as plain user text, leaving Markdown formatting literal and repeating the full question above each answer.

## What changed

- Accent question titles with a `?` prefix while preserving Markdown in titles and suggestions.
- Render replies with a `↪ Re:` question caption and a Markdown answer. Limit captions to two rows with an ellipsis on overflow, while keeping answers complete.
- Apply the same rendering to live messages and loaded transcripts, preserving inline styles, hyperlinks, and Markdown when copying selections.

## Testing

Add snapshots and assertions for matching live and loaded transcript rendering, plus tests for caption clipping, hyperlink bounds, Markdown copying, partial selections, and whitespace-only or nonprinting answers.

GitOrigin-RevId: 0290d8a2ebfb42bd5d7374c7037cde5ae8a13b5d
2026-10-26 22:12:07 +00:00
Ian MacLeod a014908c50 Represent user message presentation with an enum (#57291)
## What changed

Replace `UserHistoryCell`'s `spoken` boolean with `UserMessagePresentation`, defaulting to `Plain` and using `Spoken` for speech transcripts. Route rendering checks through `is_spoken()`, preserving the existing prompt styling and whitespace handling.

GitOrigin-RevId: d0683a2b536a7d71f68fd9a089e6839d0ab0cc65
2026-10-26 22:11:27 +00:00
viyatb-oai 136d891a94 Support network_proxy in managed requirements (#57286)
## What changed

Accept `[network_proxy]` in `requirements.toml`, retaining `[experimental_network]` as a compatibility alias. Reject both names in a single layer and normalize them before merging across layers so precedence and source tracking are preserved.

Honor the new spelling during credential broker project discovery, display `network_proxy` in debug configuration, and update diagnostics and documentation. Document the distinction between managed requirements, proxy feature configuration, and permission profiles. Policy publishers must keep using `[experimental_network]` until all clients and policy validation layers support the new spelling.

## Testing

Add coverage for alias equivalence, duplicate rejection, cross-layer precedence and sources, and broker project discovery. Exercise both spellings in proxy configuration, network approval routing, app-server requirements responses, and Windows machine policy validation.

GitOrigin-RevId: 5c5bb82bd4b6b1431aa97f27248775820eae6302
2026-10-26 22:05:00 +00:00
Ian MacLeod f9c4c3c9a9 Let the terminal handle links in expanded questions (#57285)
## Why

Mouse capture prevents the terminal from handling link-opening gestures in expanded questions.

## What changed

Disable mouse capture while questions are expanded and the TUI owns the screen, unless an interactive modal is active. Restore the default capture policy when questions collapse.

## Testing

Add a regression test covering expansion, collapse, non-owned screens, and link visibility with warnings open.

GitOrigin-RevId: 1fd37feb5c9cd374b492218eeef8c80316bb1cf9
2026-10-26 22:04:03 +00:00
Ian MacLeod a3eabbbbf9 Express TUI mouse capture as an explicit policy (#57284)
## What changed

Replace screen-specific `OverlayInput` variants with `MouseCapture::{Inherit, Enabled, Disabled}` and rename the setter to `set_mouse_capture`.

Preserve existing capture behavior: transcript and usage overlays enable capture, onboarding and static pagers disable it, and the inherited policy follows screen ownership. Update the alternate-screen and lifecycle tests to use the new policy.

GitOrigin-RevId: 965a3bb6d0854e289d2b0dbeedbf2b252b98293d
2026-10-26 22:03:39 +00:00
Eric Traut efab30992b Promote rounded token counts to the next compact unit (#57282)
Compact token counts can round to `1000K`, `1000M`, or `1000B` near unit boundaries. Promote these values to the next suffix so, for example, `999,500` tokens displays as `1M` instead of `1000K`.

GitOrigin-RevId: 803e7c8c8eebd61522fb717275b43904a5da056f
2026-10-26 21:57:34 +00:00
Eric Traut 812d9a3e9a Enable agents navigation for remote App Server sessions (#57281)
## Why

Remote App Server sessions support the command center, but the empty-prompt Left shortcut and its footer hint were enabled only for local daemon sessions.

## What changed

Enable the shortcut and `← for agents` hint for remote sessions. Centralize command center availability in `AppServerTarget::supports_command_center()` and use it consistently across navigation, lifecycle handling, trust prompts, and command center actions. Embedded sessions keep command center support disabled.

## Testing

Extend navigation coverage to verify the footer hint and opening the agents overview for both local daemon and remote sessions, while keeping navigation disabled for embedded sessions. Add a remote-session footer snapshot and update related UI tests to use the shared capability flag.

GitOrigin-RevId: 8148812217f68cf0fd441c35ed3c5b466ecc9cbd
2026-10-26 21:56:47 +00:00
Ian MacLeod 7077b1edb9 Enable text selection and mouse scrolling in the warning viewer (#57271)
## What changed

- Allow selecting warning text while preserving wrapped URLs and hard line breaks when copying.
- Add mouse-wheel scrolling within the warning body and keep page navigation working after selection.
- Use the shared menu surface and show configured scroll hints only for directions with more content.
- Preserve painted backgrounds when rendering text selections.

## Testing

Add coverage for warning selection without changing the draft, paging after selection, wheel scrolling and directional hints, and selection boundaries in scrolled text containing tabs and wrapped words. Update warning panel snapshots.

GitOrigin-RevId: c4b77277a60b7b4af92043cb3761769ddc636454
2026-10-26 21:36:05 +00:00
Eric Traut fcb3ba7558 Record reasons for embedded TUI starts (#57268)
## What changed

Emit `codex.tui.embedded_start` when the TUI successfully connects to an embedded app server, with a `reason` tag identifying daemon exclusions, disabled auto-start, failed daemon connections, or agent startup without a discovered daemon.

Distinguish `--search` from other configuration overrides when it is the only configuration exclusion preventing daemon use.

GitOrigin-RevId: b837ad2e83af17ea92392ffa6d5f91108ceaeecc
2026-10-26 21:30:15 +00:00
Benjamin Carlsson 654b2ec1f5 Keep cloud conversation settings server-owned in the TUI (#57267)
## Why

Cloud conversations own their execution settings and workspace. TUI requests must preserve those settings instead of overriding them with local configuration.

## What changed

- Add a distinct cloud parameter mode that omits local execution settings from thread start, resume, and turn requests, including misalignment continuations.
- Route cloud model and reasoning selections through `thread/settings/update`, requiring server acceptance rather than falling back to local changes or saved defaults.
- Use server model defaults and tolerate an unavailable `configRequirements/read` method during cloud bootstrap.
- Skip local tool setup and TUI-generated titles, and report that permission selection, forking, and conversation recaps are unavailable for cloud conversations.

## Testing

Add regression coverage for cloud request parameters, bootstrap without configuration requirements, rejected model changes, and suppression of unsupported requests.

GitOrigin-RevId: a2dafb6c8a6b0db8607575e2291fee739c2fb2b1
2026-10-26 21:28:54 +00:00
Eric Traut c93a54e164 Show effective processing tiers in TUI status surfaces (#57265)
## What changed

- Make the `fast-mode` status line and terminal title items show the current model's processing tier name, falling back to `Standard`, instead of `Fast on` or `Fast off`.
- Share tier label resolution with `model-with-reasoning`, including `Flex` for configured providers other than Amazon Bedrock, and remove the ChatGPT account requirement for displaying tier names.
- Refresh model-dependent surfaces when Fast or Ultrafast mode is enabled or disabled.

## Testing

Update status surface tests and snapshots to cover tier selection, feature toggles, model changes, and provider-specific `Flex` fallback behavior.

GitOrigin-RevId: 7d67ae6177bb1b3c0be4ecf0910106aaaf2bd0be
2026-10-26 21:21:23 +00:00
Ian MacLeod 81cbc26ee3 Render Markdown in TUI async question choices (#57259)
## Why

Async question titles support Markdown, but named choices display Markdown syntax as plain text.

## What changed

Render named choices with Markdown styling and terminal hyperlinks, wrapping them to the available width after the numbered prefix. Use the rendered rows for height measurement and scrolling, and reuse layout measurements for the option tip.

Share viewport-aware Markdown rendering between question titles and choices, preserving hyperlink destinations when splitting overwide tokens.

## Testing

Extend tests to cover Markdown-aware height measurement, italic styling, and terminal hyperlinks in selected choices. Update the long-choice snapshot to show text starting beside its numbered prefix.

GitOrigin-RevId: 7a1292ac7dff16b55439888d569fc7fa7c6ef689
2026-10-26 21:14:35 +00:00
jif f358635d8e Show native dollar thread usage for ENT26 plans (#57251)
## Why

ENT26 plans are billed directly in dollars, so credit estimates and credit-weighted breakdowns do not describe their thread usage.

## What changed

- Expose optional `nativeUsageUsdMicros` in app-server `ThreadUsage` responses and generated schemas and SDK types. Missing native usage means unknown, not zero.
- Enable ENT26 usage fetching and display native dollar amounts in `/status`, the status line, terminal titles, and the agents overview. Hide credits and omit credit-weighted `/status` breakdowns for these plans.
- Use native dollar amounts when tracking post-turn usage settlement for ENT26 plans.

## Testing

Add coverage for native usage forwarding, ENT26 billing displays, and settlement polling with stale, missing, or zero dollar amounts.

GitOrigin-RevId: ca8ea98141a66bdf0a27feb9f58f67822b821f5f
2026-10-26 20:54:35 +00:00