## Why
PowerShell's `-Command` can report a native command's exit code `2` as
`1`, so a `PreToolUse` hook can fail to block a tool call.
## What changed
Use `$?` to preserve successful hook results and forward
`$LASTEXITCODE` on failure when available. Pass scripts with named
blocks through as written because PowerShell forbids trailing
top-level statements after those blocks.
## Testing
Add Windows regression coverage for a native command and a PowerShell
`end` block that each exit with code `2`. Both cases check that
`PreToolUse` denies `apply_patch` before approval, reports the denial
reason, and leaves the target file uncreated.
GitOrigin-RevId: 9668b1382bb56f168794dd8d4d2fecac13d2f649
## Why
A hosted child thread can inherit the root session ID and use a custom
session source. The existing subagent source check can miss that child,
allowing its shutdown to fire `SessionEnd` while the root is still active.
## What changed
Before preparing `SessionEnd` hooks, skip threads whose ID does not match
the session ID.
## Testing
Extend the shutdown test to close a hosted child with an inherited
session ID before closing the root and verify that exactly one
`SessionEnd` hook invocation is logged for the session.
GitOrigin-RevId: 4c80a17724cab57003b33080482d00f3cc2afea4
## What changed
Remove the background ranking of skill candidates and the metrics that
compared those rankings with skills actually used. Drop the experiment's
per-thread state and metrics wiring.
Continue accepting `skill_search` in existing feature configurations as
an ignored compatibility key.
## Testing
Extend the feature configuration test to cover both `true` and `false`
values for `skill_search`.
GitOrigin-RevId: 9492533bdeea58d4976bc9fbcffb6b82036b7894
## Why
The protocol and feature configuration crates depend on the network proxy
crate for data types. Give them a smaller dependency that contains the
shared definitions.
## What changed
Move environment network policies, domain and Unix socket permissions,
policy decisions and their sources, and credential provider definitions
into `codex-network-policy-types`. Use the new crate directly from
`codex-protocol` and `codex-features`.
Re-export the moved types from `codex-network-proxy` and keep environment
policy conversion and application, along with credential provider
validation, in the proxy crate.
GitOrigin-RevId: 8af684da746830bce45ac00135aed8052dba3824
## Why
Encrypted replies from subagents can provide evidence for a Guardian
decision. Reviewer compaction can drop those replies when it filters
descendant progress and completion messages.
## What changed
When native multi-agent history is enabled and the reviewer uses the
OpenAI provider, send encrypted replies from descendants to ancestors
as standalone `guardian.subagent_reply` tool outputs in Guardian review
and async scoring requests. Include the sender and recipient, preserve
the encrypted payload, and keep native message IDs in stored history
for deduplication.
Retain qualifying replies across reviewer compaction within the existing
per-message and shared token budgets.
## Testing
Extend regression coverage for incremental reviews, compaction recovery
with and without native agent review, and reply ID stability across
retained WebSocket scoring requests.
GitOrigin-RevId: bb46149426b1a60a6ed5cac6765283ec77682d23
## Why
MCP hooks could only use the default spill threshold. Hooks that return
larger context, such as a session-start memory hook, need a way to keep
more of that context inline.
## What changed
Allow `mcp_tool` hooks to set `additionalContextLimit` for events that
can emit `additionalContext`. Plaintext context spills to disk above
approximately 2,500 tokens by default. MCP hooks can set a threshold
from 1 to 10,000 tokens. A value of 0 or above 10,000 warns and uses
10,000. Hook trust hashes use the effective threshold.
Expose the setting in app-server configuration requirements and hook
list responses.
## Testing
Cover limit normalization, warnings, trust hashes, and app-server
reporting. Verify that a bundled memory hook with a higher threshold
injects its full context at startup and after compaction.
GitOrigin-RevId: 318704ac1532267b3eb2f138f130b6799863a5c0
## Why
An ancestor's `.git` marker can change the repository root discovered by
the tests, which affects the paths in the emitted turn diffs. Manual
cleanup at the end of the shared-path test can also be skipped when the
test fails early.
## What changed
- Add `.git` markers to keep repository discovery within the fixtures.
- Reuse the executor's working-directory path on both filesystems and
give the local directory a `TempDir` owner so both fixtures are cleaned
up when the test exits early.
GitOrigin-RevId: 2534688ae1ed4aace16d47f6f58e461e546dc8ee
## What changed
Increase the truncation threshold from 1,000 to 10,000 tokens so more
of each additional context value reaches the model. Add a 40 KiB bucket
boundary to the `codex.additional_context.value_bytes` histogram.
## Testing
Update the integration tests to check middle truncation and size metrics
at the new limit, verify that an application context value at the limit
survives compaction, and check that representative truncated values
fit in the new histogram bucket.
GitOrigin-RevId: 260dae5c01816e2383c10d81ddb90b8e937fd8c0
## Why
The review's `turn_id` alone can't identify the root turn of the action
being reviewed. For example, a background terminal can request network
access during a later turn.
## What changed
Add an optional `root_turn_id` to `codex_guardian_review` events. When
a verified execution tag ties a network request to a registered tool
call, use the root turn ID captured when the call started. Leave the
field unset when the reviewed action's root turn is unknown.
## Testing
Extend the MCP approval test to check the reported root turn ID. Cover
untagged network requests and verify that a cross-turn network review
reports the active turn's `turn_id` alongside the issuing turn's
`root_turn_id`.
GitOrigin-RevId: f0ae40ec4fc441891b4d843912f823a2385fa36f
## Why
Codex stored voice selections in `realtime.voice` and supplied voice overrides when starting realtime sessions. Reading and saving the ChatGPT account preference lets Codex use the same voice selection as ChatGPT.
## What changed
- Add experimental `account/voiceSettings/read` and `account/voiceSettings/write` methods. The terminal voice picker shows the selected voice and available display names, then saves the chosen voice ID to the connected app server's ChatGPT account, including when the server is remote.
- Require ChatGPT sign-in for terminal voice chat and create its WebRTC calls through the ChatGPT backend.
- Remove voice overrides from realtime session startup. Existing `realtime.voice` entries still parse but are ignored.
## Testing
Cover voice picker loading and saving, remote catalog failures, the ChatGPT sign-in requirement for local calls, and omission of voice overrides from realtime call payloads.
GitOrigin-RevId: 9e6f30b8020c47701d3c1604075063924f191685
## Why
Some test fixtures depend on `python3` being on the host's `PATH` or
on reading Rust's process arguments from a constructor. Bazel workers
need a declared Python runtime, and musl does not provide those
arguments to constructors.
## What changed
- Put Bazel's Python 3.12 runtime on `PATH` for Linux test suites that
invoke `python3`, including their Wine launchers.
- Use standalone helper binaries for exec-server and sandbox fixtures on
musl, and read `/proc/self/cmdline` for the MCP hook fixture.
- Add launcher options for test execution tags and for routing selected
Linux cases to a local companion target that shares the test binary.
- Adjust test fixtures for platform differences in file creation
timestamps and shell script execution. Keep cloud-config error tests
pointed at their mock server after startup falls back to defaults.
## Testing
Exercise marketplace upgrade negotiation at Git 2.20 and check whether
the installed Git supports limiting the refs advertised by the clone.
GitOrigin-RevId: 3a83cde954d52ca29d346d67488c9a25c0790614
## Why
The baseline for comparing additional context submissions lived in memory,
so resuming a conversation could append context that was already in its
history.
## What changed
Persist the rendered fingerprints and history item IDs for active context
entries in world state. Reuse unchanged entries across turns and resumes,
and use their IDs to restore active items during compaction.
A client submission replaces the active set. Tool-provided context updates
only its own keys and is recorded after tool results, before the next
prompt.
## Testing
Extend scenario coverage to check deduplication after resume for both
message and tool-output rendering. Verify that edits in the truncated
portion of application context do not produce duplicate developer messages.
GitOrigin-RevId: 12a65a70d871f8dcefa082825c0ec4e9446efb56
## Why
Dynamic tool clients could return JSON as text in `contentItems`, so Code Mode scripts had to parse that text to access fields in the result.
## What changed
App server dynamic tool requests advertise `supportedResultFormat: "structuredContent"`. Clients can reply with `structuredContent` and a `success` flag, report a failure with `errorMessage` and `success: false`, or continue using `contentItems`.
Code Mode exposes structured replies as MCP-style tool results, with the original JSON under `structuredContent` and failure status in `isError`. Completed tool items include a text representation of the reply. Matching post-tool-use hooks can receive the structured result for successful calls.
## Testing
Add protocol tests for the wire formats and rejection of ambiguous replies, plus an app server integration test that exercises structured results, content items, and errors through Code Mode.
GitOrigin-RevId: d63152633b43bd5bd236f6e0dcb41ee7e98e7947
## Why
A saved command allow rule can skip review, but it cannot authorize
broader filesystem access when the sandbox enforces read denials. This
left explicit escalation requests running with baseline permissions even
when Guardian could review the request and the executor could preserve
the denials.
## What changed
Route those explicit `exec_command` escalation requests through Guardian
when auto-review is configured and the executor supports widening access
while preserving read denials. Tell Guardian that approval can broaden
filesystem access outside the denied paths and globs.
Evaluate read denials and sandbox selection using the target executor's
path conventions. A `:slash_tmp` denial applies on Linux and has no
effect on Windows.
## Testing
Cover Guardian approval and rejection for commands with saved allow
rules, plus `:slash_tmp` handling on current and legacy Linux and Windows
executors.
GitOrigin-RevId: abfe9888a1e168cfebb64e3faf12546e1f626aa2
## Why
Guardian could resolve root instructions for locally managed agents through the
agent tree. Detached workers need their host to supply that evidence so Guardian
can evaluate their actions against the root user's instructions.
## What changed
- Let trusted hosts capture reusable root evidence, watch for committed changes,
and select handoff context for each worker. Supply that evidence to Guardian
while keeping it out of the worker's conversation.
- Bound hosted evidence reads by the review deadline and cancellation. Recheck
root evidence before approving, and invalidate cached authorization when the
root runtime is replaced.
- Let a cached score end a pending review only when it covers the action under
review and its worker and root evidence revisions still match.
## Testing
Add coverage for hosted reviews that receive root instructions, unavailable and
stalled evidence reads, root replacement, and delayed scores for an earlier tool
call.
GitOrigin-RevId: 52553041ef449a2e180f9f1b7fc261dcbcb76f01
## Why
Identical instructions and tool descriptions can appear in multiple
model catalog records. Each decode or clone previously allocated its own
copy of that text.
## What changed
Use `CodexCachedStr` for catalog instructions, messages, and tool
overrides. It stores short strings inline and interns longer strings so
independent decodes and clones can share storage. Resolved incremental
tool messages also reuse cached text from overrides and bundled defaults.
JSON and generated TypeScript still represent these values as strings.
## Testing
Add tests for shared storage across catalog fields, independent decodes,
clones, and incremental tool defaults. Cover plain JSON string round
trips and borrowed access to short inline UTF-8 strings.
GitOrigin-RevId: 6f53b4e19f01f6ed52a8fd364279b924cf794be2
## Why
Agents could send async user messages only through a top-level tool call, even in code mode.
## What changed
Set `features.send_message_to_user_async.direct_only` to `false` to make the tool follow the session's tool mode. Direct mode exposes it as a top-level tool, code mode allows both top-level and nested calls, and code-mode-only sessions require nested calls and reject direct calls. The default keeps the tool top-level only. Existing agent opt-ins still apply.
## Testing
Add integration coverage for tool visibility, call results, and message delivery across all three tool modes with both values of `direct_only`. Improve failure diagnostics in the multiline shell snapshot test and paste `/status` as a single input event in the daemon compatibility test.
GitOrigin-RevId: c69bb2fba8bf776eff01382d8869fc869fc9d479
## Why
End-to-end tool duration does not show how much time `exec_command`
spends collecting its initial output. Tracking the duration and call
count separately lets readers of the metrics compute the mean
collection time for each configured shell snapshot mode.
## What changed
Record the initial output collection time in whole milliseconds and
count each successful process manager response, including collections
shorter than a millisecond. The timing starts after the early-exit wait
and can include draining output after the process exits.
Tag both counters with the configured `shell_snapshot_mode` (`disabled`,
`v1`, or `v2`), including when execution falls back. Intercepted patches,
process manager errors, and `write_stdin` calls are excluded.
## Testing
Extend a unified exec integration test to check that the recorded time
matches the initial response within one millisecond, both counters carry
the `v2` tag, and a subsequent `write_stdin` leaves the count at one.
GitOrigin-RevId: 289336cf2544a78abb3417484b48d2d22109a56c
## What changed
Build the retry from the initial sandbox attempt. When policy permits an
unsandboxed retry, clear the sandbox settings and mark the command as
`RequireEscalated` for approval. When policy requires the sandbox to stay
in place, reuse the initial attempt so a network retry preserves file read
restrictions.
## Testing
Cover both Guardian verdicts after a sandboxed attempt. An approved retry
reaches the exec server without a sandbox, and a denied retry is blocked
before it reaches the executor.
GitOrigin-RevId: 5bf36dd4f43b7c0379457b88b8ddbf3dbd482b87
## Why
Codex needs rejected audio file IDs when reconstructing a session so
later model requests can omit those attachments. Clients only need the
turn error.
## What changed
Store rejected audio file IDs as rollout metadata and restore them from
that metadata when replaying history. Keep the existing JSONL layout
under `error.rejected_audio_file_ids` so older versions can still read
newly written rollouts.
## Testing
Add a regression test that round-trips a legacy rollout entry and
verifies that serializing the protocol event omits the rejected IDs.
GitOrigin-RevId: 982dd85d0037cebee056caf61d70988762e42767
## Why
Mailbox preemption can discard partial response items, and turn item
contributors can rewrite completed items. Parsing those items as soon as they
arrive does extra work before their final contents are known.
## What changed
During mailbox draining or when turn item contributors are registered, track
new response items as deferred, suppress their text and reasoning deltas, and
wait for `OutputItemDone` before parsing them. Rely on the response client to
carry the added item's ID forward when the completion omits it.
## Testing
The mailbox preemption tests check that a buffered reasoning item completes
exactly once under its original ID when the completion omits it, and that raw
reasoning deltas for a discarded item stay hidden.
GitOrigin-RevId: 940e062c8c44faa6670945262ee8c8f16abf4e20
## Why
Selecting the final item in an idle thread's history ties Guardian review
to what was recorded. For example, a client may record an `exec` script
and need an assessment of an individual `exec_command` from that script.
## What changed
Require `toolCall` in the experimental `thread/guardianReview` request.
Guardian assesses the supplied `function_call` or `custom_tool_call`
against the idle thread's full history without appending or executing it.
## Testing
Cover rejection of requests missing `toolCall` and verify that Guardian
sees the recorded script alongside each command submitted for review.
Check that only the original script call is persisted in the thread.
GitOrigin-RevId: a1ce61e10e98107b38db60071dd63f189ef33ad1
## Why
A pending native agent call can appear alongside historical tool calls in
Guardian's review context. Explicit request boundaries identify the exact call
Guardian should judge.
## What changed
Add the off-by-default `guardian_native_action_framing` feature for Multi-Agent
V2 reviews with native multi-agent history enabled. Wrap the pending call and
its evidence-only output in approval request markers, and point the transcript
entry to the current request.
Keep the call-ID reference when reviewer history already contains the call.
Reserve room for the approval markers when budgeting screenshots so a retry
can replay the framed call if reviewer history changes.
## Testing
Cover call deduplication, replay after compaction, and screenshot admission at
the token limit. Update the incremental review scenario to show the framed
`send_message` call alongside encrypted parent reply history.
GitOrigin-RevId: dd99cd4ad4cf3451afe30d2e93aa3e47b493a4c4
## Why
Required MCP servers can finish at different times even when their startup
notifications arrive together. Notification arrival times cannot show how long
each server took to start.
## What changed
Measure each startup attempt and expose its elapsed milliseconds as
`durationMs` on `ready` and `failed` updates from
`mcpServer/startupStatus/updated`. Successful Codex Apps reconnects report
their own duration. Reused connections, `starting`, and `cancelled` updates
carry `null`. The protocol accepts notifications from older servers that omit
the field.
## Testing
Cover distinct durations for fast and slow required servers, timing through
lease registration for newly opened shared connections, and a fresh duration
after Codex Apps recovery.
GitOrigin-RevId: 39c0c418149dd2b220828be04d998085f57acf2d
## Why
MCP tools can return structured data alongside a JSON text fallback for
clients that need it. Printing the whole result in Code Mode can show
the same data twice.
## What changed
Enable `features.code_mode_mcp_result_dedup` to let `text()` omit
`content` when it prints an original, successful MCP result whose only
content block is a plain text fallback that parses to the same JSON as
`structuredContent`. The JavaScript result retains both fields.
Carry the result format through gRPC so the host can distinguish MCP
results from ordinary JSON. The feature is off by default.
## Testing
Add coverage for both feature flag settings, for printing original MCP
results and copies through gRPC, and for comparing equivalent JSON.
GitOrigin-RevId: a8b0b42f5375d9744c235a0e663090dd5982e37e
## Why
The model catalog can stay stale when a server advertises a new
`x-models-etag` only in the WebSocket handshake.
## What changed
Save the handshake ETag through warmup and emit it as a
`ResponseEvent::ModelsEtag` at the start of the first generation on each
connection. Emit it once so reusing the connection cannot replay an old
ETag after response metadata advertises a newer one.
## Testing
Add regression tests for ETag delivery with and without warmup, across
connection reuse and reconnects, and for a single catalog refresh when
the handshake is the only source of the ETag.
GitOrigin-RevId: f8fcaae4aaa0f245f01435b665cecb105c261852
## Why
An extension that manages its own credentials needs to refresh them
without restarting an MCP session, while keeping each session tied to the
identity that opened it.
## What changed
Add `McpServerContribution::SetWithAuthProvider` for host-local Streamable
HTTP servers. Codex asks the provider for fresh headers on each request.
It reuses the connection across credential refreshes for the same owner,
rejects requests whose owner differs from the session owner, and rebuilds
the connection when the active owner changes.
Provider-backed servers reject conflicting credential configuration,
disable HTTP redirects, and bypass the shared startup tool catalog.
Rebuilding the catalog disables a provider-backed registration if its
transport changes.
## Testing
Add coverage for credential rotation, owner changes, conflicting auth
configuration, transport changes, and tool discovery for the current
owner.
GitOrigin-RevId: 409cbb2237ff306932491335461e87cf5a9ec890
## What changed
Make `ThreadStore::model_ids` return a `ThreadStoreResult` and require
persistent backends to preserve alias assignments across restarts for the
lifetime of the session.
The local store returns an explicit error if its state database is
uninitialized. The in-memory store returns its shared alias store, and
the core test wrappers delegate to their underlying stores.
GitOrigin-RevId: ca0d4bcf1c7dfa96f1a877b421760483b0cf3acc
## Why
Interrupting a turn during extension setup or Git root discovery could
leave its prompt missing from resumed history. Interrupting a blocking
start hook could also cause the next turn to skip that hook.
## What changed
Run the input hooks and record accepted input before setting up skills
and plugins or resolving diff display roots. Run those setup steps
concurrently and cancel diff root discovery when the turn is cancelled.
Keep each start hook event queued until its outcome has been handled so
the next turn can retry it after forced teardown. If cancellation has
already been requested, defer events with matching synchronous hooks
while still processing events that match only asynchronous hooks.
## Testing
Add regression coverage for resuming with the interrupted prompt and
the turn-aborted marker, retrying a blocking start hook after
interruption, and handling synchronous and asynchronous hook matches on
a cancelled turn.
GitOrigin-RevId: 7ee1ca6a099f6af65aa0074897af51963b9cdca7
## Why
Codex does not use sequence numbers on text or custom tool input deltas.
## What changed
Add `delta.sequence_number` to the default `x-codex-exclude-stream-fields`
header for Responses requests over HTTP and WebSocket. Explicit provider
header values still take precedence.
## Testing
Update the WebSocket handshake and HTTP output-token replay tests to
expect the new default.
GitOrigin-RevId: d16ecb10f9188ba9cca4504e1b68e32832fb931a
## Why
MCP hook results were flattened to text, so `SessionStart` hooks could
not pass encrypted context to the model as encrypted tool output.
## What changed
Recognize text blocks marked with `codex/encryptedContent` in synchronous
MCP `SessionStart` hooks. Send them to the model as standalone
`function_call_output` items with the originating tool name and namespace.
Keep ciphertext out of hook previews and plaintext spill files. Reject
empty encrypted blocks and cap the serialized encrypted output at
40,000 bytes per hook run.
## Testing
Add a scenario that checks that ciphertext above the plaintext spill threshold reaches
the first model request unchanged, appears once after a cold resume, and
stays out of hook previews and spill files. Cover discarding encrypted
context when hook output fails JSON parsing under both failure policies.
GitOrigin-RevId: cbc11c6f7055cc131212c6e9ddd37a882ed61d38
## Why
Reasoning replay only needs the ciphertext from the completed item, so
sending it when the item is first added is unnecessary.
## What changed
Default `x-codex-exclude-stream-fields` to
`reasoning.added.encrypted_content` on Responses HTTP streams and WebSocket
handshakes. Provider-configured values take precedence, and an empty value
opts out. Use a separate header to preserve compatibility with servers that
recognize `x-codex-exclude`.
## Testing
Extend integration tests to cover the default on both transports, provider
overrides, and replay with or without preliminary ciphertext.
GitOrigin-RevId: 83b72e5dd896f96e2793e67f0f05828218b98af7
## 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
## 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
## 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
## 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
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
## 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
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
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
## 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
## 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
## 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
## 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
## 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
## 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
## Why
Async user messaging was limited to root agents. Spawned subagents need
their own opt-in so they can send messages without requiring the root
feature flag.
## What changed
Add independent `root_agent` and `subagents` settings under
`features.send_message_to_user_async`. For example, this opts spawned
subagents in and turns off the root feature flag:
```toml
[features.send_message_to_user_async]
root_agent = false
subagents = true
```
The existing boolean shorthand still sets the root feature flag, and the
model catalog can still enable the tool for the root agent. Config layer
merges, CLI overrides, and feature toggle edits preserve the separate
`subagents` setting when changing the root flag.
## Testing
Extend coverage for tool availability across root agents, spawned
subagents, and compaction helpers, and for preserving the subagent
setting when applying boolean overrides.
GitOrigin-RevId: 5f34f182bc107d32797143a58f0d79395767ed49
## Why
Incremental updates to nested tools can leave the model with a stale
`functions.exec` declaration when a global helper changes. For example,
resuming a session with unified image budgeting can change the advertised
signature of `image`.
## What changed
Track the signatures of global helpers supplied by the description renderer
and redeclare the full `functions.exec` catalog when they change, including
when an override removes those helpers. Send the configured incremental
tools hint once before the first namespace declaration in an update,
including updates that only redeclare `functions.exec`.
## Testing
Cover helper removal and session resume with bundled helpers, an
`{{ image_helper }}` override, and a helper-free override. Verify that a
changed signature triggers one refresh and subsequent turns reuse the
refreshed declaration.
GitOrigin-RevId: a1c216879be8eb5b331485984c86bf872b0b7a17
## Why
When the resolved permission and approval guidance is blank, the initial
context still includes a developer message containing only the permissions
wrapper.
## What changed
Omit that message when the guidance is empty or whitespace-only. Keep a
permissions checkpoint so later turns can report newly saved command
prefixes. Continue sending bundled approval guidance when it applies.
## Testing
Cover blank and bundled approval guidance and later command-prefix updates
with and without per-environment context. Update Guardian request snapshots
to reflect the omitted empty message.
GitOrigin-RevId: b1e2b6377733ec34b875b51d800922e15c267571
## 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