Commit Graph
14068 Commits
Author SHA1 Message Date
felixxia-oai 8b02797a2e Preserve Guardian v3 evidence delivery across root reloads (#63361)
## Why

Unloading a root thread could leave a child reviewer alive while resetting
the root's evidence delivery state. Resuming intake at the end of the root's
history could skip evidence that hadn’t been routed yet, and a fresh delivery
stream could replace the child's inbox and reviewer conversation.

## What changed

Keep routing progress with the live agent tree so a reloaded root catches up
from the last completed original. Surviving child reviewers keep their
subscriptions, queued evidence, and reusable conversations. Review preparation
checks that catch-up completed against the current root intake.

Deliver each channel post to its subscribers as soon as the append succeeds.
Deduplicate delivery per original across channels and retries, and finish
routing the current original before stopping on graceful unload.

## Testing

Cover a child's first evidence search after root reload, retention of searched
and subscribed evidence in a reused reviewer, rejection of stale intake, and
delivery without duplicates when a channel append is retried.

GitOrigin-RevId: 0bd875e5856d8e6d0a3f721f61146ed425ec4c10
2026-11-23 15:45:39 +00:00
felixxia-oai e00c64fb68 Scope Guardian subscriptions to live reviewers (#63357)
## Why

Persisted channel subscriptions could route new evidence to an agent before
its reviewer started. A replacement reviewer conversation for a still-loaded
agent needs to retain the agent's subscriptions and replay its inbox.

## What changed

Keep channel subscriptions and queued evidence references in the live
reviewer's inbox. Replacement conversations reuse that inbox, and a reviewer
that reloads after shutdown starts with an empty inbox and subscription set.

Route committed evidence once per matching inbox, even when several channels
match. Unsubscribing preserves evidence already selected for delivery, and
closing an inbox prevents pending deliveries from reaching a later reviewer
for the same agent.

Manage subscriptions through the reviewer tools. An exact channel name can
be subscribed to before the channel exists, and evidence remains searchable
on the message board.

## Testing

Cover pending delivery across unsubscribe and reviewer reload, and exercise
subscription and delivery behavior with both in-memory and SQLite boards.

GitOrigin-RevId: e3dfbcc7c3f34bd509faa24742cf83d9236ef83a
2026-11-23 15:29:37 +00:00
Charlie Marsh a4ae34320c Box MCP transport setup and initialization retry futures (#63356)
## Why

MCP startup and connection recovery both create transports and run the
initialization handshake. They can share the same future polling code.

## What changed

Return a `BoxFuture` from transport creation and box the entire
initialization retry loop once per call. Startup and recovery use the
same polling implementations in `rmcp-client`.

GitOrigin-RevId: 582318654ed1d519a4cf25a09126a5a5b93a4b4e
2026-11-23 15:28:26 +00:00
jif c983e8d171 Deliver detached message board notices to native agents (#63354)
## Why

The detached SQLite message board could store posts but could not notify
the agents named in `agents_to_notify`.

## What changed

Add an optional `--app-server ws://127.0.0.1:PORT` flag to
`codex-message-board-mcp`. When configured, the board uses
`thread/inject_items` to queue notices in native agent mailboxes without
starting a turn. The board and app-server must share the same Codex
registry.

Delivery is best-effort. Posts stay stored if a notice fails, and the
next notice can reconnect without replaying the failed one.

## Testing

Cover concurrent requests, notice size limits, and reconnect after a
timeout without replay. Exercise the detached executable against a
restarted app-server and verify that a native child receives the queued
notice once when it resumes.

GitOrigin-RevId: 8b890b30df94590686d91921d814887eda5d9c9b
2026-11-23 15:13:44 +00:00
Charlie Marsh 7c116ba81f Share WebSocket dial future code across connection paths (#63353)
## Why

Boxing the dial future inside the generic `connect_with_route` can duplicate
its generated polling code for different route future types.

## What changed

Construct the boxed future in the non-generic `WebSocketConnector::dial`
helper so connections that resolve a proxy route and direct loopback
connections share the same polling code.

GitOrigin-RevId: a413733ac7e61732d0577d17a2f67ebd890f3757
2026-11-23 15:12:35 +00:00
Charlie Marsh 4889e4123a Keep TuiKeymap::clone out of line (#63352)
Give callers one shared implementation of the field-by-field clone to
avoid duplicating that code at call sites. Replace the derived `Clone`
with an explicit implementation marked `#[inline(never)]` that clones
every keymap section.

GitOrigin-RevId: 6575b092439cf79a43d8e9e572c3f9d765af7cf1
2026-11-23 14:58:50 +00:00
jif 108730843a Abort the remote app-server worker when its client is dropped (#63351)
## Why

Dropping the remote client or cancelling its shutdown could leave the
WebSocket transport worker running, even if it was stalled on a socket write.

## What changed

Give the client an abort-on-drop task handle so dropping the client or
cancelling its shutdown future aborts the transport worker.

## Testing

Extend the full command queue regression test to cover shutdown, shutdown
cancellation, and direct client drop. Each case verifies that the worker
releases its command receiver and terminates.

GitOrigin-RevId: a5a83b3ab8520d4096be444bc24676ac9c444cb1
2026-11-23 14:45:38 +00:00
ioanbudea-OAI 02390c8d8e Refresh managed MCP requirements in place (#63348)
Update the retained configuration stack during session refresh. Copy only
the MCP server, plugin, and feature requirements in both the parsed and
TOML representations, avoiding a clone of the entire stack.

GitOrigin-RevId: 1bae8cc86a59b4638f9f6cd48ee9eb17de31fef2
2026-11-23 14:26:56 +00:00
Charlie Marsh a52fdb3ba6 Box the MCP session recovery future (#63344)
GitOrigin-RevId: 8f52b1945b656e373b8324a487f576f00c8805a9
2026-11-23 14:10:17 +00:00
Charlie Marsh 93f105d29b Use UTF-8 for skill creator file I/O (#63343)
Python's default text encoding can vary by environment, causing non-ASCII
skill text to be misread or fail to encode.

Read `SKILL.md` as UTF-8 in both the validator and the metadata generator,
and write `agents/openai.yaml` as UTF-8.

GitOrigin-RevId: d21ad0c653056ec0517d95b7b18e77f66489a9a2
2026-11-23 13:55:01 +00:00
Charlie Marsh 2c77888b21 Share config-loading future poll code across callers (#63336)
Return a `BoxFuture` directly from `Config::load_config_with_layer_stack`
so callers share the future's poll code. Keep the large config-loading
future on the heap to limit stack use on small test threads.

GitOrigin-RevId: 50cf5c27983b38044ecd25dd9be4316c4fdf36ba
2026-11-23 13:07:19 +00:00
Charlie Marsh 00315bb12a Box the session startup cleanup future (#63333)
## What changed

Return a `BoxFuture<'_, ()>` from `SessionStartup::cleanup` and move the teardown logic into the private async `cleanup_inner` method. Callers continue to await `cleanup()` at the same points.

GitOrigin-RevId: 5c263027fb93d64f1872f4f3d5b732df4b4427e5
2026-11-23 12:55:29 +00:00
Charlie Marsh 1cf4ea68b8 Type-erase the ChatGPT token refresh future (#63332)
Return a boxed `dyn Future` from `refresh_and_persist_chatgpt_token`
so callers share the code that polls the refresh future.

GitOrigin-RevId: e0a47f585348306145600561cc086676ffaceed5
2026-11-23 12:54:52 +00:00
Charlie Marsh 9819b5c869 Box the shared SQLite pool-opening future (#63331)
## What changed

Have `open_read_write_pool_with_spec` return a pinned, boxed `Send` future.
Keep the shared setup and recovery logic for runtime and standalone database
callers in `open_pool_inner`.

GitOrigin-RevId: 4ceca053e76fa1d497259c52c12d422fd3fa2554
2026-11-23 12:54:16 +00:00
Charlie Marsh 114c086d6d Box the runtime registration future (#63329)
## What changed

Return a boxed, `Send` future from `RuntimeRegistrationClient::register` so
callers use a shared, type-erased interface for the registration request. Allocate the
future only when registration is requested, leaving cached runtime lookups
free of that allocation.

GitOrigin-RevId: 721e36c3fbeb9d37a512ac4795d45bc9aead8031
2026-11-23 12:52:50 +00:00
jif 790ecc338a Log probe results when Guardian V3 prepares a review (#63327)
## What changed

Carry the serving probe result from the tool step into the review context.
Include `tool_call_id` and `probe_review` in the Guardian V3 preparation
log so the result can be correlated with the tool call. Record the probe
as `required`, `not_required`, or `not_reported`. Approval decisions
continue to follow the review verdict.

## Testing

Extend the pending MCP action integration test to check the logged tool
call ID and probe status for all three cases while exercising the same
revocation and reapproval flow.

GitOrigin-RevId: 43cd3691ae20af29f690ee2697d3d46bcc3bd8ce
2026-11-23 12:36:40 +00:00
jif 9ee4539162 Preserve structured output format during remote compaction (#63320)
## Why

Remote compaction v2 dropped the turn's final-answer schema, so its
request could lose the cached prompt prefix shared with sampling even
when both requests used the same cache key.

## What changed

Carry the turn's JSON schema and sampling strictness into compaction
requests, including the non-strict guardian verdict format. The Responses
API still generates compaction summaries independently of that schema.

## Testing

- Check that automatic compaction on Bedrock and GCP uses the same
  `text.format` and `prompt_cache_key` as sampling, with and without a schema.
- Check that guardian reviews retain their verdict format across compaction
  and retries, and that an approval after compaction allows the command to run.

GitOrigin-RevId: 2cb5df2539358e3d74f1dce51baac2806b6219eb
2026-11-23 12:17:37 +00:00
jif 3af06341bd Bump cookie from 0.18.1 to 0.18.3 in Cargo and Bazel lockfiles (#63317)
GitOrigin-RevId: c4394557e5120ab8f757dda179ea768e2dfff27a
2026-11-23 11:52:01 +00:00
jif ca891cecdc Wake idle root threads on persisted agent messages (#63312)
## Why

Plaintext agent messages injected through `thread/inject_items` could
be saved to root-thread history without waking the thread, even when
agent-message wakes were enabled.

## What changed

After persisting a batch of plaintext agent messages with unspecified
retention, let the native multi-agent v2 root thread's mailbox scheduler
apply its usual wake and turn-admission rules. Use the recorded history
sequence to skip a wake if another turn already read the messages and
to deliver the mail directly from history without re-enqueueing it.

## Testing

Cover app-server injection with wakes enabled and disabled, wake a
reloaded sleeping root with its previous turn context, and verify that
a paused turn-admission gate defers the wake and the eventual model
request contains the message once.

GitOrigin-RevId: 5fde8062a179fd7a7919d240373592f2dbb4a389
2026-11-23 11:16:31 +00:00
Eric Traut a1604a8c05 Tag goal creation metrics with reasoning effort (#63281)
## Why

The `codex.goal.created` counter cannot distinguish goals created at
different reasoning efforts. A tool call can also run at a different
effort from the thread's default after a turn settings update.

## What changed

Add a `reasoning_effort` attribute to `codex.goal.created`. For goals
created by `create_goal`, read the effort from the invoking step's
metadata. For goals created outside a turn, use the thread's configured
effort or fall back to the model default. Label custom values `custom`
and unavailable values `unknown`.

## Testing

Extend the thread resume integration test to check that the exported
metric records `medium` for a goal set before the first turn and `high`
for a goal created by a tool after a turn settings update.

GitOrigin-RevId: 83b3c8c1073551b67453314eb559c5e648af3521
2026-11-23 07:45:08 +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
dozaki-openai 5f645d732c Batch filesystem metadata checks for instruction and skill discovery (#63266)
## Why

Discovering project instructions and repository skill directories can
require several metadata checks per ancestor directory. Batching those
checks reduces remote executor round trips and sandbox helper launches.

## What changed

Add bounded metadata batches that return a result or error for each
path in input order. Remote executors advertise support for
`fs/getMetadataBatch`, and sandboxed filesystems can process a batch in
one helper invocation.

Check project root markers alongside the first working-directory
instruction candidate, then batch the next candidate across unresolved
directories in filename priority order. Batch checks for
`.agents/skills` directories between the project root and the working
directory. Fall back to individual checks when batching is unsupported.

## Testing

Extend tests to assert batch counts for shallow and nested `AGENTS.md`
discovery and verify that metadata batches preserve result order and
per-path errors.

GitOrigin-RevId: 6cb04202a905d783454908348d008def95b9a5d6
2026-11-23 05:39:53 +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
Charlie Marsh e0a6d0532d Avoid eager copies of plugin startup HTTP response bodies (#63241)
## What changed

Convert response bodies with `Vec::from` in both GitHub and public fetches so the conversion can reuse the backing allocation when possible.

GitOrigin-RevId: ece0f018a08706a99b80733ec6c916ed39df5213
2026-11-23 02:37:09 +00:00
Benjamin Carlsson f1fd6c4c35 Preserve mentions in cloud conversation transcripts (#63237)
## Why

The cloud client treated user messages containing mentions as opaque,
which prevented those messages from reaching callers as structured
transcript items.

## What changed

Decode mention names and paths in cloud history and live events, and
carry them through to the app-server protocol as `UserInput::Mention`.
Malformed or incomplete mentions still leave the containing item opaque.
Cloud turn submissions reject mention inputs.

## Testing

Extend tests to cover plugin mentions alongside text and images,
app mentions in app-server receipts, and malformed or incomplete
mention payloads.

GitOrigin-RevId: 938cd37a81630ffe4d06f00544972dd9239c0cb3
2026-11-23 02:13:58 +00:00
Benjamin Carlsson c9325ea78c Simplify eviction in the log ring buffer (#63235)
## What changed

Use `VecDeque::retain_back` to keep only as many existing bytes as will
fit alongside the incoming chunk. The buffer still keeps the most recent
bytes up to its configured capacity.

GitOrigin-RevId: 45fd8fa09e47647ad09b26327e2753bc4573b6c6
2026-11-23 02:01:17 +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
Charlie Marsh ae6c0c8ac1 Exclude per-item usage attribution by default (#63219)
## What changed

Add `usage.attribution` to the `x-codex-exclude` header for Responses HTTP
requests and WebSocket handshakes by default. Threads started with
`experimentalRawEvents` keep receiving per-item attribution in raw responses.
Subagents inherit the policy, and the app server restores it when a thread
resumes with an existing raw-event subscription.

## Testing

Cover the default exclusion, raw completion events with upstream usage,
subagent inheritance, and resuming a closed subagent after both its runtime
and its parent's runtime have unloaded.

GitOrigin-RevId: 0dad92f97606300907f1294f09dd7845d1e6476f
2026-11-23 01:06:41 +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
cooper-oai 7085656b5e Reuse runtime-authenticated Responses WebSockets (#63175)
## Why

Reconnecting for every runtime-authenticated request adds a WebSocket
handshake and forces Codex to resend the full input instead of continuing
from the previous response.

## What changed

Allow requests to reuse an open WebSocket when the request headers,
connection key, runtime ID, and parent routing affinity still match.

## Testing

Cover reuse within and across turns, including incremental input through
`previous_response_id`, and verify that credential replacement and account
switches open new connections. Verify that a paused runtime is rejected on
reconnect after the server closes its WebSocket.

GitOrigin-RevId: cb89b9712f43027482147077a60d5c78fbdfd753
2026-11-22 19:12:31 +00:00
Eric Traut 1c8774ff1d Update url to 2.5.9 and form_urlencoded to 1.2.3 (#63174)
Update the resolved versions in `codex-rs/Cargo.lock` and add the
corresponding crate metadata to `MODULE.bazel.lock`.

GitOrigin-RevId: e270b2d070c09c80e848ae2d14c55fe40fc7d5ee
2026-11-22 19:10:48 +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
Benjamin Carlsson 2ef0f66901 Increase Linux voice callback periods at 48 kHz (#63169)
## Why

At 48 kHz, the two-period ALSA capture ring can overrun on PipeWire
graphs with 4,096- or 4,800-frame cycles, dropping microphone samples.

## What changed

Raise the Linux capture and playback target from 50 ms to 80 ms at
48 kHz, within device and queue limits. Give playback room for two
periods plus block-boundary headroom, and allow up to 160 ms for a
blocked write.

## Testing

Extend the PipeWire cycle simulation to check for capture overruns
across cycle-size changes and verify that playback can render a
two-period burst from 20 ms packets.

GitOrigin-RevId: ee5e70497bee6f8a00dd3f2f2ab5827bafc36b65
2026-11-22 18:09:39 +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