Commit Graph
3335 Commits
Author SHA1 Message Date
Charlie Marsh 1f0290c607 Broadcast thread section changes to connected clients (#58380)
## Why

Clients need to refresh section membership and ordering when another client moves a thread.

## What changed

Broadcast `thread/section/changed` after a successful `thread/section/move`, including moves within the same section. Send the response before the notification, and include `threadId` and the destination `sectionId`, using `null` for removal. Failed moves do not emit the notification.

Add the notification to the protocol schemas, TypeScript exports, and Python SDK models and registry, and document its behavior.

## Testing

Add a WebSocket integration test with separate writer and observer clients covering section insertion, reordering, removal, and a failed move.

GitOrigin-RevId: 128ba7eddc9aae8e3bac766f47e4a2c55c64a6a5
2026-10-30 16:09:46 +00:00
Eric Traut f752c97f7d Allow inline patch review during approval prompts (#58281)
## Why

Collapsed patch details should remain accessible while an approval prompt is open, and reviewing them should not leave the transcript stuck behind new output after approval.

## What changed

Allow clicking transcript disclosure controls while a modal prompt is open. When expanding details during patch approval interrupts following the latest output, resume following once that approval ends or advances to another patch. Preserve manual scrolling and text selection instead of automatically jumping to the latest output.

## Testing

Extend patch approval coverage with an inline expansion snapshot and checks for queued approvals and subsequent output. Add a regression test that preserves manual scroll position when approval ends.

GitOrigin-RevId: 249aa6bb2a84364a8cb111454fa5b6a3dce218b3
2026-10-30 08:03:51 +00:00
Benjamin Carlsson eab2603712 Reuse connected backends in the in-app resume picker (#58280)
## What changed

- List sessions from listening backends and the displayed session's backend using their existing connections.
- Give picker views distinct request ID namespaces while keeping connection ownership and event handling with the live sessions.
- Start multi-backend listings without a working-directory filter, since local and remote workspaces cannot share a single path filter.

## Testing

Add coverage for distinct picker request IDs, preserving the live event stream after picker shutdown, listing all providers after a provider switch while retaining the remote working-directory filter, and clearing the pending cursor when a source fails late.

GitOrigin-RevId: a0b8780e1f86dc187f088080d9213afe8e18f77f
2026-10-30 07:57:06 +00:00
Eric Traut 788b9d7bf6 Recognize Rex terminals and enable Kitty graphics for pets (#58270)
## What changed

- Detect Rex from `TERM_PROGRAM=rex` or `TERM=xterm-rex` and report its name in terminal diagnostics.
- Enable Kitty graphics for pets in Rex.
- Use the detected terminal identity for Rex's label-only web links, extending that behavior to detection through `TERM`.

## Testing

Add Rex detection coverage for both environment variables and include Rex in the web-link rendering and Kitty graphics support tests.

GitOrigin-RevId: b237e8a6b3af50a55080573dc1e0badc2c139b42
2026-10-30 07:11:56 +00:00
Matthew Ma 5e769a1cda Preserve transcript history when clearing the terminal with Ctrl+L (#58266)
## Why

`Ctrl+L` discarded the retained transcript along with the terminal display, making earlier exchanges unavailable in the detailed transcript.

## What changed

Keep earlier exchanges accessible through `Ctrl+T` while starting a fresh terminal display with a new header. Treat that header as the boundary for compact scrolling, pinned prompts, and resize replay so cleared content stays hidden in the normal view. Allow the detailed transcript to load older history after clearing.

## Testing

Extend the `Ctrl+L` regression test and add a detailed-transcript snapshot covering retained exchanges, draft preservation, older-history loading, and cleared-content visibility after resizing and replay.

GitOrigin-RevId: f1eb73e903a7957cedafb52678c607858fb2d77f
2026-10-30 06:54:13 +00:00
Eric Traut d7b77a5e74 Show unread sessions and acknowledge viewed transcripts in the picker (#58264)
## What changed

- Show a blue unread dot in both session picker layouts using backend read states.
- Acknowledge the transcript's observed revision after rendering it in a focused terminal, then update the unread indicator from the response.
- Key cached transcripts by backend and thread, reload them when unread revisions differ, and ignore canceled transcript results.
- Include turn errors in transcripts.

## Testing

Extend picker tests to cover unread indicators, selection colors, acknowledgments after rendering, and turn error display.

GitOrigin-RevId: edad152ed3f7086dfd3b2e8245d62febc5c9322b
2026-10-30 06:45:04 +00:00
Eric Traut 025f6d715d Show unread results in the TUI command center (#58263)
## What changed

- Display blue filled dots for unread results and gray hollow dots for read idle tasks, preserving status text on narrow rows.
- Load unread state with thread listings and update markers from read-state notifications and refreshes.
- Acknowledge the observed receipt revision when a conversation is rendered in a focused, unobstructed view, including read-only snapshots, without clearing newer results.

## Testing

Extend rendering snapshots and tests for stale unread markers and read-only snapshot receipts.

GitOrigin-RevId: 2dc676c3ffe1e887a5bbf131c88891057386ffc8
2026-10-30 06:43:51 +00:00
Eric Traut 8b5ce2fd61 Add local image thumbnails to the TUI composer (#58261)
## What changed

- Show draft attachment thumbnails in reference order in inline and fullscreen views on supported terminals with local workspaces. Display a `+N` count for attachments that do not fit, and preserve editable image references when previews are unavailable or space is limited.
- Refresh previews when attached files change, apply image orientation metadata, and clear frame graphics before terminal handoffs, screen switches, and shutdown.
- Finish CLI subcommand dispatch before polling interactive TUI events.

## Testing

Add a regression test and snapshot covering thumbnail order, overflow, resizing, attachment deletion, file replacement, and fallback behavior in both inline and fullscreen views.

GitOrigin-RevId: 1ea7c89e089cecc390e145c1790b6ede8bad8d5e
2026-10-30 06:37:32 +00:00
Eric Traut d5cbb90b72 Reuse LocalImageAttachment throughout the TUI composer (#58260)
## What changed

Replace the duplicate `AttachedImage` type with `LocalImageAttachment`. Return borrowed attachment slices and move attachment vectors directly when taking submissions or capturing history-search drafts, avoiding conversion and cloning. Use `local_image_paths()` in request-user-input and MCP elicitation drafts to copy only the paths they need.

GitOrigin-RevId: b19451f633a479893fc97b8e2b51eb6b38838235
2026-10-30 06:36:20 +00:00
Eric Traut 536ae056ee Enable TUI task tools for embedded app-server sessions (#58240)
## Why

Embedded app-server sessions disabled task tools and exposed only worktree tools through MCP, preventing tasks from using tools such as `set_thread_title`.

## What changed

- Expose task tools and available worktree tools together under the `codex_tui` MCP namespace, replacing the embedded session's `codex_worktrees` namespace.
- Allow embedded sessions to dispatch `codex_tui` dynamic tools when MCP is not configured, while retaining the MCP requirement for delegation tools.
- Persist local task-tool reference capabilities for embedded sessions as well.

## Testing

Update coverage for embedded dynamic-tool namespace dispatch and task-tool availability after starting and resuming threads. Extend the model-driven worktree test to rename another task through `set_thread_title` and snapshot the combined MCP tool set.

GitOrigin-RevId: 31f37df69b4e86045953cad418a95c04cd1f35ec
2026-10-30 04:01:34 +00:00
Eric Traut bf877af418 Enable the agent command center in embedded mode (#58239)
## Why

The agent command center previously required a shared background server, preventing embedded sessions from opening it and rejecting `codex agents --no-daemon`.

## What changed

- Allow `codex agents --no-daemon` to use an embedded app server and open the command center without a shared server.
- Route `codex agents` through the normal daemon startup, eligibility, and compatibility checks, including embedded fallback where applicable.
- Return embedded sessions to the command center when canceling directory trust or archived-session confirmation.

## Testing

Add CLI coverage for `--no-daemon` before and after `agents`, plus an integration test that verifies embedded mode is used even when a daemon is running. Update archived-session tests to expect cancellation to return to the command center.

GitOrigin-RevId: 3bdf18a00456eae2e4d38103d12126e039d44119
2026-10-30 04:01:11 +00:00
Eric Traut 7689f21b79 Enable the agent command center for embedded sessions (#58238)
## Why

Command-center navigation required a shared app server, leaving embedded sessions without the same way to switch between chats. Archiving or deleting an embedded session also exited the TUI.

## What changed

- Enable command-center navigation and session listing for embedded sessions, including navigation from read-only conversations and the safety precaution menu.
- Return to the command center after archiving or deleting a session.
- Retain thread subscriptions when forking, including on embedded servers.
- Confirm before quitting an embedded server would stop running sessions or side conversations.
- Construct large startup and event-loop futures outside their callers' stack frames before boxing them.

## Testing

Add regression coverage for embedded session switching with background approvals and draft restoration, plus confirmation before quitting with a running side conversation. Update navigation, archive/delete, fork, and UI snapshot tests for the new behavior.

GitOrigin-RevId: 96bac48cccf85b685b58934d23dd1db93b663751
2026-10-30 04:00:47 +00:00
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