## Why
V1 tools could use a thread ID to reach agents in another session. A
thread ID can also resolve to a different runtime after a thread is
unloaded and reloaded.
## What changed
- Check session ownership before sending input, interrupting, waiting on,
closing, or resuming a V1 agent. Keep live operations bound to the
runtime that passed the check.
- Check ownership in saved rollouts before resuming agents and their
descendants. Follow the recorded parent chain for legacy rollouts that
lack a session ID. Release the agent slot when closing a known ephemeral
agent that has already been unloaded.
- Preserve failed `wait` calls in thread history and show the failure in
the TUI without listing rejected targets as completed agents.
## Testing
Add regression coverage for cross-session input, close, and resume
requests, slot reuse after closing an unloaded ephemeral agent, legacy
session recovery, and failed wait history and display.
GitOrigin-RevId: 4712a53315d24d5658d746ed277738e00a4e2dac
## Why
A turn can contain multiple Guardian reviews, and denial reconsideration
can produce multiple responses for one review. Thread and turn IDs alone
cannot identify which review and provider response produced the recorded
decision.
## What changed
Add `review_id`, `reviewer_request_id`, and `reviewer_response_id` to opt-in
Guardian failure reports when available. Keep the provider IDs with the
selected decision, including the original denial when reconsideration
fails and falls back to it.
## Testing
Extend tests to check the recorded IDs for initial and
reconsidered denials and verify that an invalid retry preserves the
original denial's IDs.
GitOrigin-RevId: 4bd906bfb9a80808cb3c2a8ac71c5354d4caad1f
## Why
When a test spans midnight, the environment date can change between turns
and alter the request history.
## What changed
Use a shared fixed clock for the catalog permission-path model-switch
and repository skill grant history tests. The clock keeps the environment
date stable with time reminders disabled.
GitOrigin-RevId: 7c3ad23547cd9126c6115aeeea6806b32c04dd69
## Why
When a Node REPL-backed MCP tool requests approval through an elicitation
callback, the trace loses the parent-child relationship between the callback
and the Guardian review.
## What changed
Parent the Guardian review span to the callback span when its
`traceparent` is well formed and its trace ID matches the active tool
invocation. Preserve the invocation's sampling flags and `tracestate`,
and strip both trace fields from the elicitation metadata before it
reaches approval handling or user prompts.
## Testing
Cover callback span parenting and trace propagation to Guardian inference,
including rejection of unrelated trace IDs and malformed headers. Verify
that form and URL prompts retain other metadata while dropping trace fields.
GitOrigin-RevId: 942b61a0da81b5d549c9f4813b28101bba622a26
## Why
Mixed Code Mode can call MCP tools excluded from both direct and deferred
exposure, but the `exec` description omitted their signatures and server
instructions.
## What changed
Include exec-only tool declarations, shared MCP types, and namespace
instructions in the mixed-mode `exec` description. Cap this material at
64,000 bytes and point to `ALL_TOOLS` for declarations that do not fit.
Tools exposed directly continue to carry their own declarations.
## Testing
Extend integration coverage to verify that both Code Mode variants can
call MCP tools excluded from direct and deferred exposure. The mixed-mode
case checks that an oversized namespace is omitted from the description,
its tools remain callable through `ALL_TOOLS`, and a smaller namespace
still shows signatures and server instructions.
GitOrigin-RevId: 6ad4e68d85f6b2dfdafb8ccd55755d80651c0b6c
## What changed
Set `use_responses_lite` for all `global.` and `us.` model profiles in the Bedrock Runtime catalog.
## Testing
Update the catalog test to require Responses Lite for every Runtime profile. Update the request test to check that the selected model ID is preserved, the Responses Lite header is sent, and `additional_tools` declares `functions.exec` while omitting `web_search`.
GitOrigin-RevId: 7bd3d793f6365d4bffdf51528eeb3dac0d441aba
## Why
The Bedrock catalog cleared the bundled tool mode, so models configured
for Code Mode did not get that default on Bedrock. Runtime inference
profiles also discarded the base model's tool search capability.
## What changed
- Inherit the bundled tool mode on standard Bedrock endpoints. Leave
the mode unset for GPT-5.5 and GovCloud Mantle so Code Mode settings
determine tool exposure there.
- Inherit model-level tool search support in global and US cross-region
Runtime inference profiles.
- Keep full Responses requests so Mantle can expose cached web search
alongside Code Mode.
## Testing
Add coverage for Runtime profile capability inheritance and GovCloud
Mantle defaults. Verify that GPT-5.6 Sol on Mantle sends both
`functions.exec` and the text-only cached web search tool.
GitOrigin-RevId: dca35b5ca08321b5a906b442dbcbdec648ffdcea
## What changed
Add `x-codex-installation-id` to Responses API HTTP requests and WebSocket
handshakes when an authorization header is attached and the destination is
a trusted OpenAI endpoint. Use the persisted installation ID already sent in
`client_metadata` and mark the header value as sensitive.
## Testing
Cover header delivery over WebSocket and HTTP, retention across a trusted
redirect, and omission for unauthenticated requests and third-party endpoints.
GitOrigin-RevId: 3fa83816cc91584944d6023680ba0dd05fbca138
## What changed
Add an optional `usage_url` to model provider configuration and carry it
through remote thread configuration. Expose `read_provider_usage` to
fetch the current user's monthly USD spend, optional cap and percentage
used, and reset time.
Use the provider's own credentials for the request. Reject redirects,
disable interactive gateway login, and enforce same-origin validation
for gateway OAuth configurations that require it.
## Testing
Cover capped and uncapped spend, percentage rounding, and malformed
responses. Verify usage URL validation and remote configuration
round-tripping.
GitOrigin-RevId: ed805a756aab6e55c24751f0285bfe73b9091f07
## Why
A prediction fork that disables MCP inherits the parent's tool declarations,
but recomputing the deferred tool list can append a conflicting declaration
to the request.
## What changed
Skip the deferred tool list update when the fork preserves the parent's tool
declarations. The fork still reports MCP tool unavailability separately.
## Testing
Extend `prediction_fork_keeps_inherited_tools` to cover both inline and
deferred MCP tools and assert that the fork carries exactly the parent's
`<tools>` messages.
GitOrigin-RevId: 04b4a542e0d587a20706935e8b028b7f1fdb9209
## Why
Restoring active context after compaction selects retained messages can
move it across user turns. For example, instructions for a context-only
heartbeat can end up before an earlier, already answered user question.
## What changed
Retain active context in source order when building compacted history
and resetting the context window. Use the full items from live history
so active tool outputs and messages survive prompt shortening.
## Testing
Add regression coverage for a heartbeat that compacts mid-turn, and
verify ordering around repeated user message IDs and pending agent
messages in local and remote compaction.
GitOrigin-RevId: b670f3c4e87331a61986b4c163f892e43bd0261d
## Why
Several invalidations can be handled by a single MCP runtime refresh. Recording the reasons together shows which changes prompted that refresh.
## What changed
When `mcp_refresh_reason_telemetry` is enabled, successful MCP runtime refreshes report a `codex_mcp_runtime_refresh_event` with distinct reason labels, a timestamp, and thread and session attribution. The flag is off by default.
Multiple installed-plugin metadata changes collapse to one `installed_plugin_metadata` label. The event omits configuration contents and plugin change IDs. Analytics buffers refresh events that arrive before their thread context is available.
## Testing
Add an integration test that queues multiple invalidations and verifies that one event with deduplicated reasons and the correct thread and session IDs is sent after thread start is recorded.
GitOrigin-RevId: 639326d0cb993b8b3a0fcbf0618049cb2ff065fd
## Why
When a turn has no execution environments or other environment context
to report, Codex can skip the environment update before reading the host
roster. The model then misses any active subagents in that roster.
## What changed
Keep the initial environment update until Codex has had a chance to
attach the host roster. Emit `<environment_context>` when the roster is
its only content, and drop the update if it is still empty.
## Testing
Add integration coverage for roster-only context and empty context in
both the default and per-environment formats.
GitOrigin-RevId: 6ceffd9aa13fefa31387c4d598a81a4281554c1c
## Why
A thread store that resolves the last inherited turn during fork preparation
can reuse that ID when creating the child instead of resolving it again.
## What changed
Forward the optional `last_inherited_turn_id` from `PreparedFork` to
`CreateThreadParams` alongside the inherited history position. Omit the
field from serialized creation parameters when no ID is available.
## Testing
Add a regression test that checks the in-memory thread store receives the
turn ID supplied by the prepared fork when it creates the child.
GitOrigin-RevId: 709c8cc4a744b2f893af6233e825026a27732873
## Why
Startup prewarm runs in the session startup trace, while the first turn
can run in a separate trace. The first-turn trace needs a way to show
which prewarm task it resolved, including when the wait times out.
## What changed
Record `startup_prewarm.resolve` at info level under the first-turn span.
Capture the startup prewarm span context when scheduling the task and
attach it as an OpenTelemetry span link during resolution. If the prewarm
span is filtered out, omit the link.
## Testing
Check exported spans for first-turn parentage, link behavior with the
prewarm span enabled or filtered out, and no second resolution on a
later turn. Add a regression test for retaining the link on timeout.
GitOrigin-RevId: ef4a19be64ecf145b17527081960e50adca3b92e
## Why
MCP runtime refreshes waited for capability discovery and host MCP
configuration to finish before requesting HTTP MCP servers from the selected
remote environment. That serialized two reads that can be in flight together.
## What changed
Start the remote environment config read alongside host MCP configuration,
including executor capability discovery. Start the read's 10-second timeout
after host configuration is ready so a serial executor can queue the read
behind discovery without consuming its timeout. Merge the results with host
server precedence and requirements still enforced.
## Testing
Add V1 and V2 integration cases that hold both executor replies until both
requests arrive, then verify host precedence and requirements. Add a
paused-clock test that covers a queued read and confirms a stalled read
times out 10 seconds after discovery completes.
GitOrigin-RevId: d974f0f575559bfe6b756de11aa460399fdabf25
## Why
Codex can intercept an `apply_patch` heredoc passed to `exec_command`
and apply the patch directly. That path ran shell hooks but bypassed
`apply_patch` hooks, so patch-specific rules could miss the same edit
when it was submitted through the shell tool.
## What changed
- Run `apply_patch` `PreToolUse` after shell hooks and before file
verification. Hooks can block or rewrite the patch, and the final
patch is checked against the selected environment's permissions.
- Report the executed patch through `apply_patch` `PostToolUse`. Link
the patch hook events to the outer shell call with
`parent_tool_use_id` and provide working-directory and filesystem
metadata for hooks that inspect patch targets.
- Apply the same block and rewrite rules in recorded Guardian reviews.
Mark those hook requests with `review_only` and review the resulting
patch without executing it or publishing hook-provided context.
## Testing
Add coverage for hook blocks and rewrites, effective working directories,
environment permissions, and cancellation before and after a patch write.
Cover recorded reviews of rewritten patches and reviews stopped by a hook.
GitOrigin-RevId: 2115f26261a20d4a512669bc9e277a764b8f42f4
## Why
A V3 worker can resume its conversation after stopping. Reporting results
explicitly lets the worker decide when to send a result to its parent,
independently of when a turn ends.
## What changed
Stop forwarding V3 workers' final answers as automatic success results.
Continue forwarding failures and preserve automatic results for V2. Update
V3 prompts and tool descriptions to tell workers to send their result and
call `stop_agent` to release their slot.
Keep `send_message` available in the V3 native tool set even when
`disable_direct_message` is set. When native tools are enabled, require both
`send_message` and `stop_agent` to survive tool policy filtering for V3
workers, including on resume.
Track accepted worker-to-parent reports until they are written to the
parent's rollout. Preserve unread reports for the next turn if a turn
triggered by a report is interrupted.
## Testing
Extend the idle eviction scenario to verify that a resumed V3 worker's
explicit report reaches the parent's rollout exactly once after turn
admission is deferred and the subsequent wake is interrupted.
GitOrigin-RevId: 9bf95a4358bca9778797c7064f9eaf20c8679a81
## Why
When a worker's current turn is no longer needed, the caller needs to
know when that turn has released its execution slot. Previously,
`interrupt_agent` returned without waiting for the slot to be released.
## What changed
Replace `interrupt_agent` with `stop_agent` in V3. When stopping a loaded
worker, the tool waits for the interrupted turn to release its slot.
A message can resume the worker, and queued input can reclaim the slot
immediately.
Workers can target their own path to stop after the current tool batch
if no new input is waiting and no send failed.
## Testing
Extend the V3 mailbox test to cover self-stop freeing the only worker
slot, a message waking another worker, and the parent stopping that
worker and observing its interrupted status.
GitOrigin-RevId: b066d10e4221fabe49b07ed126752e2e88e9517b
## Why
A tool-list page can take multiple attempts. Tracing the whole page
keeps retry warnings tied to the page that triggered them.
## What changed
Wrap each `tools/list` page request in an `mcp.tools.list_page` span
that covers the retry loop. Record whether the request has a cursor
via `mcp.has_cursor`.
## Testing
Extend the trace propagation test in both MCP protocol modes. Return
HTTP 503 on the first request for the second page and verify that the
requests carry the page span context, the cursor flag reflects the
request, and the retry warning appears on the page span.
GitOrigin-RevId: e4b695731d037f71c15660a826c9f2e59d02e55f
## Why
Deferred remote environments previously waited for provisioning to succeed
before looking up the executor and starting the Noise handshake. Starting
that work while provisioning is pending can shorten the wait for a usable
exec-server session.
## What changed
When a deferred Noise environment is selected, start executor lookup and
the handshake with a bounded retry window. After provisioning succeeds,
refresh the connection bundle and reuse the early connection if it is
still live and matches the current environment, executor registration,
and public key. Otherwise, establish a fresh connection. Exec-server
session initialization still waits for provisioning success, and a
provisioning failure cancels the early connection.
## Testing
Cover early connection reuse, fallback when the executor changes or the
socket closes, and cancellation on provisioning failure. Verify that
malformed handshake replies surface as protocol errors and that connection
resets remain retryable.
GitOrigin-RevId: 658135338672f0c02c33d9203299b05ba15d1fc2
## Why
A `write_stdin` call can resume after its turn is cancelled if approval was still pending. It can then send stale input to a running terminal or consume the final output of a remote process that has already exited.
## What changed
After approval, check both tool-call and turn cancellation before a non-empty `write_stdin` request can send input or drain output. Report cancelled writes as aborted and surface the abort as an error to Code Mode cells that are still running. Empty polls can still collect buffered output.
## Testing
Regression tests cover cancellation during stdin approval for direct and Code Mode calls, reuse of the same terminal on the next turn, and retrieval of final remote output after a cancelled write.
GitOrigin-RevId: 735bdd7ed0e892467647039ba72eb9a4d177a560
## Why
A worker can send a message and ask to stop in the same response. It
needs to see any send failure before going idle so it can respond to
the error.
## What changed
When a V3 worker targets itself with `interrupt_agent`, finish the
current tool batch and skip the automatic model follow-up if no
`send_message` call in that batch failed. Pending input can still
trigger another model request. Scope the stop to the sampling attempt
so it cannot carry over to a retry.
## Testing
Extend the mailbox integration test to cover a truncated response, a
send failure alongside a self-stop, and a subsequent self-stop that
runs the `SubagentStop` hook and frees the worker slot.
GitOrigin-RevId: 62e377026d32ffc59d1ea5b88030ce9148d414b4
## Why
With only one worker slot, starting a replacement can fail while the
interrupted worker is still cleaning up its turn.
## What changed
Add `CodexThread::stop_worker` for V3 workers. Enable interruption at
sampled item boundaries for V3 and make the stop call wait until the
interrupted turn releases its execution slot. The stopped thread can
still accept later messages.
## Testing
Add an integration test that holds a worker during sampling and abort
cleanup, checks that the stop call remains pending at both points, and
starts a replacement worker in the only worker slot after stop returns.
GitOrigin-RevId: da78de02d8c32a0f6e62b0487b49cf4908c01de5
## What changed
Track retained command sessions on every turn and mark
`command_sessions_world_state` as a removed compatibility flag. When
`write_stdin` is unavailable, keep reporting retained sessions and indicate
that they cannot be polled.
Omit the command session section when there are no sessions and no prior
section. Still emit an empty update when needed to clear stale handles.
## Testing
Update the Code Mode scenario to exercise retained command session tracking
without enabling the flag. Its snapshot omits the empty section before any
commands are retained.
GitOrigin-RevId: fd953750b06f0098ae6382ce3d3115a1263fd305
## Why
The desktop client declines all open command approval prompts before
sending Stop. If the first decline is still being recorded in history,
a second queued decline can keep Stop from reaching the active turn.
## What changed
Queue consecutive declines for the same active turn and record them in
submission order. If Stop follows, interrupt the turn while the declines
are still being recorded, then finish recording them before publishing
the turn-aborted event.
## Testing
Extend the interruption regression test to cover two declined prompts
followed by Stop. It checks that the running sibling command stops while
history is blocked, both commands are recorded as declined before the
turn-aborted event, and completed sibling output is preserved.
GitOrigin-RevId: 00ac946378cc5fcf6c77e4a657aaa64508d60421
## Why
Code Mode embeds TypeScript declarations in tool descriptions, so scripts
that want to inspect a tool's argument and return types have to extract
the declaration from the description.
## What changed
Enable `features.code_mode_all_tools_schema` to expose callable names,
descriptions, and TypeScript signatures as separate fields in `ALL_TOOLS`.
Update the `exec` guidance to match the selected format, including when
resuming a session. The flag is off by default.
Carry signatures over gRPC and stdio. Reject execution requests with
signatures when the host does not advertise support for them.
## Testing
Add coverage for both catalog formats, `exec` guidance on resume, and
signature preservation over gRPC and stdio.
GitOrigin-RevId: dedaeec4a2563c23d432c324187ef20f6a0e5ea3
## Why
The fallback counter identifies the original transport but gives no indication
of what triggered the switch to HTTP.
## What changed
Include the triggering Codex error kind and HTTP status, when available, in
the fallback warning and the `codex.transport.fallback_to_http` counter.
The counter uses `none` when the error has no HTTP status.
## Testing
Integration tests assert a single counter increment with the expected tags for
HTTP 426 during connection setup, HTTP 403 after retries, server overload, and
oversized WebSocket messages.
GitOrigin-RevId: 6f8b9d5049da1563e035fff62473c85693f0ad1b
## Why
Thread stores can do work before Core starts, but the ordinary creation
API has no way to pass that state back to the store when it creates the
thread.
## What changed
Pass optional, single-use `ThreadStoreCreatePreparation` from
`StartThreadOptions` to `ThreadStore::create_thread_with_preparation`
when creating a persisted thread, including a fork. Reject creation
preparation for ephemeral or resumed threads. Stores that do not implement
the prepared creation method return an unsupported-operation error.
## Testing
Add a regression test that supplies creation preparation to a prepared
fork and checks that it reaches the prepared creation method by asserting
the default unsupported-operation error.
GitOrigin-RevId: bc4d3e9e5d89dd7503aed75423bc9c9d42c7f7fc
## Why
The environment context already lists writable paths. An empty catalog
template previously fell back to the bundled writable-root sentence,
so a model catalog had no way to omit that repeated list.
## What changed
Treat an empty `writable_root` or `writable_roots` template as a request
to omit the corresponding sentence. Missing, null, invalid nonempty,
and oversized templates still use the bundled wording.
Suppressed roots leave the full path budget available for denied-read
paths and globs and never trigger an omitted-path warning on their own.
## Testing
Cover empty singular and plural templates and verify that suppressed
roots leave room for denied-read entries. A model-switch scenario checks
that Codex appends the updated permissions message once and preserves
the earlier conversation, filesystem permissions, and approval settings.
GitOrigin-RevId: 105819fb07ff829be8f111b3676656373aeb7892
## Why
An empty extension registry falls back to legacy host skill discovery
even when `SkipHostSkillDiscovery` is enabled. The remote command
approval test only needs to check plugin attribution when script reads
are denied.
## What changed
Enable `SkipHostSkillDiscovery` and register the skills extension with
no providers in both variants of
`remote_command_approval_skips_attribution_for_a_read_denied_script`.
GitOrigin-RevId: 1abcf6a762ac359825fe1c4db97160b9bfde0f87
## Why
An unsupported UI tag or property invalidates the entire statusline
response, so providers need a fallback for clients whose rendering
capabilities are unknown.
## What changed
- Document the available UI elements with examples for wrapping rows,
spacing fields, preserving whitespace, and displaying status badges.
- Explain how to use `app.cli_version` to check support for features such
as `spacer` and `maxLines`, and return a plain string for the entire
footer when support is unknown or absent. Carry the `spacer` guidance
into the generated TypeScript reference.
- Clarify how to diagnose provider discovery failures with F2 and check
`tools/list` metadata when a provider is missing from the picker.
## Testing
Update the scenario snapshot that verifies an explicit statusline skill
mention loads the bundled guide.
GitOrigin-RevId: 9c6ea1d356146c2d666359732d6a065ed41d9fee
## Why
Synchronous Guardian reviews could receive screenshots from Code Mode calls,
but missed screenshots returned by direct calls to the same REPL connectors.
## What changed
Capture screenshots from accepted direct `node_repl` and `cua_repl` MCP
results when multimodal review evidence is enabled. Include them alongside
Code Mode evidence in call order, with separate retention budgets.
When the synchronous review prompt exceeds its fixed image budget, retry with
only the last image in prompt order and keep it if the prompt fits.
## Testing
Add coverage for screenshot delivery to synchronous permission reviews,
including text-only mode and image budget overflow. Verify that direct
screenshots preserve call order and do not consume the Code Mode retention
budget.
GitOrigin-RevId: e74ee6c5578225efb284c1ca38494377a1d0762e
## Why
A `PreToolUse` hook can change a tool's arguments while keeping its call
ID. An asynchronous risk score for that ID still describes the original
action, even if the score arrives after the rewrite.
## What changed
Require synchronous Guardian review when a hook changes the tool payload
and discard the original assessment. Preserve normal review behavior
when the hook returns an identical payload. Also require synchronous
review for MCP elicitations without an associated tool approval context.
## Testing
Add regression coverage for unchanged hook output, rewritten patches
whose original scores arrive before the rewrite or during review, and
MCP elicitations with missing approval context or rewritten inputs.
GitOrigin-RevId: 994519d61d52c69edcdec9517766a8e3051587d5
## Why
When a catalog entry groups multiple installations of a skill, a link to
a specific installation can load instructions from the primary
installation, such as the Cloud copy.
## What changed
Carry the matched installation through to the instruction read and
resource metadata. A path that uniquely identifies an enabled
installation takes precedence over name-only and ambiguous mentions of
the same skill, regardless of mention order. Default mentions still
use the primary installation, and distinct executor environments can
each be selected in the same turn.
## Testing
Extend the merged catalog test to cover a path shared by Cloud and
executor copies and a package link that selects the executor copy.
Update the installation recovery scenario to show that an explicit link
loads the selected environment's instructions into the initial request.
GitOrigin-RevId: f4495c5442b9f4c14d5cdcc4c717717e2119b088
## Why
A model can change between steps of the same turn. Persisted token usage
records need the model for each response to distinguish usage before and
after the switch.
## What changed
Add an optional `model` field to `TokenUsageRecord`. Record the model
selected for the sampling step on both completed and incomplete responses.
Attribute compaction usage to the model selected at the start of the turn.
Existing records without the field still deserialize.
## Testing
Extend coverage to check persisted model attribution and cumulative token
totals after a mid-turn switch, including when the response hits the output
token limit. Verify that compaction keeps the turn-start model attribution
and continues restored usage totals.
GitOrigin-RevId: 3615724c1cbe6ed46c9367d6c3c1a29ebaba73d8
## Why
Hosted children using a shared service tier already reject overrides
when a turn starts, but turn settings updates could still request a
different tier during an active turn.
## What changed
Apply the same rejection and error message to turn starts and active
turn settings updates for hosted children using a shared service tier.
## Testing
Extend the WebSocket regression test to verify that a mid-turn tier
override is rejected and the child still uses the root's updated tier
on its next step.
GitOrigin-RevId: 4fad6d02b56d81aba162f3e87b6dcaae2386d171
## What changed
Remove the `web.run` instructions to check local code first and limit
browsing to official OpenAI sites for OpenAI product questions, to rely
only on primary sources for technical questions, and to explicitly flag
inferences from sources.
Update the thread sampling and web search scenario snapshots to reflect
the revised tool description.
GitOrigin-RevId: d35dcaaeb69940af5d7f9df19aba337fd0ab6426
## Why
An injected `send_message` correction could reach a hosted worker before
the `followup_task` it refers to because turn-local input drains before
the mailbox. An interrupt during a history checkpoint could also drop
corrections from a batch that had already left the queue.
## What changed
Queue plain-text agent messages behind pending follow-up tasks and
deliver them in mailbox order, even across turn boundaries. Record
accepted follow-ups and corrections before waiting on their checkpoint,
and save deferred injections to session history on shutdown.
## Testing
Add regression coverage for native and hosted delivery order, hosted
corrections sent between turns, interruption during a checkpoint, and
correction persistence across shutdown and resume.
GitOrigin-RevId: 3acffd175d3bb2d7e1a9f704fe6c6d6ce38e798d
## Why
Recording a declined command can delay tool-result delivery. When
one-shot commands shared that pause for runtime limits, a sibling
command could keep running past its configured `timeout_ms`.
## What changed
Track command timeouts separately from tool-result delivery. A proposed
command holds result delivery through setup and resolution, while its
approval prompt pauses command timeouts only while a decision is
pending. A running one-shot command can then time out while its result
is still held, with its terminal ID remaining addressable until result
collection finishes.
## Testing
Cover the pause states before, during, and after the approval prompt.
Exercise both a sibling command that times out and one that exits
normally while a decline is being recorded, checking terminal access
and the exit status in the eventual tool result.
GitOrigin-RevId: d359bfc99fb9c23e6c61e94d75040cd6c1b09c49
## Why
A turn interrupt can arrive while a command is waiting for its executor
connection or while a newly launched shell is still being registered.
The command can then launch after the interrupt or keep running before
the caller has a session ID to interact with it.
## What changed
Check for cancellation before dispatching a resumable command, including
after remote connection recovery. If the shell has already started and
is still running, stop it when cancellation wins before registration and
return the usual `aborted by user` result. Preserve the result of commands
that already reported an exit.
Track any pending command begin and end events for interrupted startups
so session shutdown waits for them to be published.
## Testing
Add regression coverage for interrupts before dispatch and after launch
but before registration, including command history on shutdown. Cover
cancellation during remote executor recovery and cleanup of abandoned
remote starts.
GitOrigin-RevId: 624df736ca2cb077e879f52a194ee4d89afd225a
## What changed
In multi-agent V3, `send_message` starts a new turn in an idle
worker's existing conversation, including after eviction. The worker
receives the input as a `MESSAGE`. Sends to `/root` still follow
its wake policy.
Remove `followup_task` from the V3 tool set and select role instructions
that match the agent tree's version.
## Testing
Cover delivery to active workers at the concurrency limit, retrying
an idle worker once a slot opens, and resuming workers after eviction
or session restore.
GitOrigin-RevId: 3b0e55f150784896aa6e0dfa926bc490bdd2627d
Check that the approval request's turn is still current before sending
`Op::Interrupt` while the decline is waiting to be recorded.
GitOrigin-RevId: c1e23a77efc0d5550e9ffa280d72bb66da711ed8
## Why
Recording a declined command approval can delay a subsequent Stop request while other commands in the same turn are still running.
## What changed
If Stop is next in the submission queue, interrupt the active turn while the decline is still being recorded. Consume Stop only if it interrupts that turn, and leave other submissions in order.
## Testing
Extend the approval cancellation regression test to cover declining a command and then pressing Stop. The test checks that a running sibling command stops before the decline is recorded and that output from a completed sibling remains available in the next turn.
GitOrigin-RevId: 9f08cb35f96e497d95eaa0aefb039ca9729761e7
## Why
Enabling `multi_agent_v2` forced the V2 tool version before a fresh
thread could use the model selected for its first turn. The shared
runtime needs to support both V2 and V3 selections.
## What changed
- Let the first turn select V2 or V3 from the active model, with V2 as
the fallback when the shared runtime is enabled.
- Pass the selected version to fresh and forked subagents, including
through host-prepared child creation.
- Report both selections as `v2` in app-server model metadata because
they use the same runtime.
## Testing
Extend integration tests to cover model switches between V2 and V3
before the first turn and V3 inheritance in fresh, forked, and
host-prepared children.
GitOrigin-RevId: de1fd9836d8cb3c4dc19805507462f4f5cfe3959
## What changed
When native multi-agent v2 history is enabled, Guardian automatically
frames the pending call and its paired output as a distinct approval
request. Mark the separate `guardian_native_action_framing` flag as removed.
## Testing
Update the incremental review snapshot to capture the framed
`send_message` and its paired output. Update the root handoff test to
match setup handoffs at the approval boundary so historical calls
cannot mask the final command's separate denial.
GitOrigin-RevId: 5194a8cdf21e5d71f3a7942c0ce637f115316476
## Why
With native tools disabled, injected agent mail could be persisted without
waking a hosted root in durable sleep.
## What changed
Schedule a mailbox wake for sleeping hosted roots after injected plaintext
mail is durably recorded. Keep the interrupted turn active through
`TurnAborted` so mail arriving during the interruption can start a turn
only after the abort event is published.
## Testing
Add regression coverage for queue-only mail waking a hosted root with its
previous turn context and for mail injected during the sleep interruption
starting a turn after `TurnAborted`.
GitOrigin-RevId: 939db5ffca9af1273e4fb4c8d0dfb6bb7a95ea09
## Why
Local MCP HTTP header helpers run with a restricted environment. A helper that needs a host setting such as `HTTPS_PROXY` needs a way to receive that variable while keeping the rest of the host environment restricted.
## What changed
- Add `http_headers_helper_env_vars` for local Streamable HTTP servers. A nonempty list requires the server URL and an absolute helper executable path in the same user or administrator configuration entry. Codex launches that executable directly, and Windows requires an `.exe` path. Helper entries without the list retain shell command syntax.
- Revoke inherited access when a higher-priority entry overrides the URL, helper, or variable list. An empty list explicitly clears an inherited grant.
- Show effective variable names in `codex mcp get` and the JSON output of `codex mcp list`, while keeping helper commands and variable values out of the output. Make `codex mcp add` and `codex mcp remove` edit only the named server so unrelated grants stay in their original configuration layer.
## Testing
Add coverage for grant validation and revocation, variable forwarding during OAuth startup and header refresh, CLI redaction, and preservation of administrator grants during unrelated CLI edits.
GitOrigin-RevId: d1ebdcf4dbd7946c0f3bfb982464a0024768d585
## Why
The routing test needs to verify that Guardian's decision controls whether
a request reaches its destination. Loopback addresses are covered by
`NO_PROXY`, so the probe must explicitly use the managed proxy.
## What changed
Send both probes through `HTTP_PROXY` to a local mock origin. Assert that
the approved command exits successfully and receives the origin's response,
and that the denied command reports Guardian's denial without sending a
second request to the origin. Collect output across the initial
`exec_command` response and subsequent polls so the test can check stdout
even when it arrives before the process exits.
GitOrigin-RevId: aa32a588e9ad9a049621242d8b8a567462237cca