Commit Graph
14102 Commits
Author SHA1 Message Date
Eric Traut a66312f2e9 Resolve subagent nicknames in TUI transcripts (#63444)
## Why

Live and replayed tool calls can show raw thread IDs when subagent
metadata hasn't arrived yet, making it harder to tell which agents
were spawned or are being waited on.

## What changed

Look up missing nicknames in the background and refresh tool-call rows
in the active transcript and parked panes as metadata arrives. Use
archived subagent metadata to label older rows while keeping archived
threads out of the agent picker.

## Testing

Add regression coverage for replayed spawn rows and live wait rows
when metadata arrives late, including a subagent that closes during
the lookup. Extend picker coverage to verify that archived metadata
is cached.

GitOrigin-RevId: 47a5f585d6ebc1b0d9ac49020efeaf6c1b205198
2026-11-23 21:39:43 +00:00
Benjamin Carlsson 573bc54846 Keep TUI event receivers with their threads (#63441)
## Why

Clearing the active thread could drop its receiver and discard unread
events. A queued close from an old stream could also trigger close
handling while the same thread was being reattached.

## What changed

Keep each receiver in its thread's event channel and look it up by the
active thread ID. When a live attachment replaces the active thread's
stream, drain pending events and skip the old stream's `ThreadClosed`
notification unless the TUI is waiting for it to finish shutting down.

## Testing

Cover switching focus away and back without losing or misrouting unread
events. Exercise same-thread reattachment with a queued close, both
with and without a pending shutdown.

GitOrigin-RevId: b58767b2666ddbb64b09e6542ec8f550538531b6
2026-11-23 21:24:20 +00:00
Dmitriy Kovalenko 8a64bc9c7e Defer tool search indexing until the first search (#63440)
## Why

Tool planning built the search index even on turns that never used
`tool_search`.

## What changed

Build the index on a blocking worker when the first search over a
nonempty tool catalog needs it. Regular and Code Mode searches share
the same build within a handler and reuse the completed index. The
build continues if the search that started it is canceled.

## Testing

Add coverage for deferred indexing, concurrent first searches, and
reuse of an in-progress build after the first search is canceled.

GitOrigin-RevId: eb696e93dbc481a76a5adfe7f5506db971047bd5
2026-11-23 21:23:09 +00:00
iceweasel-oai 598083ae58 Route Statsig requests through Codex's HTTP client (#63438)
## Why

Statsig requests need to honor the caller's proxy, TLS, and network policy
settings.

## What changed

Add a `codex-statsig` crate that adapts a caller-supplied
`RouteAwareClientPool` to the Statsig SDK's HTTP interface. The adapter
requests identity encoding, applies the SDK's timeout and optional
response body limit, and leaves HTTP status handling and retries to the SDK.

## Testing

Mock-server tests cover request forwarding, preservation of HTTP error
responses, response size limits, timeout error mapping, and policy denial
before a request reaches the server.

GitOrigin-RevId: 6e78435f1f93ee272977b2f0058afd8f485cf4e0
2026-11-23 21:05:43 +00:00
jif 871559d9ce Remove the TUI's test-only MCP inventory conversion (#63433)
The TUI renders inventory directly from `McpServerStatus`. Remove
`mcp_inventory_maps_from_statuses` and the unit test that only exercised
its conversion to inventory maps.

GitOrigin-RevId: dbae1b541a60d490c18b50e19fca420df791c1df
2026-11-23 20:43:38 +00:00
ioanbudea-OAI bfb5f7d83b Keep active turns running when /compact is rejected (#63428)
## Why

Manual compaction could interrupt a running turn before discovering that
the session settings prevent compaction. This can happen when a policy
refresh requires auto review for the current model.

## What changed

Validate the session settings before interrupting the active turn for
`/compact`. If validation fails during a turn, emit a warning and leave
the turn running. If the session is idle, report a bad request and set
the agent status to errored.

## Testing

Add a regression test that verifies the running turn completes after
a compaction warning and that retrying `/compact` while idle reports an
error.

GitOrigin-RevId: 7e841450461b78661c026a348a610aefa24d8a77
2026-11-23 20:26:13 +00:00
Dmitriy Kovalenko 91f5c31ddb Make Codex tests more portable across environments (#63427)
## Why

Read-only Bazel runfiles can leave copied patch fixtures unwritable, and
restricted Linux environments can deny the mount setup Bubblewrap needs.
Test environments can also lack Python or use paths long enough to
produce identical truncated worktree headings.

## What changed

- Write fresh, writable copies of patch scenario inputs.
- Treat Bubblewrap's mount permission error as sandbox unavailability in
  the CLI and Linux sandbox tests.
- Use `printf` and `tr` to generate output for code mode truncation tests.
- Normalize one worktree heading at a time in the overview snapshot.

GitOrigin-RevId: 88590c9c08a739ecdd4ed49bd41734b02ece3f66
2026-11-23 20:25:06 +00:00
jif 06d76ee77b Remove test-only agent message grouping from TUI backtracking (#63423)
Delete the agent message grouping helpers and their sole test, which
checked that a context compaction marker did not count as an agent
message group.

GitOrigin-RevId: e694196474529f101fff5893f0fcf04161024595
2026-11-23 20:09:12 +00:00
jif aae9db9f5f Test subagent metadata on stored thread conversions (#63422)
Remove the app server's test-only rollout summary reader and cover
subagent nicknames and roles through the conversions from `StoredThread`
to a thread and a summary. Keep the summary assertions for millisecond
timestamp precision.

GitOrigin-RevId: f7481fd3c2d4d332ee094a62ec7cad8997903cdb
2026-11-23 20:06:57 +00:00
Anton Panasenko 00696090d6 Preserve slash command selection across TUI connection changes (#63419)
## Why

Going offline can change the slash command menu while a user is choosing a
command. With `/ex` typed and `/export` selected, a disconnect could move the
highlight to `/exit` and cause Enter to quit Codex.

## What changed

- Keep the same command highlighted when it remains in the menu. If it
  disappears, clear the selection and prevent submission from falling back to
  the draft. Restore the cursor, selection, and popup dismissal on reconnect.
- Honor configured submit chords in restricted slash command menus and prevent
  Tab from queuing the draft there.
- When users try to report an issue offline, scroll to the latest transcript
  entry to show the thread ID and prompt them to reconnect and retry.

## Testing

Add regression coverage for the `/export` to `/exit` case, popup state after
reconnect, offline Tab and submit chords, Vim command submission, and thread ID
visibility while scrolled back.

GitOrigin-RevId: 8143534f9d40e77a389d80d1dff3db993e194a23
2026-11-23 19:51:13 +00:00
jif 490e213e17 Terminate unregistered exec processes on startup interruption (#63415)
## Why

Interrupting `exec_command` after launch but before terminal registration
can leave the process running. The network denial monitor holds a strong
reference that prevents startup cleanup from dropping the process.

## What changed

Give the network denial monitor a weak reference so startup cleanup can
terminate the process on interruption. The monitor can still terminate a
registered process when a deferred network approval is denied.

## Testing

Add a regression test that interrupts startup while plugin attribution
is waiting on the exec server and checks that the server receives
`process/terminate` for the launched process.

GitOrigin-RevId: 54eb237028f9057d8520098b640782fe85c58331
2026-11-23 19:32:41 +00:00
jif 964fdd565e Remove the empty-preview rollout summary test (#63414)
## What changed

Delete the app-server unit test that reads a rollout containing only
session metadata and expects an empty preview when there is no user
message.

GitOrigin-RevId: fd033dec4e938b0352620ca76c448ae9e650493f
2026-11-23 19:13:12 +00:00
jif 8d867a0c7d Remove redundant Responses WebSocket v2 beta header test (#63409)
Other WebSocket handshake tests already verify that `OpenAI-Beta`
includes `responses_websockets=2026-02-06`. Drop the standalone test
that checks the same header.

GitOrigin-RevId: 844173591c7f1f2f7026fdc1f5414d7a41fcdc65
2026-11-23 18:58:26 +00:00
jif 9c7103216f Remove the app-server's test-only thread summary helper (#63408)
Delete `summary_from_thread_metadata` and the unit test that checks its
second-precision timestamp formatting.

GitOrigin-RevId: 917c0d28bb486c69baba8142ac84cc9057c6d5ee
2026-11-23 18:57:13 +00:00
Charlie Marsh 69477b3a77 Specialize blocking OTLP/HTTP providers for single-signal export (#63406)
## Why

The code-mode host only exports traces, and Windows sandbox setup only
exports metrics. Selecting the required exporter and HTTP client at compile
time lets the linker drop unused exporter and custom client code.

## What changed

Use `BlockingHttpService` for OTLP/HTTP JSON traces in the code-mode host
and Statsig metrics during Windows sandbox setup. These providers use the
OpenTelemetry SDK's default HTTP client. Traces use the dedicated batch span
processor even inside a Tokio runtime.

Move `codex_home` from `OtelSettings` to `OtelHeadersHelper`, where it
supplies the working directory for user-configured header commands.

## Testing

Exercise the blocking providers in HTTP loopback tests for trace export
inside a current-thread Tokio runtime and cumulative metrics temporality.

GitOrigin-RevId: 21bacbdb18b603f5f536532812ce7643e4eb36d6
2026-11-23 18:44:09 +00:00
jif 78fe0c9f23 Remove duplicate legacy MCP HTTP response size test (#63404)
The `mcp_2026_message_limits` suite already verifies that legacy MCP
over HTTP accepts a JSON `tools/list` response larger than 8 MiB. Drop
the duplicate test from `mcp_2026_discovery`.

GitOrigin-RevId: 9d6b0684558dd2749a32c5052388ff15758a9755
2026-11-23 18:41:38 +00:00
jif 70e009974c Remove the empty plugin list rendering test (#63401)
GitOrigin-RevId: 0b695079580e257f8de014c50d6797b2ff91a908
2026-11-23 18:27:38 +00:00
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 1b6ef00d25 Consolidate Responses WebSocket v2 continuation tests (#63398)
Fold the duplicate prompt-prefix case into the provider WebSocket support
test. Assert that both requests use `response.create` on the same
connection and that the follow-up sends the `previous_response_id` and
only the new input.

GitOrigin-RevId: 6d4c88aa4d8babf44b295ec9a1c8a1d4f6956adc
2026-11-23 18:16:40 +00:00
jif d56ae4699b Remove duplicate MCP HTTP response size-limit test (#63397)
## Why

`mcp_2026_message_limits.rs` already checks that the MCP client rejects
oversized HTTP JSON responses to `server/discover` and `tools/list`,
including HTTP error responses to `tools/list`.

## What changed

Remove the redundant test from `mcp_2026_discovery.rs`.

GitOrigin-RevId: ee04bf20a4b2f69d5aa7482fac83aef237d8d9ae
2026-11-23 18:16:00 +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 e7cde429e1 Consolidate Responses WebSocket streaming coverage (#63393)
The test for omitting the timing metrics header already streams through
a WebSocket-capable provider with no feature flags enabled. Assert that
it sends exactly one request over a single WebSocket connection and
remove the separate test that exercises the same setup.

GitOrigin-RevId: 15aa2d2b503c3e1accfdf0de80eddd91e0b982e4
2026-11-23 18:02:47 +00:00
jif a3fd52a61d Remove the disabled-app mention popup test (#63392)
GitOrigin-RevId: efb85449bb79f6bffe10813c4b36b7fd47add159
2026-11-23 18:02:10 +00:00
ioanbudea-OAI 74efed3bf3 Apply current approvals reviewer policy after thread revert (#63390)
## Why

If Guardian policy changes while `thread/revert` is in progress, restoring
the saved effective reviewer can carry an outdated policy decision into
the replacement runtime.

## What changed

Resolve the saved reviewer request against the current Guardian policy
when the replacement runtime starts. Use the previous effective reviewer
as the request if no explicit request was saved.

## Testing

Extend the revert regression test to switch the reviewer allowlist from
`auto_review` to `user` after the settings snapshot and verify that the
replacement honors the original `user` request.

GitOrigin-RevId: a66fceb19e201b921d111f7a299c2be2c8a451ad
2026-11-23 18:00:50 +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
Charlie Marsh d916a952a7 Preserve slashes in default branch names for remote diffs (#63386)
## Why

When the remote's default branch is `release/stable`, taking only the
last segment of its ref can make Codex diff against `stable` and include
changes already present on the default branch.

## What changed

Strip the `refs/remotes/<remote>/` prefix from the remote HEAD's
symbolic ref to preserve the full branch name.

## Testing

Add a regression test with both `origin/stable` and
`origin/release/stable`. It checks that the diff uses the
`release/stable` commit as its base and includes only the feature change.

GitOrigin-RevId: 527cfe47b5fecb9c178f9cfeb095ec66c6219260
2026-11-23 17:26:33 +00:00
Charlie Marsh af81d2770f Avoid cloning turn history in thread/fork (#63382)
Move the turns into the fork response and clone only the thread metadata.
The `thread/started` notification already omits turns.

GitOrigin-RevId: 8ffcefa3b6ed0908b511a58b53d034674ee8b668
2026-11-23 17:13:13 +00:00
jif ed02716c09 Omit final-answer schemas from legacy remote compaction (#63381)
## Why

Legacy models such as `gpt-5.2` emit compaction summaries on the final
channel, where the turn's JSON schema can constrain the summary.

## What changed

Remote V2 compaction omits the final-answer schema for the legacy
`gpt-5`, `gpt-5.1`, `gpt-5.2`, and `gpt-5.4-nano` model families,
with an exception for `gpt-5.2-codex`. It recognizes the same model names
with Bedrock's `openai.` prefix. Other models retain the schema in
compaction requests to preserve the cached prompt prefix.

## Testing

Integration tests check schema handling across model variants and verify
that compaction retries use the schema rules for the model handling each
attempt. Regular sampling retains the configured schema.

GitOrigin-RevId: f2ebaa7f3e272cb18ccb879dc7f67973ba1642cc
2026-11-23 17:11:57 +00:00
Charlie Marsh 1589e80b28 Fix project config diagnostics after an unknown setting (#63377)
## Why

When a project config contains an unknown key before an invalid setting,
deserializing the effective config directly can mask the type error users
need to fix.

## What changed

Reuse the TOML validation deserializer when diagnosing effective config
layers, with ignored-field path collection disabled.

## Testing

Extend the project config diagnostic test with an unknown key and verify
that the error still points to the invalid `tui.vim_mode_default` in the
current file after filtering out `tui.status_line_provider`.

GitOrigin-RevId: b124d0819ac34b2341f18fad7b6651ef0fe48379
2026-11-23 16:53:58 +00:00
chess 113e0c6d5e Allow per-subagent service tiers in spawn_agent (#63376)
## Why

Subagents can inherit the root session's service tier or get one from their
role. A per-spawn override lets a caller choose a tier for an individual
child without changing those defaults.

## What changed

Enable the optional `service_tier` argument for v1 and v2 `spawn_agent`
with `multi_agent_v2.expose_spawn_agent_service_tier`. The setting is off by
default, and tool schemas expose the argument alongside model selection.

Omit the argument to use normal inheritance, pass `default` to request
the default tier, or specify a tier available for the child's model and
provider. Unavailable explicit tiers return a spawn error.

Persist the child's choice across eviction and reload. Parent, sibling,
and descendant agents continue to use their usual tier selection.

## Testing

Extend coverage for tier selection in model requests, rejection of
unadvertised Flex on Bedrock, and restoration after eviction without
passing the override to grandchildren.

GitOrigin-RevId: 2e9b92af44232b6a5682fe2cd97980f17cbb5d97
2026-11-23 16:52:47 +00:00
ioanbudea-OAI 177c406276 Include completed audio transcripts in Guardian review context (#63368)
## Why

Guardian review can use spoken context when history supplies completed
transcripts for user recordings and tool results. Source labels distinguish
transcribed speech from typed user messages and identify the originating turn
or tool call.

## What changed

- Collect completed transcripts alongside their source history items so they
  participate in review delta selection. Respect tool output filtering.
- Preserve source labels when truncating transcript text. Quote and escape
  speech in line format so it cannot introduce a new role header.
- Support an optional `transcript_audio` elastic budget for synchronous and
  asynchronous reviews. Without it, user and tool audio use the message and
  tool budgets respectively.

## Testing

Add coverage for loading the audio budget in both reviewers, enforcing it in
line and JSON transcripts, and preserving the delta cursor as history grows.

GitOrigin-RevId: fa7e130b1212692e71a996528d8397826837a644
2026-11-23 16:14:06 +00:00
jif 22c1681aec Clean up network approvals when command startup is interrupted (#63365)
## Why

Interrupting `exec_command` while startup is pending can leave a stale
network approval registration. When the next command makes an untagged
request through the shared proxy, the stale entry makes request
attribution ambiguous and prevents an approval prompt.

## What changed

Tie the registration to the command's approval handle from startup
through completion. Remove the active entry and its stored outcome on
explicit completion or when the last handle is dropped. Cache the outcome
so that all deferred completion observers can report the same denial.

## Testing

Add a regression test that interrupts a pending launch and checks that
an untagged proxy request for the next command prompts for approval and
returns HTTP 403 when denied. Cover cleanup when the last deferred handle
is dropped and denial reuse across cloned handles.

GitOrigin-RevId: 257a32695c487a92d15937772b09085a49533fd3
2026-11-23 15:59:10 +00:00
felixxia-oai 6dbb6330a4 Exclude user image attachments from Guardian review evidence (#63364)
## Why

Large user image attachments can exceed the housekeeper's tool-output
budget and prevent it from processing later evidence.

## What changed

Strip image attachments and paired local-image labels from user messages
before budgeting and serializing review evidence. Preserve captions and
their provenance, and skip messages that have only whitespace or no
content left after filtering.

## Testing

Add a regression test that checks that evidence capture keeps text
surrounding a large inline image, skips an image-only message, and
advances the cursor past both to include later text.

GitOrigin-RevId: afd9f2dac4d787555b37655c6194def6d12d3a46
2026-11-23 15:58:31 +00:00
felixxia-oai 223b61a9a8 Refresh Guardian v3 evidence before retrying an approval review (#63363)
## Why

A user's authorization can change while Guardian is reviewing a tool call.
A retry could reuse the original evidence cutoff and miss a revocation
that arrived during the first attempt.

## What changed

Capture the root thread's history position when the action is bound and
defer evidence routing until Guardian prepares the review. Capture a fresh
position on retries or if authorization changed before the first attempt.
Use bounded history reads to catch up through the selected position and
wait for routing to reach it before submitting the assessment.

## Testing

Extend the app-server test to revoke authorization through a paused user
goal while an MCP tool call's approval is pending. Verify that Guardian
discards the stale allow, sees the revocation on retry, and denies the
tool call. Cover bounded history reads and shared routing progress in
unit tests.

GitOrigin-RevId: d7cf6f03412c4aa5399700427f40710da3123e52
2026-11-23 15:57:15 +00:00
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