Commit Graph
3085 Commits
Author SHA1 Message Date
pakrym-oai c9253c4977 Send base instructions as Responses input messages (#51156)
## What changed

Move base instructions from the top-level `instructions` field into a prefixed `developer` message in `input` for standard Responses requests, matching Responses Lite. Remove the field from HTTP and WebSocket request types and assign instruction messages stable IDs derived from the thread and instruction text.

## Testing

Extend standard and Responses Lite tests to cover instruction message serialization, stable IDs, and resume consistency. Update WebSocket tests to verify that changed instructions trigger a full request without `previous_response_id`.

GitOrigin-RevId: e2de4b8e30a9339377fac133ceda981abd1a112b
2026-10-05 18:52:51 +00:00
jif c8949e55c2 Ignore stale refresh responses in agents overview tests (#51064)
## Why

Aborting a refresh task cannot retract a response already queued for delivery. The test helper could consume that stale response and return before the replacement refresh completed.

## What changed

Make `finish_overview_refresh` skip responses whose request ID does not match the active refresh. Extend the lifecycle test to queue an invalidated response before removing a task, exercising the wait for the replacement refresh.

GitOrigin-RevId: 97341681682e8dce9a9512fbcc1d5c0351b084f5
2026-10-05 09:51:15 +00:00
Eric Traut c2f7fe89d8 Use server model defaults for connected TUI fresh starts (#50913)
## Why

Fresh starts connected to an app server can bootstrap with stale client model settings before reading the server configuration. An empty model catalog can also prevent startup even when managed new-thread defaults provide a model.

## What changed

- Read server configuration before model bootstrap for fresh starts using a local daemon or remote server without an explicit profile.
- Preserve explicit model and reasoning-effort overrides, clear implicit client settings when `config/read` is unsupported, and allow managed new-thread defaults to supply a model when the catalog is empty.
- Use the launch directory for local daemon configuration reads and the server directory for remote reads.

## Testing

Update startup-default tests to cover managed model selection with an empty catalog. Strengthen the reconnect test with a stale client model and an assertion that `config/read` uses the server directory.

GitOrigin-RevId: 8fe1485c6e66c8d46560b34d904ce1724458993a
2026-10-04 16:57:01 +00:00
Eric Traut afb436df8b Honor server reasoning summary defaults in new TUI threads (#50811)
## Why

New embedded TUI threads forced reasoning summaries off when no summary was explicitly configured, overriding the model's default. Client settings could also override the destination server's reasoning summary configuration.

## What changed

Use the same launch override handling for embedded and remote thread starts so server configuration and model defaults determine reasoning summaries. Forward explicit profile and command-line choices for `model_reasoning_summary` and `features.concurrent_reasoning_summaries`, preserving both enabled and disabled values.

## Testing

Extend coverage for model defaults reaching Responses requests, concurrent summary delivery, direct startup, and replacement sessions with profile and command-line overrides.

GitOrigin-RevId: c60e33d077298d7a89d6b95f94b1292c175d6c77
2026-10-04 07:12:06 +00:00
Eric Traut e57fc9ea5a Prune TUI snapshots and consolidate behavior tests (#50808)
## What changed

- Remove redundant snapshot fixtures and selected rendering test cases across the TUI.
- Replace several full-output snapshots with direct assertions on messages, popup state, status indicators, and rendered content.
- Consolidate slash-command aliases, command-prefix selection, category titles, and hook events into shared test loops.
- Use shared snapshots for the setup import prompt and paginated transcript overlay across platforms.

GitOrigin-RevId: 461e30ebaf70ba930d91a135d2fc598ee4f04f27
2026-10-04 06:46:50 +00:00
Eric Traut ab45264919 Preserve review lifecycle ordering on failure (#50804)
## Why

A review can fail before the UI receives the event that enters review mode. Failed-turn completion also needs to preserve the running indicator when a queued `/review` has already been submitted and is awaiting startup.

## What changed

- Emit the review-entry lifecycle before starting the review task, after aborting existing tasks and clearing connector selection.
- When a live failed-turn completion repeats an already handled error, refresh task state only if no user turn is pending startup, and continue processing queued input.

## Testing

Add regression tests for lifecycle ordering on a server-overload response and for preserving the running indicator while a queued review awaits startup after a failed turn.

GitOrigin-RevId: 0f91d3d1a1a983542c54c2686630de9c232321b1
2026-10-04 06:35:16 +00:00
Eric Traut 8f82b8a31c Use the managed daemon for eligible remote-control launches (#50803)
## What changed

Make plain `codex remote-control` start or reuse the managed daemon and enable remote control when daemon auto-start is enabled and the environment is eligible. Fall back to the foreground server when no managed backend is available or Windows restricts detached launch.

Add `codex remote-control --no-daemon` to explicitly run the foreground server, and honor the top-level `--no-daemon` flag. Reject this flag with `start`, `stop`, or `pair`. Keep `--json` and launches with configuration overrides or unsupported environments on the foreground path.

GitOrigin-RevId: cb28ae3f6074993b748660972c3cb7cbf6612c2f
2026-10-04 06:28:20 +00:00
Benjamin Carlsson b8dceb0d4f Open slash commands from empty drafts in Vim Normal mode (#50788)
## Why

Pressing `/` in Vim Normal mode starts a composer search, even when the draft is empty. Allow this key to open slash commands directly on an empty draft.

## What changed

When slash commands are enabled, a standalone `/` on an empty draft switches to Insert mode, inserts `/`, and opens command completion. Preserve Vim search behavior for nonempty drafts, `?`, and pending operators.

## Testing

Add a snapshot test for the Insert mode transition and command picker. Exercise Vim slash-command entry in the transcript overlay test across terminal sizes, and extend command sparkle coverage to Vim mode.

GitOrigin-RevId: 806c2f6b841190ccdc1a258f88dfa590773ba33a
2026-10-04 04:33:42 +00:00
Benjamin Carlsson acf9818fae Remember Command Center grouping across launches (#50786)
## Why

Command Center previously reset to project grouping on startup, losing the user's selected grouping.

## What changed

Save grouping changes to `tui.agents_overview_grouping` in the client’s user configuration and restore the saved choice at startup. Support `project`, `status`, and `model`, with `project` as the default. Report save failures in Command Center while keeping the selected grouping active.

## Testing

Add tests for cycling through and persisting all grouping modes, preserving unrelated settings in a custom configuration file, displaying save errors, and restoring saved grouping during startup.

GitOrigin-RevId: fd56dfecb4b79cfa8439f54420ce58cc0ed66ec7
2026-10-04 04:25:31 +00:00
Eric Traut f365d5754b Restrict TUI MCP startup notifications to owned threads (#50781)
## Why

MCP startup notifications from unrelated threads could create TUI event channels, allowing subsequent approval requests from those threads to appear in the current session.

## What changed

Check the parent of an untracked subagent before accepting its MCP startup notifications. Read thread metadata with bounded retries for threads that are not yet found or loaded, and ignore notifications unless the parent belongs to the TUI.

Share thread ownership checks across notification and approval routing, including side threads.

## Testing

Extend approval-routing coverage to verify that owned subagent approvals are preserved both before thread-start notifications and after MCP startup notifications, while unrelated threads do not create event channels or display approval prompts.

GitOrigin-RevId: 6f78f237f7441aadf10b491ed191357df75c3a6a
2026-10-04 03:51:52 +00:00
Benjamin Carlsson dde5f8c5ae Allow /archive while a turn is running (#50764)
## Why

`/archive` was disabled during a running turn, preventing users from archiving the current session until the turn ended.

## What changed

Enable `/archive` during a running turn and warn in the confirmation dialog that archiving will stop the current turn. Cancelling the dialog leaves the turn running.

## Testing

Extend confirmation tests to cover both idle and running sessions, add a snapshot of the running-turn warning, and verify that cancellation leaves the task running without emitting archive events or operations.

GitOrigin-RevId: c7c530aa671b5f04e5dc2a637e3d27a81d98d8bf
2026-10-04 02:32:39 +00:00
Benjamin Carlsson cd7d9e128c Show unavailable slash commands when searched in side conversations (#50756)
## Why

Side conversations hide unavailable slash commands, leaving users without an explanation when searching for a known command.

## What changed

- Show matching unavailable commands as disabled rows with the reason `not available in a side conversation`. For example, `/arch` now shows a disabled `/archive` entry. Keep these commands hidden from the unfiltered `/` menu.
- Rank available matches first and skip disabled rows during keyboard selection and completion.
- Prevent `Tab` from queuing input when only disabled matches are visible, and insert `/` normally when no selectable command is present.

## Testing

Add a rendering snapshot and regression tests for unavailable command discovery, navigation, available command completion and queuing, blocked queuing of unavailable matches, and slash insertion.

GitOrigin-RevId: 7160b308ca57a24a5dcb6e2686b5248a8eb4b6a7
2026-10-04 01:36:25 +00:00
Eric Traut 3e238776e8 Show model and reasoning effort near the top of task details (#50727)
## What changed

- Display reasoning effort alongside the model in the agents overview, using `Unknown` when unavailable.
- Place model, reasoning, project, and usage information before attention details, activity, and the last message.
- Truncate long model and reasoning values with an ellipsis to keep each on one line.

## Testing

Update overview snapshots for the new layout and extend fixtures to cover a known model and long model and custom reasoning values.

GitOrigin-RevId: 1f36e5e1e0ccf09a851f8982bbbe4fbc7d9c7461
2026-10-03 22:13:55 +00:00
Benjamin Carlsson 447eac3b81 Decode Windows Terminal's mapped Shift+Enter sequence (#50720)
## Why

Windows Terminal's `sendInput` mapping delivers `ESC[13;2u` as individual console key events. Decode it as `Shift+Enter` so the mapping inserts a newline in the composer.

## What changed

- Wrap the Windows event stream with a decoder for the complete Escape-prefixed sequence, including interleaved key releases.
- Use a fixed 50 ms deadline for partial sequences and replay incomplete or mismatched input unchanged. Preserve literal text, paste events, and native key events.
- Update the `crossterm` revision and dependency lockfiles.

## Testing

Add tests for repeated and fragmented mappings, deadline handling, unchanged input, error and end-of-stream replay, and composer newline rendering with a snapshot.

GitOrigin-RevId: 95ab39960510d71322824c63817710633a2fda23
2026-10-03 21:20:56 +00:00
Benjamin Carlsson 3a69ec3ef8 Preserve local Markdown link labels in the TUI (#50695)
## Why

Path-like link labels were collapsed into their destinations, discarding the author's label text and formatting.

## What changed

Preserve nonblank local link labels alongside the formatted destination as `label (target)`, including in tables. Empty or whitespace-only labels show only the destination. Keep destination formatting and fall back to the original destination when a local file URL cannot be parsed.

Render file citations without a label so they continue to display only the formatted destination.

## Testing

Update rendering and transcript-copy tests and snapshots to cover preserved path labels, styled labels, empty labels, malformed file URLs, tables, and Markdown escaping.

GitOrigin-RevId: 2810b70f1ecdc59d7f90fa1b254b1e9069c8fc29
2026-10-03 18:44:14 +00:00
Eric Traut b741e480e2 Allow transcript selection and copying while bottom modals are open (#50564)
## Why

The plan confirmation prompt allowed transcript scrolling but blocked selecting and copying the visible plan text.

## What changed

Allow mouse selection and copying in the visible transcript while a bottom modal is open, preserving drags across redraws. Keep other keyboard input with the modal and suppress transcript link activation, disclosure toggles, and follow-control clicks during modal mouse handling.

## Testing

Extend the plan prompt test to cover selection, `Ctrl+Insert` copying, selection highlighting, and popup bounds. Add coverage confirming that ordinary and Control-clicks do not open links in selection-only mouse handling.

GitOrigin-RevId: 9e1fdfcb4bc18215e62a714f173bc8cb372b090a
2026-10-03 07:45:47 +00:00
Eric Traut 6b43e6fe1f Skip daemon auto-start for Windows-mounted WSL homes (#50555)
## Why

The managed daemon writes an executable and Unix-style state beneath `CODEX_HOME`. Windows-mounted WSL filesystems (DrvFS/9p) do not reliably support the required permission semantics, which can cause startup to fail before the TUI opens.

## What changed

Detect WSL homes on 9p filesystems, checking an existing ancestor when `CODEX_HOME` does not yet exist. Keep the TUI in embedded mode instead of automatically starting the shared background server, and show a startup warning explaining the exclusion.

## Testing

Extend the daemon exclusion warning snapshot to cover the Windows-mounted WSL message.

GitOrigin-RevId: 995e6236d79d8190b0ab1e6b4761eeef3c068467
2026-10-03 07:05:36 +00:00
jackz af5d95f255 Require GovCloud guidance acknowledgment after Bedrock setup (#50510)
## What changed

After successful Amazon Bedrock setup, check whether the configuration uses AWS GovCloud. If detected, show application configuration and security guidance with a terminal hyperlink and require an explicit Enter press to continue. Allow scrolling in short panes while keeping the acknowledgment visible.

Continue onboarding without the warning for non-GovCloud configurations, failed checks, or checks that exceed the 15-second timeout.

## Testing

Add snapshots and tests for the checking and warning screens, explicit acknowledgment, guidance hyperlinks, and scrolling in short panes, including a one-row content viewport.

GitOrigin-RevId: d5d0352af0a50b58e8b8feab5daf75fde428ece7
2026-10-03 03:31:31 +00:00
Benjamin Carlsson 47379efd52 Keep Command Center selection adjacent after task removal (#50505)
## Why

Archiving or deleting the selected task could make Command Center selection jump to the current task instead of a neighboring task in the displayed list.

## What changed

Choose the next surviving task in displayed order before removing tasks, falling back to the previous task when needed. Apply this selection behavior to archive, delete, and hide actions, respecting filtering and grouping.

Preserve the pending selection across view rebuilds, batched removals, and duplicate server notifications. Allow selection to fall back when a rename target disappears while retaining the existing notice about its unsubmitted title.

## Testing

Add regression tests and snapshots for archive/delete selection across project, status, and model grouping, with and without filtering. Cover removal of the attached task, external removal notifications, removal of a pending successor, repeated repaints, and an empty task list. Update the disappeared-rename-target snapshot to verify that the remaining selection is preserved.

GitOrigin-RevId: ca93d664fadbc602993fbdae316c7a375b449345
2026-10-03 03:06:40 +00:00
Benjamin Carlsson d42aecc56b Center TUI confirmations over their retained backdrop (#50504)
## What changed

Render confirmation dialogs as centered overlays while preserving the composer or parent picker behind them. Share dialog sizing and cursor placement across stacked views and full transcript rendering, with input still routed exclusively to the active dialog.

Use the shared confirmation preset for prompts including full access, session archive/delete, goal changes, and log upload consent.

## Testing

Add coverage for backdrop retention and cursor routing at multiple terminal sizes, and for preserving the compact viewport and composer draft after dismissing a confirmation without replaying history. Update confirmation snapshots to show the retained backdrop.

GitOrigin-RevId: 026af89904ec345e2b330317b8cc844512125d0e
2026-10-03 03:00:46 +00:00
Felipe Coury 9ce35d337a Use Enter to accept transcript Find results and Escape to cancel (#50503)
## Why

Accepting a Find result must not let a held `Enter` submit the composer draft, including when terminals report repeated keys as fresh presses.

## What changed

- Make `Enter` accept the displayed result for reading, while `Ctrl+P` and `Ctrl+N` navigate older and newer matches.
- Make `Escape` cancel query editing and restore the pre-search presentation; after acceptance, it returns to the latest transcript content.
- Consume unmodified `Enter` while reading a result, but let modified `Enter` reach configured composer bindings.
- Update footer hints to show acceptance, cancellation, and the active Find state.

## Testing

Extend input-routing coverage for repeated `Enter` presses and modified composer bindings. Update search tests and footer snapshots for acceptance, cancellation, and result navigation.

GitOrigin-RevId: 2a2b7c389240ffa941e3623d7fb7d877455fa9a5
2026-10-03 02:52:56 +00:00
Eric Traut 6c15cc4aaf Use the app-server default output cap for TUI workspace commands (#50477)
## What changed

Remove the fixed 64 KiB output cap from `WorkspaceCommand` and send
`output_bytes_cap: None` in `command/exec` requests so bounded commands use
the app-server default. Preserve `disable_output_cap` for commands that need
uncapped output, including Git diffs.

GitOrigin-RevId: 6f2ed0d127d9ff2317670851894ae4988f7c7508
2026-10-03 01:09:24 +00:00
Celia Chen 604061ce51 Enable Ultrafast service tiers for Amazon Bedrock Astra models (#50472)
## Why

Bedrock catalogs cleared all service-tier metadata, and requests omitted every selected tier. This prevented users from selecting `ultrafast` or using tiers defined in custom catalogs.

## What changed

- Advertise `ultrafast` for `openai.gpt-6-astra` on Mantle and the `global.openai.gpt-6-astra` and `us.openai.gpt-6-astra` Runtime variants, while retaining the implicit default tier unless users select otherwise.
- Preserve custom catalog speed tiers, service-tier definitions, and defaults while continuing to normalize Bedrock web search compatibility.
- Send selected service tiers only when the Bedrock model advertises them, including `flex`.

## Testing

Add coverage for `model/list` tier discovery, custom catalog preservation, configured and per-turn HTTP request tiers, and TUI slash-command selection, toggling, and model switching.

GitOrigin-RevId: 4793e7af7b9f604a6b7812611030da6adb8acd35
2026-10-03 00:31:51 +00:00
Felipe Coury f5a2272c6c Copy transcript selections as literal text while preserving rich HTML (#50467)
## Why

Copying rendered transcript selections added Markdown formatting and escapes to the plain-text clipboard payload. Selecting bold text such as `hello` could paste as `**hello**`.

## What changed

Separate the literal selection text from the Markdown source used to render clipboard HTML. Plain-text copies omit inline formatting delimiters, added code fences, and Markdown escapes while retaining list and table structure. Rich-text pastes continue to preserve formatting through HTML.

## Testing

Update clipboard and transcript selection tests to verify literal text alongside rich HTML, including lists, inline code, paths with Markdown punctuation, hard breaks, streamed code blocks, and tables across layout widths.

GitOrigin-RevId: 980ee2ed0b0e201b581a3a301fa04d796c65af2e
2026-10-03 00:02:11 +00:00
asohrabi-oai 3629508849 Preserve native USD amounts in thread usage responses (#50442)
## What changed

Add optional `native_usage_usd_micros` fields to thread usage totals and breakdown groups, and carry backend values through the client alongside existing credit and USD estimates. Missing or null native amounts remain `None`, while explicit zero amounts remain `Some(0)`.

## Testing

Add coverage for native totals and group amounts, mixed batches with legacy responses, and the distinction between missing, null, and zero native group amounts.

GitOrigin-RevId: 53891fc95807138e2eccb99d4cda1520b857dba4
2026-10-02 22:20:55 +00:00
Benjamin Carlsson c536ffcb18 Add keyboard copy selection to the owned transcript (#50434)
## What changed

- Make `/copy` select the latest completed response directly in the owned transcript. Navigate user messages, code blocks, and blockquotes with arrow keys or `j`/`k`, use `g`/`G` to jump to the ends, and press Enter to copy or Escape to close.
- Highlight selected blocks and keep surrounding context visible during navigation and resizing. Preserve source payloads for code and quotes, including rendered Mermaid diagrams and fenced Markdown tables.
- Pause queued submissions until copy mode closes, and report clipboard results in the transcript footer.

## Testing

Add tests for copy routing, keyboard navigation, highlighting and resize behavior, source whitespace and line endings, clipboard completion, and queued-input resumption.

GitOrigin-RevId: bd4f58ec17568f95d0e91014e5ddba33ca8bd57c
2026-10-02 21:42:23 +00:00
Eric Traut 66561d0301 Allow API-key accounts to use Daybreak in the TUI (#50433)
## What changed

Allow accounts using an API key with the OpenAI provider to access `/daybreak` and Daybreak policy notices. Model availability and the connected server still determine program access.

Use the same eligibility checks for turn submission, continuation, and retries. For API-key accounts, send the selected `cyberAccessProgram` when Daybreak is enabled and omit it when Daybreak is off.

## Testing

Extend session lifecycle coverage to check API-key turn parameters with Daybreak enabled and disabled. Add an API-key `/daybreak` help snapshot and update the signed-out error snapshot.

GitOrigin-RevId: ab6d4313c430f316ef9835d4facb878aab0b9725
2026-10-02 21:40:39 +00:00
Benjamin Carlsson b6903c0669 Preserve terminal hyperlinks in agents overview previews (#50431)
## What changed

Keep Markdown link destinations attached to prompt and last-message previews in the agents overview details pane as text wraps and is clipped. Render visible links as terminal hyperlinks, while keeping truncation ellipses unlinked.

## Testing

Add a regression test and snapshot covering links that span multiple rows, prompt links, and clipped previews with unlinked ellipses.

GitOrigin-RevId: d121e062b197790ce45a70d6d64aadcb181e4dde
2026-10-02 21:28:40 +00:00
Benjamin Carlsson dff5270b29 Clarify Git worktree choices for new and forked conversations (#50416)
## What changed

Label the `/new` and `/fork` picker options “Use current Git worktree” and “Create new Git worktree”. Explain that creating a worktree makes a separate checkout of the repository in another directory.

## Testing

Update picker assertions and snapshots for both commands to cover the revised labels and description.

GitOrigin-RevId: b7fb1aac3107e39c324707f9ae69c210a97346d7
2026-10-02 20:04:57 +00:00
Benjamin Carlsson d61c7a824f Honor pager bindings for transcript page keys (#50396)
## Why

Transcript scrolling hardcoded `PageUp` and `PageDown` to full-page movement, ignoring customized pager bindings.

## What changed

Resolve unmodified `PageUp` and `PageDown` through the pager's scroll bindings so they can scroll by a full page, half a page, or one row, or remain unbound. Preserve the one-row overlap for full-page scrolling and leave pager typing shortcuts unhandled by the transcript.

## Testing

Add a regression test and snapshot covering default, half-page, single-row, and unbound configurations. Verify that `PageDown` reverses `PageUp` scrolling and that `j` and `Ctrl+u` remain unhandled.

GitOrigin-RevId: 945e99d7370f84f326ab71037be2924dddada32c
2026-10-02 18:29:19 +00:00
Eric Traut f88a6efe43 Honor configured keybindings before transcript navigation (#50389)
## Why

Transcript selection can consume a configured composer shortcut such as `ctrl-space`, preventing it from submitting a prompt or steering a running turn.

## What changed

Let explicitly configured shortcuts for active actions take precedence over transcript key handling when no transcript interaction is active. Include global binding fallbacks, while preserving empty `Enter` returning to the latest transcript content and default `PageUp` scrolling.

## Testing

Add regression coverage for `ctrl-space` submission with idle and running turns, default `PageUp` scrolling, and empty `Enter` returning to latest with composer or global submit bindings.

GitOrigin-RevId: 16613043a7634b47fd24e4ee9feacdce94a9fabd
2026-10-02 18:11:50 +00:00
Ian MacLeod 50b4c5e58c Use printable ASCII terminal titles under GNU Screen (#50375)
## Why

GNU Screen truncates Unicode in OSC titles to a byte, which can turn visible characters into control bytes and spill title text into the terminal.

## What changed

Detect Screen through `STY` and convert the full terminal title to printable ASCII. Map activity spinners and the status dot to ASCII equivalents, and replace other non-ASCII content with `?`. Keep Unicode titles outside Screen and preserve Unicode in TUI status rendering.

## Testing

Add coverage for ASCII title output with activity indicators and Unicode names, preserved Unicode outside Screen, and removal of control and invisible formatting characters.

GitOrigin-RevId: e6b45b9be0d06ab3c3eece89885647f3e9db17da
2026-10-02 17:21:14 +00:00
Eric Traut 91168365a5 Render ANSI styles in TUI hook system messages (#50359)
## Why

Hook system messages were rendered as plain text, leaving ANSI formatting uninterpreted.

## What changed

Parse hook system messages into styled spans so colors and text styles render across lines. Preserve hook prefixes, continuation indentation, and trailing blank lines.

## Testing

Add a snapshot test for multiline ANSI styling and style resets, and extend multiline coverage to include a combining character and a trailing newline.

GitOrigin-RevId: 0a5a88ec26fac114fc66efa656bacf6fa15a1adf
2026-10-02 16:45:32 +00:00
Eric Traut 84d5437b6e Keep the subagent picker consistent with thread archive state (#50345)
## Why

Cached subagents can remain in the TUI picker after being archived, including when archive notifications are missed.

## What changed

- Hide archived threads from the picker and keyboard navigation, and restore them when unarchived.
- Refresh both active and archived descendants to reconcile cached visibility, including after dropped server events. Queue a follow-up refresh when needed and preserve visibility changes received during an in-flight refresh.
- Preserve picker selection by thread ID as visible rows change, and mark archived thread attachments as replay-only.

## Testing

Extend regression coverage for missed archives, unarchive notifications, hidden subagent navigation, and the subagent enable prompt when only archived subagents are cached.

GitOrigin-RevId: 9e75906dfe6946b1400583a386922453e2b77ea1
2026-10-02 15:56:32 +00:00
Eric Traut 14a477ea89 Bound tmux option probes to one second (#50219)
## Why

A hung tmux command or a descendant holding stdout open can block terminal input setup indefinitely.

## What changed

Run tmux option probes on a worker thread with a shared one-second deadline, returning default input options when the wait times out. Prevent overlapping probes and kill and reap commands that exceed the deadline.

Capture stdout in a temporary file so completed commands do not wait for descendants to close it, and read at most 4 KiB of output.

## Testing

Add Unix regression tests for successful output, killing and reaping a timed-out command, and returning promptly when a descendant keeps stdout open.

GitOrigin-RevId: a5a4c9323a3e18d1baada5ab1cf3734ce6a9403a
2026-10-02 07:28:35 +00:00
Benjamin Carlsson 37f53199a6 Use the shared text editor for command-center task renaming (#50216)
## What changed

Replace the rename field with a single-line `TextArea` that honors configured editor bindings and the composer's Vim setting. Start renaming in insert mode and support Vim Escape recovery on legacy terminals.

Strip carriage returns and newlines from titles and pasted text, keep Vim linewise pastes inline, and scroll horizontally at grapheme boundaries to keep the cursor visible.

## Testing

Add single-line editor coverage for newline filtering, Vim commands, repeat edits, and inline yanks. Extend command-center tests to cover Vim renaming across status-filter changes and cursor placement in narrow layouts.

GitOrigin-RevId: 8d320d6b6de9f77e18292169418383929ca6ceda
2026-10-02 07:22:28 +00:00
Eric Traut d64360f628 Support Ctrl+Insert for copying TUI selections (#50215)
## Why

Windows Terminal forwards `Ctrl+Insert` when its Copy action has no native terminal selection. Recognize this shortcut so it can copy text selected within Codex.

## What changed

Add `Ctrl+Insert` to the shared copy-key detection used by transcript and composer selections. Use the same detection for transcript input ownership so the selection consumes the shortcut before other input handlers.

## Testing

Extend transcript tests to verify `Ctrl+Insert` input ownership and copying. Extend composer tests and snapshots to verify that failed or unconfirmed copies preserve the selection, while confirmed copies clear it without changing the draft or cursor.

GitOrigin-RevId: 5a33c72cff4c4395511779a7051fc92f8bd5e5d7
2026-10-02 07:21:07 +00:00
Eric Traut 4dd51f4a5f Make transcript mouse scroll speed configurable (#50209)
## What changed

Add `tui.mouse_scroll_speed` as a finite positive multiplier for transcript mouse wheel scrolling, including transcript overlays and session previews. Change the default from three rows to one row per wheel event; set the multiplier to `3.0` to retain the previous speed.

Fractional values accumulate movement across events and discard the remainder when direction reverses. For example, `0.5` scrolls one row every two events. Following the latest output pauses only when a whole row moves.

## Testing

Add tests for configuration validation, integer and fractional scroll speeds, direction changes, decimal accumulation, and following behavior. Extend local settings coverage to include a command-line override for the new setting.

GitOrigin-RevId: d355e246fd943415f0ce5a6affe849f77f3615e6
2026-10-02 06:50:10 +00:00
Eric Traut e3c2a83937 Release stable Markdown tables into scrollback during streaming (#50207)
## Why

Table holdback kept completed tables and subsequent content mutable until the response finished. Releasing completed tables earlier also requires a final scrollback reflow when late reference-link definitions change previously emitted content.

## What changed

- Release table holdback once the containing top-level Markdown block is stable, rescanning the remaining tail for later tables.
- Track completed-block boundaries across incremental and full renders.
- Request scrollback reflow at answer completion when reference-link definitions are present, including definitions pending without a trailing newline.

## Testing

Add regression assertions and snapshots for completed tables entering scrollback while later tables remain mutable, and for late reference-link definitions resolving correctly at completion. Cover reflow requests with and without a trailing newline and reference handling with inline visualizations enabled.

GitOrigin-RevId: a6b2aac74496281495b53840bbb1daf06bef60d2
2026-10-02 06:40:07 +00:00
Eric Traut 3f97f2b3bd Restore the account email in /status after account updates (#50199)
## Why

Account-update notifications include authentication mode and plan information but
omit the email, causing `/status` to lose the signed-in account's email after an
update.

## What changed

Fetch the ChatGPT account email asynchronously after account updates, with a
30-second timeout, without blocking terminal input. Apply the result only if its
request ID is still current, invalidating pending results on subsequent account
updates and disconnects.

## Testing

Extend the account-update test to verify that the email is restored and a stale
result is ignored. Update the status snapshot to include the account email and
plan alongside credits and limits.

GitOrigin-RevId: 202421f78f3d6a7b373194f9c65d1c22d70a04c1
2026-10-02 06:22:31 +00:00
Benjamin Carlsson e7ea5f4a86 Add managed worktree tools to the TUI (#50148)
## What changed

Expose `create_worktree`, `get_worktree_creation_status`, and `list_worktrees` through MCP when the worktrees feature is enabled for a trusted local project and attachment storage is available. Support both embedded and local daemon sessions.

Create worktrees asynchronously and attach them to the requesting task, with ownership and attachments retained across restarts. Default to the repository's remote default branch unless `ref` is supplied. Keep the task's working directory and execution environment unchanged, and leave uncommitted source changes in place.

Reject creation in ephemeral side conversations and explicitly untrusted source projects, reuse pending operations, and reject configured MCP servers that conflict with the TUI tools namespace.

## Testing

Add integration and model-request snapshot coverage for creation, polling, listing, attachment persistence across restart, task isolation, trust checks, namespace conflicts, and worker failure reporting.

GitOrigin-RevId: b6a57e92cf5f6fc51fd6d4028543d6fabaf5ac49
2026-10-02 02:27:25 +00:00
Eric Traut cb6da58876 Use the server permission catalog for TUI permission shortcuts (#50140)
## Why

Permission shortcuts checked local configuration while the picker used the connected server's catalog and requirements. Shortcuts should respect the same server restrictions, including model-specific auto-review requirements.

## What changed

- Share a cached server catalog between the permission picker and shortcuts. Show the loading picker when no catalog is available and reuse an outstanding fetch.
- Clear the cache on session, account, working-directory, or connection changes.
- Give discovery RPCs distinct request IDs for each fetch and profile page so repeated requests after timeouts do not collide.

## Testing

Add coverage for loading and catalog reuse, managed permission restrictions, and refetching after disconnect. Update timeout coverage to verify that repeated discovery attempts use distinct IDs and each reports a timeout.

GitOrigin-RevId: 7d79874294136bfe3a654bb306eb7caf36d4df1e
2026-10-02 01:34:23 +00:00
Ian MacLeod a0a7a63002 Centralize TUI loading glyphs and frame scheduling (#50112)
## What changed

Move the voice connection spinner into shared helpers in `codex-rs/tui/src/motion.rs`, keeping its 100 ms animation cadence and static reduced-motion glyph. The helpers handle frame scheduling, and `loading_glyph_with_delay` supports hiding the animated spinner until a specified delay expires.

GitOrigin-RevId: c4ebe5e6a33239999aab2f4432c9145432c8f4fd
2026-10-01 22:17:51 +00:00
Ian MacLeod 6ece7bfc21 Keep fullscreen prompts bounded and scrollable (#50109)
## Why

Long drafts need to remain browsable while leaving room for the transcript. Remote image attachments also need to leave an editable prompt row visible.

## What changed

- Cap the fullscreen composer, including padding and hints, at two-thirds of the screen, with a minimum of eight rows when the screen allows.
- Support mouse-wheel browsing without moving the caret or changing transcript selection, search, or activity focus. Show arrows for hidden prompt rows and hide the cursor when the caret is offscreen.
- Resume caret following on editor input, paste, and external edits.
- Keep the selected remote image visible while reserving space for prompt text.

## Testing

Add regression tests and snapshots for fullscreen scrolling, caret restoration after navigation, paste and external edits, remote image navigation and deletion, resizing at scroll boundaries, and disconnected editing.

GitOrigin-RevId: 9a1e4ce14b3b3747e6d136207546327531339258
2026-10-01 22:00:12 +00:00
Ian MacLeod e58b493329 Consolidate chat composer footer logic in footer_state (#50105)
## What changed

Move footer property construction, mode resolution, hint overrides, quit shortcut hints, and custom footer height calculation from `chat_composer.rs` into `chat_composer/footer_state.rs`. Preserve existing behavior and expose the moved helpers to the parent module where needed.

GitOrigin-RevId: 4a23753ac1648352ab19d4bcc3da9f368c48f619
2026-10-01 21:49:01 +00:00
ke-oai e4e33a56b0 Enable dynamic tool inheritance for fresh V2 subagents (#50082)
## Why

Subagents spawned without forked history do not receive their parent's client-defined dynamic tools, preventing them from using those tools for delegated work.

## What changed

Add the disabled-by-default `multi_agent_v2_dynamic_tools` feature flag. When enabled, fresh V2 subagents inherit the parent's dynamic tool definitions and persist them in session metadata.

## Testing

Add coverage for V1 and V2 feature gating, tool persistence, and a fresh V2 subagent calling an inherited tool and receiving its result without inheriting parent history. Update TUI assertions and a snapshot to reflect blank-line separation and question text in recovered answers.

GitOrigin-RevId: a17a16bf5570f54ce922c1521cffb883022354f2
2026-10-01 19:45:28 +00:00
Tamir Duberstein b06b7d2f77 Upgrade Windows bindings to windows-sys 0.61.2 (#50058)
## What changed

- Centralize `windows-sys` at version `0.61.2` in the workspace and migrate dependent crates to it.
- Adapt Windows API calls to the updated handle, boolean, and type definitions. Replace custom handle owners with `OwnedHandle` and use `BorrowedHandle` where ownership stays with the caller.
- Add explicit wrappers for non-owning Windows handles passed between threads.

## Testing

Enable the MCP refresh cleanup test on Windows. Retain process handles to verify that a superseded MCP server stays alive during an in-flight call, exits after cancellation, and leaves the replacement running until shutdown.

GitOrigin-RevId: 86f53d9b300d13edff7154f4a7c32e34dacd2919
2026-10-01 18:05:05 +00:00
Ian MacLeod 57a38c1beb Preserve question context in recovered TUI answer drafts (#50052)
## Why

When a turn ends, unsent question answers are recovered into the main composer. Recovering only the answers loses which question each answer belongs to.

## What changed

Prepend each recovered answer with its question title as a Markdown blockquote. Separate questions, answers, and existing composer text with blank lines.

Sanitize question titles and limit them to 512 bytes at a UTF-8 character boundary, adding an ellipsis when truncated. Keep answer text untruncated.

## Testing

Add coverage for bounded titles, multibyte characters, control characters, and multiline question-and-answer submission. Update recovery assertions and snapshots for turn completion, failure, interruption, large pastes, and Vim undo.

GitOrigin-RevId: 141dacfb64bcad5fcabc5be217d2340ef7de1eb5
2026-10-01 17:52:19 +00:00
Felipe Coury 1cc9917508 Keep transcript Find expansion scoped to the current match (#50045)
## Why

Starting Find expanded the entire transcript into detailed mode. Searching hidden content should preserve the compact view and manually expanded activities.

## What changed

- Search full transcript content, including hidden live output, and temporarily expand only the current matching entry.
- Preserve manual disclosure state and retained text revisions while reading or selecting a match. Allow activity controls while reading results.
- Use `Enter` or `Ctrl+P` for older matches and `Ctrl+N` for newer matches, with matching footer hints.

## Testing

Add regression tests and snapshots for selective expansion, manual disclosures, hidden live matches, retained selections across updates and resizing, and Find in compact transcript overlays.

GitOrigin-RevId: 618ee47ba6c3f3a5138c9e3fe0961e7faa3383da
2026-10-01 17:27:03 +00:00
Felipe Coury a97fb78085 Keep transcript Find results readable after closing the query (#50039)
## Why

Closing Find previously restored the pre-search view, making it difficult to read a match and its surrounding transcript context.

## What changed

- Make `Esc` with a nonempty query close query editing while preserving the query, highlighted match, and expanded output. A second `Esc` returns to the latest output; `Ctrl+C` cancels Find and restores the pre-search presentation.
- Allow paging through surrounding context and loading older history without losing the query. Keep `Ctrl+N` and `Ctrl+P` available for match navigation, and reopen Find to edit the retained query.
- Show context above matches when space permits, preserve match layouts across resizing, and display navigation and history status while reading results.

## Testing

Add regression tests and snapshots for retained results, surrounding context, resizing, paging around live output, older-history loading, and footer status. Update interaction tests for the additional `Esc` transition.

GitOrigin-RevId: d822956d3c6ffab88fc1665ebdf0c86ccf110899
2026-10-01 17:22:19 +00:00