Commit Graph
3654 Commits
Author SHA1 Message Date
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
Ryan Taylor a1afa12273 Let required hooks block continuation on failure (#62831)
## Why

A required hook check can fail to run or return a usable result. Continuing
after that failure can let an action proceed without a completed check.

## What changed

Add per-handler `onFailure` for command and MCP tool hooks. The default
`continue` preserves existing behavior. On supported synchronous hooks,
`block` applies the event's blocking behavior and reports the reason while
preserving failure diagnostics. For example, a failed `PreToolUse` check
prevents the tool from running, while a failed `PostToolUse` check withholds
the result of a tool that already ran.

Expose the policy in the app-server's `configRequirements/read` response.

## Testing

Add tests for command and MCP failures under both policies, and scenario
coverage for blocked tool execution, withheld results, and completion after
a `Stop` hook recovers.

GitOrigin-RevId: 20d6ebda0094382fe052bbf34338edb994cc7bd3
2026-11-20 20:24:34 +00:00
Felipe Coury d402acbeba Reset TUI thread-switch state on reconnect (#62807)
## Why

Reconnect replaces the app event queue, so queued thread-switch events can be
discarded while their resets are still counted as pending.

## What changed

- Clear the pending thread-switch reset count when replacing the event queue
  and use a shared accessor for the displayed thread during reconnect.
- Box the app event dispatch future and extract helpers for choosing the side
  conversation target and rendering the composer pane.

GitOrigin-RevId: 6bb14443952262b6a0df7fdf05db053038c7ce2d
2026-11-20 17:45:15 +00:00
Eric Traut 0e8c7683c4 Match TUI task mentions by displayed title (#62691)
## What changed

Use state database-backed `thread/list` requests for task mentions without
searching conversation contents. Merge title-filtered results with recent
threads by thread ID so a full filtered page cannot crowd out recent
candidates. Native Cloud uses the recent list because it lacks a title filter.

Fuzzy-match the displayed title in the picker. Keep the working directory
visible as a description and exclude it from matching.

## Testing

Cover remote listing, retention of recent candidates when the filtered page
is full, and fallback when the filtered request times out. Check that a
directory-only match stays out of the picker.

GitOrigin-RevId: ec2a5ae9f046e533104251fd82f6683343854ee0
2026-11-20 07:15:35 +00:00
Eric Traut 0f3a4756f9 Let administrators disable Codex daemon updates (#62690)
## Why

The daemon's automatic update preference still permits manual updates.
Administrators need a policy that covers both paths.

## What changed

Set `features.daemon_updates = false` in managed `requirements.toml` or
local MDM policy to block scheduled updates and manual daemon package
replacements. Updates are allowed by default. User configuration cannot
override the policy, and cloud-delivered requirements reject the setting.

When policy blocks updates, the TUI hides update actions in `/daemon`,
suppresses update offers in version notices, and directs users to their
administrator where a newer daemon is required.

## Testing

Add coverage for the default, disabled, and invalid policy cases,
rejection of the setting in cloud requirements, and the TUI with daemon
updates disabled.

GitOrigin-RevId: de9e50c4acc4dc8e83bbd2b9a5e902deb8c6f477
2026-11-20 07:14:27 +00:00
Eric Traut 45ace810b3 Copy pasted image files into temporary TUI attachments (#62687)
## Why

A pasted image path could become unreadable before submission if the
original file was moved or deleted.

## What changed

Copy the image into a private temporary file at paste time and use that
copy as the attachment. Apply a 1 GiB limit when saving image files and
clipboard PNGs. If copying a pasted image path fails, show an error and
preserve the draft.

## Testing

Cover attachment readability after deleting the original file and verify
that an oversized image paste reports an error and preserves the draft.

GitOrigin-RevId: 5f797979f36173fb3355345e0f124b81fcf86d01
2026-11-20 07:03:05 +00:00
Ian MacLeod 64026788f3 Hide the warning navigation hint for a single warning (#62642)
Show the TUI warning navigation hint only when there are multiple
warnings to browse. Update the single-warning snapshots to reflect the
shorter footer.

GitOrigin-RevId: 8bcea7841d9fd84e037f59a6afa3e4ef2de6f01e
2026-11-20 02:01:03 +00:00
Joe Savona 78f6b11303 Add center and end alignment to status line rows (#62637)
## Why

Status line authors can start rows at the leading edge or distribute
extra space between items. They also need to center or right-align a
group while keeping its configured gaps.

## What changed

Add `justify: "center"` and `justify: "end"` to the row renderer and
TypeScript contract. Align each wrapped line independently within its
available width.

Leading padding uses the row background, stays outside hyperlink
targets, and leaves blank lines unpainted. When the last visible line
fills the width and more lines follow, the renderer can reclaim a
padding cell for the overflow ellipsis.

## Testing

Add rendering coverage for wrapped and nested rows, wide characters,
blank lines, hyperlink boundaries, and overflow. Extend the TypeScript
contract check to cover both new values.

GitOrigin-RevId: 85dd907fe60b5d2cfb759b32058d0876430dd9e6
2026-11-20 01:34:16 +00:00
Ian MacLeod d0264b756e Share slash command argument range mapping in the TUI (#62624)
## What changed

Use `slash_args_elements` in both the chat composer and slash command
dispatch. The shared helper converts text element byte ranges to offsets
relative to the command arguments and clips them to the argument bounds.

GitOrigin-RevId: 72e2fa42bf0d3fc385a58cc13fb6741c896db900
2026-11-19 23:55:41 +00:00
Felipe Coury 81ef12b617 Refresh open sidebar file previews when files change (#62583)
## Why

Sidebar previews load a snapshot of the file when opened, so edits on disk
leave the open tab showing stale content.

## What changed

Watch each previewed file’s parent directory through the app server so the
preview refreshes even when an editor saves by atomically replacing the file.
Poll every three seconds when a watch cannot be registered, and resubscribe
when reconnecting to the same backend.

Preserve the text preview’s reading position across reloads, including when
the file temporarily becomes unreadable and then returns.

## Testing

The sidebar test covers atomic saves and recovery after moving a directory
away and back. It checks that the tab shows updated content at the existing
reading position.

GitOrigin-RevId: d5f7507d1a81a118fb10a0febf5e274c18f19d81
2026-11-19 20:13:14 +00:00
Eric Traut 2f0374456f Render LaTeX underbraces in TUI display math (#62577)
## Why

An unsupported `\underbrace` leaves the display equation as LaTeX source,
so readers have to interpret which terms each label groups.

## What changed

Render `\underbrace{expression}_{label}` with a Unicode brace that spans
the expression's terminal columns and a label centered below it. Keep
surrounding math aligned with the expression. Inline math, unsupported
arguments, and layouts that exceed the available width still use the
existing fallback.

## Testing

Add a snapshot for labeled Boolean clauses, short expressions, and labels
wider than their expressions. Check fallback for inline, malformed,
nested, multiline, and over-width cases.

GitOrigin-RevId: 8fbe92d512d06c73cf21247343ad869743bebd0c
2026-11-19 19:54:13 +00:00
Benjamin Carlsson 6eea328081 Use the cloud emoji for cloud thread labels (#62573)
## What changed

Request emoji presentation for the cloud marker in thread labels.
Preserve the emoji variation selector immediately after the cloud
symbol in Unicode terminal titles and keep GNU Screen titles ASCII.

## Testing

Update rendering snapshots for the task overview, side panes, mentions,
resume picker, and thread identity displays. Extend the terminal title
test to cover the cloud marker in both title encodings.

GitOrigin-RevId: 15959a0760f63a45d8fff917df2e008cda7536a5
2026-11-19 19:04:56 +00:00
Joe Savona 99870c4f49 Add justification to custom statusline rows (#62569)
## Why

A fixed gap cannot keep two statusline groups at opposite edges as the terminal width changes.

## What changed

Set `justify: "between"` on a root `row` to distribute spare footer columns between its items on each line, in addition to the configured `gap`. Nested rows size to their content within the available width, so they can keep related fields together.

Use `justify: "start"` to pack items at the leading edge with the configured gap. Both explicit modes group adjacent bare strings into one item. Separate `text` or `row` elements can be positioned independently. Omitting `justify` preserves the existing gaps between authored children.

## Testing

Add renderer tests for edge alignment during resizing, spacing on wrapped lines, and root versus nested rows. Extend the row decoding tests and the TypeScript contract fixture to cover `justify`.

GitOrigin-RevId: 3319e688f3adfe6d35709ef279345f1db3eb9693
2026-11-19 18:53:03 +00:00
Felipe Coury 308ab1b895 Document how to render TUI shortcut labels (#62560)
## What changed

Use `esc close` to show how to combine the Escape binding's display
label with the action text and use the shared shortcut styling in
views and mockups.

GitOrigin-RevId: 0bb0dc94e503932443076dbe2495e5494e3df5b2
2026-11-19 18:05:07 +00:00
Eric Traut 325123ae4a Render \widetilde in terminal Markdown math (#62554)
## What changed

Apply the same Unicode combining tilde as `\tilde` when the
`\widetilde` argument is a single grapheme.

## Testing

Extend the Unicode math snapshot to cover both `\widetilde{I}` and
`\widetilde I` in fraction numerators.

GitOrigin-RevId: e6976f998bb0955ba9c73117bd19dd814b07399a
2026-11-19 17:12:52 +00:00
Eric Traut 76aa618787 Render multiline Mermaid flowchart edge labels (#62550)
## Why

The terminal renderer already supports line breaks in flowchart node
labels. The same syntax in an edge label causes the diagram to fall
back to source text.

## What changed

Treat `<br>`, `<br/>`, and `<br />` as line breaks in edge labels.
For example, `A -->|"Review<br/>order"| B` renders the label on two
lines. Reserve space for each line and preserve blank lines without
erasing edge connectors.

## Testing

Add snapshots for all four layout directions and update the terminal
Markdown snapshot to include a multiline edge label. Test blank lines
and terminal width limits.

GitOrigin-RevId: 277525d92c6c1f105bc34516893c67eccc22a22c
2026-11-19 16:44:44 +00:00
igorrybalka-oai 1826d80eca Expose Daybreak availability in model discovery (#62499)
## Why

Clients need to distinguish a caller who must enroll in Daybreak from a
model that does not support it. The list of accepted access programs
alone cannot express that distinction.

## What changed

Carry the server-resolved status for each caller and model from the
model catalog into `model/list` as `availableAccessPrograms.daybreakAvailability`.
Update the JSON schemas, TypeScript bindings, and Python SDK to expose
the field.

Rust decoders use `default` for missing or unrecognized statuses. The
Python SDK also defaults missing statuses and preserves new strings
from newer hosts.

## Testing

Cover catalog decoding, app-server response serialization, and Python
SDK round trips with known, missing, and future status values.

GitOrigin-RevId: c1e5ddef68fd19b25e583bb6996a93fd78ab9d18
2026-11-19 12:28:34 +00:00
Benjamin Carlsson 9274511443 Reconcile unfinished Cloud replies in the TUI transcript (#62403)
## Why

Cloud turn and item pages can reflect different points in time. A reply
restored from history may still be unfinished even when its turn is marked
complete. When the final text arrives, the TUI can leave a stale prefix in
the transcript or put the final reply after intervening tool output.

## What changed

Track Cloud replies by turn and item across history replay, pagination, and
live streaming. Reserve a transcript position even for an unfinished reply
with no visible text. When it completes, replace its fragments in place or
remove them if the final text contains only hidden directives. Keep late
completions from interrupting another reply's stream.

Preserve transcript order when choosing the latest copyable reply. When a
turn completion notification has no response text, fall back to the latest
completed response from that turn.

## Testing

Cover replies restored from older history pages, late completions during
another stream, and directive-only completions that remove a visible prefix.
Check the resulting transcript order, copy text, and notification fallback.

GitOrigin-RevId: a0abb75bf1378524461a519fe9a0656e15bca4bf
2026-11-19 02:26:51 +00:00
Felipe Coury aadb51b2b6 Test saved chat hover highlighting in the sidebar chooser (#62400)
## Testing

Add a regression test that checks that hovering over a saved chat's
preview highlights both its title and preview without moving the
selection. Moving to the title keeps the highlight without requesting
another redraw, and moving to the Side chats heading clears it.

GitOrigin-RevId: d54501f28c00112281389f67bb3671dfa6b18513
2026-11-19 02:08:25 +00:00
Felipe Coury b5e1f3ae9d Highlight clickable links and controls on hover in the fullscreen TUI (#62390)
## Why

The pointer shape can signal that transcript links are clickable, but the
text itself does not change on hover. A foreground change makes the
clickable region visible.

## What changed

Change the foreground color of hovered transcript and status-line
links, transcript disclosure controls, and the warning notice. Use the
rendered link spans so the highlight follows the visible text, including
wide characters. Recompute the highlight on redraw so it follows the
content under a stationary pointer as the transcript scrolls or updates.

## Testing

Add a mouse-motion regression test that checks highlight and restore
behavior for transcript links, including wide characters and Markdown
table links, as well as status-line links, disclosure controls, and the
warning notice. The test also checks that a URL in the editable draft
keeps its original styling.

GitOrigin-RevId: 4c7da58705e2ad4c710ec6c55727d5a064f3cf1f
2026-11-19 01:16:44 +00:00
Joe Savona 2d58165651 Expose custom status lines in /experimental (#62387)
## Why

Custom status lines previously depended on a feature flag in the TUI
client's configuration. When the TUI connects to a separate app server,
that flag can differ from the setting in the server's active profile.

## What changed

Add **Custom status line** to `/experimental` as an opt-in feature. Save
the toggle on the connected app server, restart the TUI, then use
`/statusline` to choose a provider.

Read `tui_extensions_statusline` from the app server's effective
configuration at startup. Keep that value when switching conversations
or reloading local status line preferences, so toggling the feature
takes effect on the next TUI launch.

## Testing

Add a menu snapshot and regression coverage for saving the toggle in a
server profile while preserving the active provider across a thread
change.

GitOrigin-RevId: 4025c9771e560d6d7b1e6bd97236bffc44201556
2026-11-19 00:59:23 +00:00
Felipe Coury f7dece07d0 Centralize transcript overlay input routing (#62384)
## What changed

Use `Overlay::input_transcript` to determine which overlay handles
transcript interaction keys and which keymap context applies during
search and selection. Apply runtime keymap bindings through `Overlay`
so the app can refresh them without matching the transcript variant
directly.

GitOrigin-RevId: 3592ddb62a6bddb760e2923604faff41a28cd150
2026-11-19 00:06:45 +00:00
Eric Traut b967993f35 Preserve workspace roots across client and server platforms (#62377)
## Why

A TUI connected to an app server on another platform can receive workspace
roots that its own filesystem cannot represent. For example, a Windows
drive path from the server cannot be stored as a native absolute path on
a Unix client.

## What changed

Keep `runtimeWorkspaceRoots` as native path strings on the wire for thread
start, resume, and fork. Validate absolute paths on the server and store
the returned roots as `PathUri` values in the TUI. Use the session's roots
for active remote forks, including side chats, and preserve permissions
for those roots in the TUI's permission display.

## Testing

Cover thread startup with workspace and writable roots from another
platform, remote root retention through start, turn, resume, and fork,
and server rejection of relative roots.

GitOrigin-RevId: 1e9e3bff64a6e7ddadb941f16c4952c44724af54
2026-11-18 22:40:03 +00:00
Eric Traut 7d458c8fc5 Preserve sandbox writable roots across client and server platforms (#62376)
## Why

A TUI connected to an app server on a different operating system could
fail to decode a workspace-write policy. For example, a Unix client could
reject a Windows writable root such as `C:\extra` because it is relative
under Unix path rules.

## What changed

Keep `writableRoots` as path strings on the wire. Use path URIs to
preserve server paths when displaying thread permissions, and forward
the original sandbox policy to the first turn of a child thread that
inherits a legacy policy. The app server validates that each writable
root is absolute on its host before enforcing a policy supplied to
`command/exec` or `turn/start`.

## Testing

Cover writable roots from another platform in permission profile
templates, their round trip through thread lifecycle responses, and
rejection of home-relative roots during enforcement conversion.

GitOrigin-RevId: 57365b977bfced6c6ee864a0e54f25e8f9d09981
2026-11-18 22:39:26 +00:00
Eric Traut b82943092c Preserve app-server thread working directories across platforms (#62375)
## Why

A remote app server can report a working directory in a different path
convention from the client. Decoding a Windows drive path as a client-native
absolute path can make a Unix client reject the thread response.

## What changed

Keep thread `cwd` values as server-native strings in summaries, settings,
and start, resume, and fork responses. Preserve the JSON and generated SDK
types. In the TUI, store the session directory as a `PathUri` using the
server's path convention when available. Use that directory to match diff
and skill results and to display the project name in the terminal title.

## Testing

Add regression coverage for foreign-path response round trips, diff results
matched against a remote session directory, and terminal titles derived
from a Windows path. Verify that the server rejects a working directory
that cannot be encoded as UTF-8.

GitOrigin-RevId: 600f0b531939db4cd4ec884de166224082995e00
2026-11-18 22:13:26 +00:00
Felipe Coury 333ea31947 Make sidebar file preview errors easier to act on (#62362)
## Why

When a file preview fails, the generic error can leave users guessing
which file failed, especially when the sidebar truncates the tab label.

## What changed

Show the filename and directory in the failed preview. Give users
specific guidance for missing files and permission errors, and retain
the error details for other failures. If the file link cannot be
resolved, include the original path in the chat error.

Preserve typed filesystem RPC errors so the preview can classify
failures from `fs/readFile`, and strip the server's diagnostic payload
before the errors can reach TUI logs.

## Testing

Cover narrow-pane error rendering, missing-file and permission error
classification, unresolved links, and diagnostic payload removal for
remote file reads.

GitOrigin-RevId: 1db35c831bb112d67e8c0171a85a20d02cc15a08
2026-11-18 20:58:12 +00:00
Benjamin Carlsson 42cf4edfcd Add slash command argument completion to the TUI composer (#62343)
## Why

The slash command menu helps users find commands, but leaves them to
recall fixed arguments such as `on` and `off` for `/raw`.

## What changed

Show prefix-filtered suggestions for the first argument of supported
slash commands. For example, type `/mcp lo` and press `Tab` to complete
`/mcp login`. `Enter` and configured submit shortcuts still submit the
draft as typed.

Give mention completion priority and limit argument suggestions to
commands available in the current thread and connection state.

## Testing

Add tests for popup rendering, argument replacement, submit shortcuts,
and changes in thread availability and connection state.

GitOrigin-RevId: 8682c323064457dd9307b0a1520469011a8df9f3
2026-11-18 19:11:14 +00:00
Benjamin Carlsson 58ad62ce09 Let users open the command center from provider error screens (#62335)
## Why

Read-only chats offer a Left Arrow shortcut to the command center when
agent navigation is available. Chats blocked by model provider errors
were missing that shortcut.

## What changed

Share notice rendering and shortcut availability between provider
errors and read-only threads. Show `← command center` on provider error
notices when the shortcut is available, and open it on a plain Left
Arrow press even when offline.

## Testing

Add a regression test that checks the shortcut hint, verifies that
repeat events leave the notice open, and confirms that opening the
command center preserves the draft both online and offline. Update
provider error snapshots to cover the new hint, including at narrow
terminal widths.

GitOrigin-RevId: be2ce80cade02c84baeff7fd48fa8973f0dcc1dc
2026-11-18 18:48:22 +00:00
Benjamin Carlsson 0a82fdf49d Open Codex thread links inside the TUI (#62332)
## Why

Conversation search results can point users to saved transcripts. Users
need to be able to follow those links without leaving their terminal session.

## What changed

- Make Markdown links such as `[Review notes](codex://threads/<id>)`
  open the linked conversation from chat and transcript views. In the
  resume picker, follow the link to another transcript preview.
- Resolve nested agent links through their owning session and select the
  requested agent. Show archived conversations in read-only mode and
  let users explicitly reopen them.
- Include the Markdown link format in thread search results, including
  archived results.

## Testing

Add coverage for thread link parsing and activation, nested agent
navigation, archived thread reopening, and mouse capture during
transcript preview transitions.

GitOrigin-RevId: 40a39c43acf643b97e066ba663aefcf9cda0bc81
2026-11-18 18:28:58 +00:00
Alex Chang cc7a62e19c Report API spend limit errors by scope (#62329)
## Why

Generic quota errors hide whether the project or organization spend limit
blocked a request. Reporting the scope tells users which limit to check.

## What changed

Recognize API key, project, and organization spend limit errors across
HTTP, SSE, and WebSocket responses. Show a message that names the scope and
treat the error as non-retryable, even when the provider sends
`Retry-After`. Apply the existing usage-limit handling to goals and
compaction.

Expose distinct `CodexErrorInfo` values in the app-server protocol and
generated bindings so clients can identify the limit in live errors and
failed turn history.

## Testing

Extend the transport tests to cover all three scopes and verify that they
stop retries. Extend the app-server test to check that the error survives
`thread/read` and that a subsequent turn can succeed in the same thread.

GitOrigin-RevId: 03341f7a78daa7540e7baa519f1a29ec07e34509
2026-11-18 18:11:54 +00:00
Zahan Malkani bd00a8a42e Preserve pending realtime speech when a call ends (#62299)
## Why

A realtime call can end with completed speech that has yet to reach a
Codex turn. The next turn needs that context even if the call's transport
has already disconnected.

## What changed

- For V3 calls with realtime frame history enabled, save pending speech
  as context for the next turn. Restore it on thread reload and exclude
  it from the turn count used by rollback.
- Drain already received transcript events and settle pending handoffs
  before saving the call's closing marker. Report recovery required if
  shutdown cannot confirm that history was saved.
- Keep transport detach separate from ending a call. Reattaching restores
  saved pending speech, and an open call can be ended from persisted
  history after a reload. Use the call ID for TUI attachments so successive
  calls on one thread have distinct history.

## Testing

Add coverage for queued speech at hangup, reconnect and stop after
reload, retries after an uncertain write, and rollback across saved
session-end context.

GitOrigin-RevId: 657491f1d7e446a1a48e22189758810c8bdd82cb
2026-11-18 15:24:29 +00:00
alexsong-oai 24e236514b Allow Bedrock Runtime selection during setup and login (#62222)
## Why

The app server's Bedrock setup and login flows always selected Mantle.
Clients using Bedrock Runtime had to configure that provider separately.

## What changed

Accept an optional `providerId` in `account/bedrock/setup` for AWS profiles
and environment credentials, and in `account/login/start` for Bedrock API
keys and AWS access keys. Pass `"amazon-bedrock-runtime"` to select
Runtime. Omit the field or pass `null` to keep the Mantle default.

Save configuration for the selected provider and check that provider for
an existing `aws.credential_export` before changing credential sources.

## Testing

Extend app-server tests to cover Runtime setup with profiles and
environment credentials, Runtime login with both key types, and Mantle
fallback. Verify that environment setup selects the Runtime default
model for a new thread and that a configured Runtime credential exporter
blocks profile setup.

GitOrigin-RevId: 6396b638208ab9b12f50f13f13bd517a919d0848
2026-11-18 07:43:45 +00:00
Benjamin Carlsson ba8ab2d050 Allow paging through long choices in async questions (#62209)
## Why

A choice taller than the TUI's answer area could never be displayed in
full at that terminal size, so users could neither read it to the end
nor submit it.

## What changed

Let `PageUp` and `PageDown` scroll through the wrapped lines of an
oversized choice while keeping it selected. Allow submission once every
line of the choice has been displayed in order and at full width.

## Testing

Add regression coverage for paging without changing the selection,
rejecting submission when repeated page keys skip lines before redraw,
and rejecting choices clipped horizontally.

GitOrigin-RevId: c296323494bd387581c2bb046272a8ccd773ad75
2026-11-18 06:50:26 +00:00