Commit Graph
3686 Commits
Author SHA1 Message Date
Eric Traut 6755b0d25a Use session permission profiles for local /diff (#63400)
## Why

`/diff` runs Git through standalone app-server commands, so it can pick up
the server's default permissions even when the active session uses a
different profile.

## What changed

- Use the session's named profile for all Git commands when the local daemon
  can resolve it for the session's single workspace root. Use server defaults
  when the profile depends on session-only settings or the workspace cannot
  be represented by the command's working directory.
- Disable Git transports and lazy fetching for profiled diff commands.
  Surface repository discovery errors under the selected profile.
- Display asynchronous diff results only when both the thread and working
  directory still match.

## Testing

Cover profile fallback after reattaching to a live thread, missing blobs
without lazy fetching, and stale results from another thread or directory.

GitOrigin-RevId: be8259d8d7af536c2d542d2edce2c601ed4482d0
2026-11-23 18:26:30 +00:00
jif 699889ecb3 Remove the redundant TUI test for default collaboration mode (#63396)
`collab_mode_applies_default_preset` already checks that submitting a
message sends a user turn with `ModeKind::Default`. Remove
`collab_mode_is_sent_after_enabling`, which repeats that assertion after
explicitly enabling collaboration modes.

GitOrigin-RevId: 44e27b989d3106988a629be3ff0002d53554251e
2026-11-23 18:13:25 +00:00
jif a3fd52a61d Remove the disabled-app mention popup test (#63392)
GitOrigin-RevId: efb85449bb79f6bffe10813c4b36b7fd47add159
2026-11-23 18:02:10 +00:00
Felipe Coury 0c7efeb50d Show and copy file paths from TUI sidebar previews (#63388)
## Why

The sidebar file chooser can show and copy paths, but an open preview
has no equivalent shortcuts. The full path is especially useful when
a file fails to load and the user needs to locate it.

## What changed

Press `p` to show the full path in a scrollable view or `c` to copy
it from a sidebar preview, including when the file fails to load.
The preview reports clipboard status and can reveal the path when
copying fails or cannot be confirmed. `Esc` dismisses the path view
and returns to the preview.

Wrap long paths at directory separators where possible in both the
preview and file chooser, and let preview footer hints wrap across
two rows when space permits.

## Testing

Cover path reveal for a missing file, remapped list shortcuts in the
path view, and footer hints when a pager binding takes precedence.

GitOrigin-RevId: 480636c91a7bd7b0eb0b814dac62ce8ec9a6d783
2026-11-23 17:45:25 +00:00
Eric Traut 69a470755d Render terminal progress redraws in TUI command output (#63278)
## Why

Commands often update progress in place using carriage returns and ANSI
erase-line sequences. Treating those writes as ordinary text can leave
stale progress visible, and treating each streamed chunk as a line can
split a single update in `/ps`.

## What changed

Resolve redraws into the visible row before laying out live and completed
command output or rendering transcript entries. Preserve the unwritten
suffix on a shorter overwrite, honor line erases, and retain ANSI styling
for the text that survives. Buffer partial rows across output chunks so
`/ps` shows the latest visible lines as plain text.

## Testing

Cover split escape sequences and CRLF, styled and wide-character
overwrites, and redraws after the live output byte limit. Check that live
and completed previews agree and that replayed background terminals and
historical command fallbacks show the resolved text.

GitOrigin-RevId: cabb3d33442fbf119e23a12b2c66cb62d88bd06c
2026-11-23 07:31:49 +00:00
Anton Panasenko 794584993e Cancel folder trust prompts when the app server disconnects (#63262)
## Why

A daemon restart can invalidate the connection while a folder trust
prompt is open. A queued confirmation can otherwise still be handled
against that closed connection.

## What changed

Dismiss the folder trust prompt when the connection closes, giving the
disconnect priority over queued input. Leave the disconnect event for
the Agents overview to handle. During startup, exit with a message
asking the user to restart Codex.

## Testing

Add tests for daemon restarts during folder consent in the Agents
overview and at startup. Both check that the restart leaves the trust
setting unset. A unit test checks that disconnect wins over queued Enter.

GitOrigin-RevId: 21ee1ca625ed8bc2266a9a37a260254d4e87369d
2026-11-23 04:58:33 +00:00
Anton Panasenko 326bac6ce0 Show available slash commands in the disconnected TUI (#63258)
## Why

When the TUI loses its app server connection, users can still run
local commands, but the slash menu gives them no way to discover which
commands are available.

## What changed

Typing `/` while disconnected opens a navigable menu of local commands.
Searching for a server-dependent command such as `/model` shows it as
disabled and explains that it requires a server connection. The full
menu returns on reconnect.

While disconnected, the diagnostics command shows the thread ID when available and
explains that sending a report or saving a ZIP requires reconnecting.

## Testing

Add snapshots for the disconnected menu and disabled search results,
and regression coverage for selection across redraws, completion,
catalog restoration, draft preservation, offline diagnostics, and `/q`.

GitOrigin-RevId: 835e66ad7e436227f28f62708760c91185d1b3ec
2026-11-23 04:34:46 +00:00
Benjamin Carlsson 1b0b42bfca Render flushed TUI input in the same frame (#63233)
## Why

The TUI skipped the frame that flushed buffered input, so pasted text
and pending Vim replacement keys only appeared on a follow-up redraw.

## What changed

Refresh startup recovery after a flush and render in the current frame
once all editors have finished buffering. If an editor is still
buffering, defer rendering and schedule another tick.

## Testing

Update the multiline paste test to require the text to appear on the
first draw after the paste timeout. Update the startup recovery test to
check that committing a pending Vim replacement key allows that frame
to render.

GitOrigin-RevId: 8c92f075aa2c9ada3b60ecdf83b1f677ffd52f1a
2026-11-23 01:51:00 +00:00
dob-oai 9e3479e00a Keep turn diff updates out of the TUI replay buffer (#63218)
## Why

Repeated turn diff updates can fill the bounded replay buffer with large
payloads and evict events needed to restore the thread. The updates only
refresh the status line, which thread replay already refreshes after
rebuilding the chat widget.

## What changed

Skip `TurnDiffUpdated` notifications when storing events for thread replay.

## Testing

Extend the replay buffer regression test with repeated 1 MiB turn diff
updates. The test checks that the store retains the pending approval and
active turn.

GitOrigin-RevId: 371bb1fc989bbb61c498840896779c5ff6479fdf
2026-11-23 00:56:11 +00:00
Benjamin Carlsson 44848822b1 Automatically resume disconnected cloud conversations in the TUI (#63211)
## Why

A dropped cloud stream can leave the displayed conversation without replies
that were saved while the terminal was disconnected.

## What changed

Reattach the displayed cloud conversation in the background when no user turn
is pending or running and no question answers need to be restored. Keep the
draft and queued messages while sending is paused. Check that paginated
history is complete and includes the conversation already shown before
applying it and accepting live events. If history cannot be verified, keep
sending paused and show an error.

## Testing

Add regression coverage for preserving drafts and queued messages, recovering
delayed history, rejecting incomplete history, and switching conversations
during recovery.

GitOrigin-RevId: bc38958170ea7905452cdc4fbadc838b53400641
2026-11-22 23:13:55 +00:00
Benjamin Carlsson 4ae20b9f28 Add creation-time sorting to Command Center search (#63208)
## Why

Sorting by last update can put older tasks ahead of recently created ones, making it harder to find the newest tasks that match a search.

## What changed

Press `Tab` while editing a search to toggle between `Updated` and `Created` when the key is unbound. The footer shows the active sort, and the date column shows the corresponding timestamp.

Restart history pagination in the selected order while keeping existing matches visible. Ignore late pages from the previous sort.

## Testing

Cover the sort hint and date column, configured `Tab` bindings, and a sort switch that keeps the selected task visible while fetching newer matches by creation time.

GitOrigin-RevId: b17006c546f8f121a790f3fffc27c27035c85771
2026-11-22 23:02:09 +00:00
Eric Traut 3cae922e10 Keep streamed output visible until inline history is repainted (#63196)
## Why

A streamed Markdown table can briefly disappear as the inline TUI moves
it from the live response into scrollback. A resize during that handoff
can also leave queued history wrapped to the previous terminal width.

## What changed

Keep the last frame visible while stream consolidation is pending, while
still accepting keyboard input. Clear and replay terminal history in the
same synchronized update. If the terminal resizes before a queued
replay is painted, rebuild it at the new width without waiting for the
resize debounce.

## Testing

Add a regression test that keeps a streamed table visible while accepting
typeahead, then widens the terminal and checks that the table moves into
scrollback and the next message fits on one line. Extend the terminal
lifecycle test to cover resuming with a replay pending.

GitOrigin-RevId: 11eb2ca0eef90e9e014383546e807cb73cdacfd8
2026-11-22 21:21:17 +00:00
Eric Traut 988e85bd55 Honor tmux mouse changes while the TUI is in alternate screen (#63195)
## Why

tmux doesn't notify panes when its `mouse` option changes. Codex read
the option on screen entry, so toggling it while an alternate screen
was open could leave mouse capture out of step with the tmux setting.

## What changed

Poll the containing tmux session's `mouse` option in the background
while the alternate screen is active. Redraw on changes, even when the
TUI is idle, and reapply mouse capture for the current screen, including
nested screens such as `/resume`.

When tmux turns mouse capture off, discard queued mouse events and end
active drags and pending clicks while preserving selected text.

## Testing

Cover idle redraws on mouse changes, stale and failed probes, capture
updates across fullscreen and overlay modes, and late releases after
capture ends.

GitOrigin-RevId: a502a5e78bbc887adfe080ba2da4dbe8910f2420
2026-11-22 21:20:40 +00:00
Eric Traut b361a3323f Keep streamed TUI answers intact when notices interrupt them (#63194)
## Why

A warning or paste error can break the trailing run of streamed answer
fragments. Finalizing only that run can leave part of the answer duplicated
in the transcript and after a terminal resize.

## What changed

Use the current stream's fragment count to consolidate the answer into one
Markdown cell, preserving the order of notices after it. Preserve the
transcript reader's position and active search match during regrouping.
When a visible notice splits output already printed to native scrollback,
reflow it to restore the answer and notice order.

## Testing

Regression coverage checks transcript rendering and resize reflow with
interleaved and trailing notices, search match retention, and output queued
behind a running tool.

GitOrigin-RevId: 8899a1d1d9ea0264548442001a80e1cb8948022a
2026-11-22 21:20:06 +00:00
Eric Traut 9f2cbb9c09 Discard TUI typeahead after prompt rewind and fork (#63193)
## Why

Rewinding to edit an earlier prompt restores it in the composer. If a
second rewind gesture is already buffered, its Enter can submit the
restored prompt before the user edits it. [Prompt rewind behavior](https://github.com/openai/codex/pull/45845)

## What changed

Pause terminal input as soon as a rewind is queued. Drain buffered input
before showing the restored prompt, and use the same drain after forks
from a locked thread or the agents overview. Retry in bounded batches
while input is still pending, deliver buffered focus changes in order,
and recheck terminal size when the drain finishes.

## Testing

Extend PTY coverage to verify that repeated rewind keystrokes and a
trailing Escape leave the restored prompt ready for a fresh edit and
submission. Cover delayed paste completion, focus event ordering,
and terminal resize during a drain.

GitOrigin-RevId: 65ba4f343892ed3ba2eeb120172f66bfbebe120f
2026-11-22 21:18:40 +00:00
Eric Traut 0bbbda9250 Defer numbered TUI questions during active input (#63192)
## Why

A question with numbered options can take focus while someone is typing
in the composer or searching a picker. A digit intended for a draft
such as `Phase 2` can then submit an answer.

## What changed

If a question opens with numbered options, wait for one second of input
inactivity and for any pending key chord to finish. Count editor and
picker input, including custom editing keys and cursor movement, toward
the idle delay.

Keep the original auto-resolution timer running while the question is
hidden and preserve the underlying picker if the question times out
after opening. Treat delayed questions as pending during startup draft
handoff, and clear queued prompts on disconnect.

## Testing

Cover digits reaching the draft before the delay and selecting options
afterward, pending key chords outlasting the idle delay, and timeouts
during paste capture or over an open picker.

GitOrigin-RevId: 6f9945c264fb8ed336041cf13b1be7c00b4b3f21
2026-11-22 21:05:28 +00:00
Eric Traut b087609f83 Keep terminal background colors when foreground replies are missing (#63191)
## Why

On Unix, terminals that report a background color without a foreground
color would lose both from the TUI palette. This left the composer
without shading based on the terminal background.

## What changed

Keep the background reply from startup and standalone color probes while
giving the foreground reply the rest of the existing probe window.
Use the reported background for composer shading. When either color is
missing, render the empty-state logo in the terminal's default foreground
and use the fallback color pair for shimmer.

## Testing

Cover background retention at the startup deadline, a foreground reply
arriving after the background, and rendering a shaded composer with the
logo in the default foreground.

GitOrigin-RevId: a3ce859eb04a21cfa9742d28b57fa98d4c26e0cc
2026-11-22 21:04:17 +00:00
Felipe Coury ba1c17f960 Widen sidebar tab close targets in the TUI (#63189)
## Why

Closing a sidebar tab with the mouse requires hitting a single terminal cell.

## What changed

Make the `×` and the cell on either side a three-column close target that
highlights as a unit on hover. Use spare space to widen tabs where possible
while preserving the number of visible tabs.

## Testing

Extend the side-chat interaction test to check hover styling across the
close target and verify that clicking either adjacent cell closes the tab.
Update snapshots for the new spacing and label truncation.

GitOrigin-RevId: f097eee9d613a09c511fa14f1af160c7416fe3aa
2026-11-22 20:52:41 +00:00
Felipe Coury 27cfadaf85 Extract TUI side conversation navigation hints (#63188)
## What changed

Move the switch and close or detach hints into
`conversation_navigation_hints`. The helper shows the configured switch
shortcut when available and always includes the Ctrl+C hint.

Use named locals for the parent view's side conversation hint destination
and the chat widget's context-window visibility flag.

GitOrigin-RevId: 4dfc73fc8e353e215c0d786d02425333d86ff334
2026-11-22 20:51:32 +00:00
Felipe Coury 5824b38693 Let Codex open workspace files in the terminal sidebar (#63184)
## Why

When Codex points a user to a document, image, or source line, it can
show that file alongside the conversation so the user can inspect it in
context.

## What changed

Add the `open_in_codex` MCP tool to the terminal workspace. It accepts a
file path and an optional one-based line number. Requests queue until
the calling conversation is visible and the sidebar can show the file
without taking keyboard focus from the chat.

The embedded backend loads a sandboxed snapshot using the calling
thread's workspace and read permissions. Backends without an in-process
permissions reader prompt the user to open the file. Pressing Enter in
the focused preview also opens a snapshot as a live, watched document.

## Testing

Cover queued previews when returning to the calling conversation,
sandboxed reads, confirmation before opening, and live updates after
the user opens a snapshot.

GitOrigin-RevId: ce55f2dfdc7504e2f07e26f5c6404a591eb64649
2026-11-22 20:15:11 +00:00
Benjamin Carlsson 61cb947f05 Refresh terminal tips and show configured leader and agent shortcuts (#63176)
## What changed

Update the tips to cover inline mentions, steering a running turn, and
current command usage such as copying content with `/copy`. Explain how
to enter key chords and show the configured leader key. Use the active
keymap for tips on opening the agent command center and archiving a
thread there. Skip tips when a referenced binding is unavailable.

## Testing

Expand the 40-column snapshot to cover default and remapped shortcuts
alongside tips without keybinding placeholders. Check that the leader
tip is skipped when the leader key is unbound.

GitOrigin-RevId: 2a12e4021abc0365514d8e41889a4b4e9a7150ce
2026-11-22 19:23:56 +00:00
Benjamin Carlsson a0995c2b2b Fix account refresh for new cloud sessions (#63171)
## Why

When a provider change triggers an account refresh for a new cloud session,
the TUI tries to read configuration that the cloud backend does not expose.
The cloud account belongs to the authenticated connection and is independent
of the thread's model provider.

## What changed

Use the cloud backend's `account/read` response directly and skip
`config/read` during the refresh.

## Testing

Add a regression test covering both a pending provider change and a different
provider returned by the new thread. It checks that the TUI sends only
`account/read`, attaches the thread, and applies the returned authentication
and plan details.

GitOrigin-RevId: a195fc6735227ff65e0347d6dd9588b64dbb6ada
2026-11-22 18:24:22 +00:00
Eric Traut 104d256418 Preserve the host terminal's cursor shape in default TUI sessions (#63152)
## Why

Sending the terminal's default cursor shape can overwrite a shape
already set by the host, even when Codex never requested a custom shape.

## What changed

Leave the cursor shape alone during draws that use the default shape
until Codex applies an override. Track whether an override was applied
so cleanup resets the shape only when needed and still makes the
cursor visible.

## Testing

Check that default sessions and sessions using terminal scrollback emit
no cursor-shape reset. Keep exercising cursor repair with an explicit
shape override.

GitOrigin-RevId: 1f6f1cad0bfc04307896cea1d75b9535fc21031d
2026-11-22 16:32:37 +00:00
Eric Traut b46c087c7e Count wide-character wraps when inserting TUI history (#63151)
## Why

A double-width character moves to the next row when only one column
remains. Dividing the line's display width by the terminal width misses
that unused column and can undercount the rows occupied by a long URL.

## What changed

Use the same row count to reserve space for history and clear rows before
writing. Include the unused column when a wide character wraps, while
allowing clusters that start with a narrow character to cross the edge.

## Testing

The VT100 snapshot checks that a three-row URL with wide characters
appears directly below the preceding prompt. A unit test checks that
clusters starting with narrow characters can straddle the right edge.

GitOrigin-RevId: 15e76b00f280b0d9e82f5d81fbfa54c1ed8462ca
2026-11-22 16:22:42 +00:00
Felipe Coury 227fa4e805 Show task loading progress in the docked agent command center (#63146)
## Why

The current task can already be visible while initial discovery is still
running. Opening a different task can also involve several backend requests,
leaving the user waiting without an indication that their selection took effect.

## What changed

- Show “Loading additional tasks…” in the footer during initial discovery,
  with “Loading tasks…” in narrower layouts.
- Mark the selected row “Opening…” and show “Opening task…” in the footer
  during resume, including across backends. Keep the outgoing frame visible
  until the destination is ready to draw.
- Draw the replayed transcript before scanning for loaded subagents, then
  replay their pending requests. Suppress repeats of the selection key so a
  held key cannot act on an approval dialog opened during replay.

## Testing

Add regression coverage for the discovery footer, cross-backend opening
progress and held-key suppression, and replay of a pending subagent request
after discovery.

GitOrigin-RevId: 7c5088edd620a76c5157919c63566b95ad456664
2026-11-22 15:50:07 +00:00
Felipe Coury 69ee78825e Keep task status visible and fix paging in the agent command center (#63145)
## Why

Narrow task lists can hide status, and paging by a fixed number of rows
can skip tasks when group headings and detail rows take up viewport space.

## What changed

Show status and any branch beneath the task title in narrow lists when
there is room for a second row. In wider lists, size the Status and
Updated columns to their contents within their existing limits, leaving
more room for titles when the metadata is short.

Base Page Up and Page Down on how many selectable entries fit in the
current viewport. Keep the selected task's detail row in view when
space allows, and update the scroll position even when another page key
arrives before the next render.

## Testing

Cover paging through dense and single-task groups in wide and narrow
layouts, consecutive page keys before redraw, and restoration of the
first group heading when paging back to the top.

GitOrigin-RevId: 9e1be32338b5131d3be6b352c9ce2afbbbc227cc
2026-11-22 15:48:47 +00:00
Eric Traut cf3ff1530d Show a loading indicator while the resume picker starts (#63102)
## Why

`codex resume` can wait for the app server connection and login status
before the session picker opens, leaving the terminal blank while they wait.

## What changed

Display “Loading sessions…” during startup using the same styling as the
picker. Clear the inline indicator after the login status check or when
startup fails or is canceled.

## Testing

Add a terminal test that holds open a Unix socket to stall the connection,
checks that `codex resume --no-alt-screen` displays the loading indicator,
then closes the socket and verifies that the error replaces the indicator.

GitOrigin-RevId: 04b1a40343be284e2c56fd9519bb57a2b2fa6ecd
2026-11-22 08:27:26 +00:00
Eric Traut 1476a08f1b Prevent TUI startup hangs when a launcher restores blocking input (#63089)
## Why

A launcher that shares stdin with Codex can clear `O_NONBLOCK` on the
terminal probe's duplicated descriptor. After reading a partial reply,
the probe can then block waiting for more input past its deadline.

## What changed

Poll for readable input with a zero timeout before every probe read.
When no bytes are ready, return to the probe's deadline-aware wait.

## Testing

Add a pseudoterminal regression test that clears `O_NONBLOCK`, answers
only the cursor position query, and checks that the startup screen
appears without another keystroke.

GitOrigin-RevId: 7b6e11db6ac3634f77147ab1251f5321be4355cb
2026-11-22 07:02:39 +00:00
Eric Traut 618d501ea0 Preserve fenced code source in TUI transcript copy mode (#63085)
## Why

An indented code block or a bare table displayed as code can match the
normalized text of a later fenced block. Copy mode could assign the fenced
block's original text to the earlier target, leaving the fenced block without
its original line endings or trailing whitespace.

## What changed

Track fenced code in both raw and rendered transcript layouts. Only match
original fenced code against copy targets that came from a fence.

## Testing

Extend copy-mode regression tests with an indented block and a bare table
that each precede a fenced block with matching normalized text.

GitOrigin-RevId: fbbce8e0feb71a449bb978aca65e1d2202da812e
2026-11-22 06:47:14 +00:00
Eric Traut f12fa0fbc5 Keep the TUI transcript selection cursor visible (#63056)
## Why

Moving the selection cursor below the viewport could jump the transcript so
the cursor landed at the top. Resizing the viewport could also leave the
cursor offscreen.

## What changed

Scroll just enough to reveal the cursor, accounting for the row occupied by
a pinned prompt header. Recheck visibility when the viewport changes size
or text rewraps. When rendering an inactive pane, preserve its saved scroll
position and recheck cursor visibility when it becomes active again.

## Testing

Extend transcript tests to cover scrolling past the bottom edge, shrinking
and narrowing the viewport, reactivating a pane, and moving the cursor
around a pinned prompt header.

GitOrigin-RevId: 8772a79316fb31e758986d1f71a0d776fc5ff2b5
2026-11-21 23:25:56 +00:00
Eric Traut 17cb2e3a7f Suppress TUI completion popups in shell mode (#63054)
## Why

Shell syntax such as PowerShell's `$env:HTTP_PROXY` can trigger Codex
completion menus while the user is typing a shell command.

## What changed

Keep completion popups closed in `!` shell mode and cancel any active
file search. Preserve popup dismissals when entering and leaving shell
mode.

## Testing

Cover literal submission of shell commands containing slash-command,
skill, and file completion tokens. Verify that a dismissed file popup
stays closed when a leading `!` is typed and then removed.

GitOrigin-RevId: 6053c23db8710704d6f8c19cf2c114252a459566
2026-11-21 23:13:11 +00:00
Felipe Coury 9302bb553e Select and copy Markdown blocks in the transcript (#63047)
## What changed

Press `m` in transcript selection mode to mark the Markdown block at the cursor. Move between sibling blocks with `h` and `l`, or extend the selection with `j` and `k`. Use `Tab` to expand to an enclosing block or heading section and `Shift+Tab` to shrink the selection.

Copy with `y` to retain Markdown structure, including list markers, code fence languages, and table formatting. For example, you can copy a fenced code block on its own from inside a blockquote.

## Testing

Add coverage for wrapped blocks, nested lists and sections, table selection, copying from the displayed revision during streaming, and conflicts with customized keybindings.

GitOrigin-RevId: 5d4d873c0e378294128c128f472e4dae122831c6
2026-11-21 21:51:31 +00:00
Benjamin Carlsson 59edd0d512 Complete named settings for TUI slash commands (#63036)
## Why

Slash-command completion only suggested positional arguments, leaving users
to recall named flags and their accepted values.

## What changed

Suggest flags for `/model`, `/permissions`, `/title`, `/statusline`, and
`/mcp login` using the same flag definitions as command parsing. Tab
completes known values in both `--name=value` and `--name value` forms.
For example, `/model --speed=f` completes to `/model --speed=flex`.

Named completion also works in multiline drafts and filters out flags
already present in the command.

## Testing

Add composer tests for both value forms, multiline completion, duplicate
flags, and quoted arguments, plus a snapshot of the `/model` flag popup.

GitOrigin-RevId: f874f67c4601012252775e811ddf496dbc6c4817
2026-11-21 20:41:19 +00:00
Eric Traut 140815f19c Fix clipboard text fallback and guard pending pastes in the TUI (#63022)
## Why

On X11, a clipboard owner can answer an image request with text, causing the image read to fail even though text is available. Submitting or queueing a draft while its clipboard read is pending can also send it without the intended paste.

## What changed

- Enable `Ctrl+V` text fallback on local Linux outside SSH and WSL, and allow `Shift+Insert` text fallback across platforms.
- Try text after eligible Linux image-read failures. Report the original image error if the fallback yields no text.
- Keep pending pastes alive across key releases. While a paste targets the current draft, intercept submit and queue shortcuts and show a reminder to review the draft before sending.

## Testing

Extend clipboard worker coverage to exercise submit during an active read and queue after a read completes but before its text reaches the draft. Snapshot the pending-paste reminder.

GitOrigin-RevId: 21bec5e405e13631a2a72f440482338611307ff3
2026-11-21 19:08:29 +00:00
Eric Traut 586bd4b891 Support the Orca integrated terminal (#63013)
## What changed

Recognize Orca from `TERM_PROGRAM=Orca` and report it in `codex doctor`.

Render Markdown links as clickable labels in Orca and keep destinations
visible under terminal multiplexers. Enable Kitty graphics for pet images
only when Orca advertises `ORCA_IMAGE_PROTOCOL=kitty` and the session
passes the direct-terminal checks.

## Testing

Cover Orca detection, Markdown link rendering and multiplexer fallback,
and pet image capability checks.

GitOrigin-RevId: 978a9cd99a8090bfe9198611e9ae7e0dd2709c3b
2026-11-21 17:25:41 +00:00
Felipe Coury a0436d69ff Make Command Center easier to navigate in the TUI workspace (#62990)
## Why

The docked Command Center has a fixed width, and mouse clicks can
focus the pane but cannot open a task. Moving between the task list
and the conversation should work with the workspace shortcuts.

## What changed

- Open or focus Command Center with `leader a` by default. Use the
  workspace pane shortcuts to move between Command Center and the
  conversation, with matching Agents bindings taking precedence in
  Command Center.
- Drag the divider to resize Command Center. Show each docked task's
  status and Git branch, when available, on a second line. Click either
  line to open the task, or click **Show more** to load older tasks.
- Animate the dock opening and closing.

## Testing

Extend the TUI tests to cover mouse activation and workspace keyboard
navigation, including preservation of the conversation draft and
reading position.

GitOrigin-RevId: e78aa4afb68e9971de51859221ce996b13750e13
2026-11-21 15:29:34 +00:00
Felipe Coury 1731314b3b Dock the Agent Command Center beside the conversation (#62986)
## Why

Opening the Agent Command Center in a modal interrupts the conversation
view. Docking it keeps the transcript and draft visible while browsing
tasks when the terminal has room for both panes.

## What changed

With `features.tui_workspace` enabled in owned transcript mode, the
Command Center opens to the left of the conversation on wide terminals.
On narrow terminals, the focused pane fills the screen. Opening a task
returns focus to the conversation and keeps the dock open. Other
transcript modes continue to use the modal Command Center.

## Testing

Add coverage for draft and reading-position preservation, wide and narrow
layouts, queued results arriving after a focus change, and selecting a
new session when its task appears in the dock.

GitOrigin-RevId: d07c9cad3bb8685167b5995e550c406948d7a6e3
2026-11-21 15:14:53 +00:00
Adam Perry @ OpenAI 43d8b78241 Fix reasoning summary config lookup and request snapshot (#62932)
## What changed

Pass `None` for the resumed working directory when the TUI reads
effective reasoning summary settings, so the call matches the
`startup_config_cwd` signature.

Update the indexed search rollout snapshot to expect
`stream_options.reasoning_summary_delivery` set to `sequential_cutoff`.

GitOrigin-RevId: 66225aa15dcfe5da43b397a96a7da4b4712f0b55
2026-11-21 08:38:44 +00:00
Eric Traut 556901ba72 Forward TUI clipboard copies to Rex clients (#62931)
## Why

A client can attach to a Rex session after Codex starts. A successful
native clipboard write can update the host clipboard without reaching
the attached client.

## What changed

Use shared terminal detection to select OSC 52 forwarding in Rex, even
when native copying succeeds. Keep environment-based routing for tmux,
Herdr, and SSH. Use the same terminal detector to recognize VS Code for
keyboard handling, with the existing Windows probe as a fallback.

## Testing

Cover OSC 52 selection for Rex without SSH or tmux and verify that
forwarding runs after a successful native copy.

GitOrigin-RevId: 47db5868d87aaf2aeee9cdd59307aa1be532c11e
2026-11-21 08:37:40 +00:00
Eric Traut f63f8b9bc6 Add a reasoning summary picker to /config (#62905)
## What changed

Choose Auto, Concise, Detailed, or None under Sessions in `/config`.
The picker saves `model_reasoning_summary` through the connected app server
for new chats. The panel shows the effective value and reports when a config
or launch setting overrides the saved choice.

## Testing

Add coverage for the picker and for saving Auto explicitly when the setting
was previously unset. Verify that the active chat keeps its setting and
that the panel reflects a profile override.

GitOrigin-RevId: cd027a6b16879a656b8d8b21488f0588c98f9077
2026-11-21 05:56:42 +00:00
Eric Traut 553c7f8ea6 Use automatic reasoning summaries by default in the TUI (#62904)
## Why

The TUI left the reasoning summary unset on turn submission, so OpenAI
requests could use `concise` even when the user had chosen no summary
setting. Embedded WebSocket prewarming and the first turn need to use
the same summary setting to reuse the warmup response.

## What changed

- Send the configured `model_reasoning_summary` with TUI turns, defaulting
  to `auto` for OpenAI providers. Use the same fallback when prewarming
  through the in-process app server.
- Read reasoning summary settings and custom provider definitions from
  the app server's effective config while honoring explicit launch
  settings. When resuming a remote session, use its working directory
  for the config lookup unless a remote directory override is set.

## Testing

Cover summary defaults and explicit settings in Responses requests,
and verify that the first embedded WebSocket turn uses `auto` and
reuses the warmup response.

GitOrigin-RevId: 1a2edfa44abdd031691a0d421eba077b0796ebe1
2026-11-21 05:55:23 +00:00
Eric Traut 58952e0c39 Enable concurrent reasoning summaries by default (#62903)
## What changed

Mark `concurrent_reasoning_summaries` as stable and enable it by default.
When requesting reasoning summaries from OpenAI, Codex now sets
`stream_options.reasoning_summary_delivery` to `sequential_cutoff` by
default.

## Testing

Exercise summary rendering with the default configuration and update
request assertions and snapshots to expect `sequential_cutoff`. Explicitly
disable the feature in tests that exercise legacy reasoning events.

GitOrigin-RevId: 04310fd271ced11c3a22e8ff6275a387c9c22fc2
2026-11-21 05:42:40 +00:00
Winston Howes 4739e94260 Add an opt-in indexed web search default (#62894)
## What changed

Add `features.web_search_indexed_default` to let restricted turns use
`indexed` search in place of the implicit `cached` default when the
provider and managed requirements allow it. Full-access turns still
prefer `live` search when allowed, and an explicit `indexed` selection
retains its existing precedence.

Forward the flag through the TUI and keep the default implicit when
launch overrides disable legacy search flags.

## Testing

Cover mode selection across permission profiles, explicit settings, and
managed requirements. Verify that the first model request advertises
indexed search and that permission changes take effect on the next turn.

GitOrigin-RevId: 08a6279c447c517c50b9e6a544ecdf681b81bf50
2026-11-21 04:05:41 +00:00
Ned Howley 566020b724 Allow new threads to opt out of Daybreak propagation (#62879)
## Why

App-server clients that prepare threads for later use need to be able
to skip Daybreak propagation for an individual thread when the server
configuration enables it.

## What changed

With `experimentalApi`, pass `daybreakProgramPropagationEnrolled: false`
to `thread/start` to opt a new root thread out. Managed requirements
take precedence. Omitting the field or passing `null` or `true` uses the
configured enrollment rule.

The same field on `Thread` reports actual enrollment for the live
session, including in the start response and `thread/started`
notification. Reusing a live session preserves its enrollment. A thread
returned from stored metadata alone reports `null`, and resuming it
from storage in a new session reports `false`.

## Testing

App-server tests cover enrollment under enabled, required, and disabled
configuration, as well as reporting across live reads and resumes,
unload, and resume from storage. A core test checks that opting out
prevents native helpers from inheriting the root's saved Daybreak choice.

GitOrigin-RevId: f9aae9ff76702b1e5a38d45120cd889a26f8ece5
2026-11-21 01:14:17 +00:00
Sidharth Lakshmanan 0bfb8467da Preserve per-image metadata in app-server image generation items (#62871)
## Why

App-server clients lose metadata supplied by the image backend when
Codex turns the response into a completed image generation item.

## What changed

Expose the backend's `image_metadata` as optional `imageMetadata` in
app-server items and preserve nested values through thread persistence,
resume, and legacy history replay and migration. Keep this metadata out
of model tool output.

Omit empty metadata and discard non-object, oversized, or deeply nested
metadata without dropping the generated image.

## Testing

Extend coverage for per-image parsing, metadata limits, and round trips
through app-server completion, persisted history, and thread resume.

GitOrigin-RevId: 7211a9db1149cb05e6176b08b0462ca173ac72d5
2026-11-21 00:23:59 +00:00
cooper-oai e346540867 Use runtime authentication for TUI WebRTC calls (#62870)
## Why

The TUI creates WebRTC calls locally, and that request path did not use
runtime agent authentication even when runtime agent instances were enabled.

## What changed

- Reuse local credential and runtime managers across calls while the login
  configuration stays the same. Reload first-party credentials before
  creating a call and keep network policy under the primary account owner's
  control.
- Use the shared provider request resolver for call authentication and HTTP
  transport. Apply the WebRTC base URL override before resolving credentials
  so runtime authentication is selected for the actual destination.

## Testing

Add mock-server coverage for concurrent calls sharing a runtime with fresh
assertions, credential changes, and both dual-header and assertion-only
modes. Cover the feature toggle, custom call destinations, network policy
permits, and provider credentials when the local login file is malformed.

GitOrigin-RevId: 6503b3375c79d3126911d1d7c1aea898face37b9
2026-11-21 00:20:14 +00:00
arnavpatidar-OAI b392250f48 Define the startup OAuth protocol for config servers (#62859)
## What changed

Add the optional `target` field to `account/gatewayOAuth/login`.
The startup protocol defines `{"kind":"configServer"}` as a target
for `--startup-oauth`, mutually exclusive with `modelProvider`.
The regular app-server login handler rejects explicit targets.

Define `StartupGatewayOAuthChangedNotification` with the target,
status, and authorization URL for the browser handoff. Export the
new types in the JSON schemas, TypeScript bindings, and Python SDK.

## Testing

Update the TUI device login regression test to expect `target: null`
when signing in to a resumed thread's saved gateway.

GitOrigin-RevId: fb3ce66a143cad9ad56c93f3ac37f8b6f1abdb0e
2026-11-20 23:24:10 +00:00
Benjamin Carlsson beac2ef8fc Keep Cloud threads current in the Agents overview (#62858)
## Why

The Agents overview can go stale when Cloud threads change from another
client, especially when the TUI has no conversation stream attached.

## What changed

- Use Cloud stream notifications to update thread status and refresh the
  thread list. Poll every 10 seconds while the overview is visible and
  no stream is attached.
- Refresh the history already shown while preserving the `Show more`
  cursor. Use fresh list metadata for thread names, recency, and unread
  state, and restore rows when a refresh catches a missed unarchive.

## Testing

Cover Cloud inventory notifications, polling while detached, pagination
across refreshes, and recovery from a missed unarchive.

GitOrigin-RevId: 63c98438b6ddd2e47dd2d1f419c2a676508c6d91
2026-11-20 23:23:32 +00:00
Dylan Hurd 941e1dcade Defer built-in Default mode instructions until after Plan mode (#62857)
## Why

Threads that stay in Default mode carry a collaboration-mode prompt even
though they have no Plan mode instructions to supersede.

## What changed

Omit bundled and model-catalog Default mode instructions until a thread
uses Plan mode. Emit Plan mode instructions on entry and Default mode
instructions when switching back. Preserve eligible caller-provided
instructions and carry the active mode through compaction and resume.

## Testing

Cover prompt contents before, during, and after Plan mode in core and
app-server tests, including compaction and resume in the core tests.

GitOrigin-RevId: b734767da15be53c4eccae71994e46eba63a9ecc
2026-11-20 23:12:16 +00:00
Charlie Marsh 5bee962f5e Reuse one syntax highlighter when building TUI Markdown styles (#62840)
## Why

Building Markdown styles clones the active syntax theme and constructs a new
highlighter for each foreground lookup.

## What changed

Borrow the active theme and use one highlighter for all foreground lookups
in `MarkdownStyles`. Preserve the readability adjustment for text styles
and the accent-color fallback for inline code.

GitOrigin-RevId: 8ddfad7e61e2dc7968398ff3bdecd3b389c1bb07
2026-11-20 21:29:06 +00:00