## Why
A thread can reserve a turn slot and assign a turn ID while it still
waits for host admission. Callers need to distinguish a pending turn
from one cleared to execute.
## What changed
Add `turn_admission_state()` to report `Idle`, `Pending` with an optional
turn ID, or `Admitted` with a turn ID in a single snapshot. Host-managed
turns become admitted after a grant is installed. Native turns are
admitted synchronously, including when no execution guard is needed.
The current slot retains its admitted state through finishing.
Reject superseded submissions before they can overwrite an owned slot,
and verify that a host grant still belongs to the current turn and task
before recording admission.
## Testing
Cover the admission state while a host decision is pending, after an
interrupt, during execution after a grant, and after the slot returns
to idle. Cover native admission without a host guard.
GitOrigin-RevId: 0633dc036aef99433505559c92b0b1b26a023352
## Why
Applying client context at submission time lets input stopped by a hook
affect the conversation. A queued prompt that is later blocked can also
supersede the context attached to an earlier accepted prompt.
## What changed
Keep each context update with its submitted input and apply updates in
delivery order after the input passes its hooks. Preserve context-only
submissions when a turn is suspended for host handoff before inference.
For experimental `additionalContext` on `turn/start` and `turn/steer`,
omission or `null` keeps the current set. A supplied map replaces it on
delivery, and `{}` clears it while preserving conversation history.
## Testing
Add regression coverage for context on prompts stopped by hooks, context
on accepted queued prompts, context-only host handoff, and context
delivery when continuing an idle thread.
GitOrigin-RevId: 160f4f90d9aebf5eb3ea4a939c67265a1c6422da
## What changed
Stop collecting cumulative MCP tool attribution, sending it in Responses
API request metadata, and writing it to rollout checkpoints.
Use `model_search_state` for search provider history in new rollouts. When
reading older rollouts, decode `mcp_attribution` only to determine whether
Search MCP may have been used. Treat malformed or error attribution as
possible Search MCP use so native search fallback stays disabled.
## Testing
Add a history test that distinguishes legacy Search MCP use, an explicit
record of no use, and missing attribution.
GitOrigin-RevId: a145b5b6b7d2f423d989af10623ef21120f49d4d
## Why
Guardian inherits the actor's inference provider by default. Hosts that run
actors on a different provider need to route Guardian reviews independently
and resolve reviewer policy and model capabilities from the Guardian provider.
## What changed
- Share the selected provider and its model catalog between asynchronous
scoring and blocking approval reviews. Use the provider's preferred
reviewer and resolve policy from managed requirements or reviewer model
metadata.
- Keep Guardian review history independent of actor compaction when the
host selects a provider. Preserve inherited routing when no provider is
selected.
## Testing
Add integration coverage for separate actor and Guardian endpoints, catalog
isolation when both share an endpoint, and routing after resuming a compacted
thread.
GitOrigin-RevId: 1eb15421f746a58eefe27257e86d948de31bcf86
## Why
A Guardian policy refresh could leave a thread using its previous restrictions
if the new policy disallowed its current model. A refresh could also report
success after its managed policy source changed before publication.
## What changed
- Use the app server's configuration manager to load Guardian policy from
current local and managed configuration. Report an error when the policy
source changes before publication or a live thread rejects the update.
- Apply updated reviewer and model restrictions even when they block the
current model. Keep automatic work queued while the model is blocked and
wake it when a later refresh permits it. Allow a new turn to supply a
compliant replacement model.
## Testing
Regression tests cover policy changes during thread startup and live refresh,
queued work resuming after a blocking policy is lifted, and updated policy
text reaching Guardian reviews without reconnecting MCP.
GitOrigin-RevId: c7d3e119aa409342cc2fa18946ce2b6a4392e0e3
## Why
A serving probe that reports no review needed can bypass async scoring.
Keeping the async path active lets Guardian compare the two signals
while using the existing approval policy.
## What changed
Treat streamed review flags as observations. Match each flag to its
response item, carry the enclosing item's flag into Code Mode tool
calls, and discard the flag when a pre-tool hook rewrites the payload.
Emit correlated `codex.guardian_probe_comparison` logs for tool calls,
async classification outcomes, and synchronous review results.
## Testing
Update integration tests to expect async scoring even when a probe
reports no review needed, and verify that Code Mode retains the probe
across yield and resume.
GitOrigin-RevId: 715f56ba4a82d544ce59f0291bcd1a84dd2daa51
## Why
Correlating a subagent's creation, turn attempts, and stop requests
helps explain what happened when those actions span workers.
## What changed
- Emit structured events and counters for successful spawns and accepted
`close_agent` and `interrupt_agent` calls. Count accepted stops even
when the target is already idle or unloaded.
- Track initial, follow-up, and resumed turn attempts for spawned
subagents. Record each start and at most one outcome per attempt:
completed, failed, interrupted, or suspended.
- Use thread, turn, and call IDs to correlate structured events while
keeping those IDs out of metric labels.
## Testing
Add coverage for lifecycle counts, duplicate outcomes, stop handling,
and event correlation across workers. Improve the Windows elevated
sandbox test for an approved `git pull` by provisioning the sandbox
before the turn and reporting setup or launch failures with diagnostics.
GitOrigin-RevId: bc1190302e1dffbdd79c7ac984b6debe1dac4a65
## Why
Steering can cancel a paused mock HTTP stream, realtime handoff and turn
events can arrive in either order, and streaming tools can run before the
response reports token usage. Tests that assume a fixed sequence can fail
depending on timing.
## What changed
- Pause the hooks test at assistant message completion so both queued prompts
enter the same batch before the turn resumes.
- Track the handoff and turn events in one pass, waiting for the matching
turn to complete on the unblocked path.
- Call `get_context_remaining` during the compaction fallback and assert
zero remaining tokens using the preceding response's usage.
GitOrigin-RevId: ec8a108517c819d7087681e8e2c7b5b57f4b341e
## Why
An overflowing hook total could send a partial charge to the host, and
an overflow in native accounting could leave the posted balance infinite.
## What changed
Reject overflowing hook totals before reporting usage. Check both the
combined provider and hook charge and the cumulative rollout balance
before posting, preserving the previous balance on overflow. Native
budgets with limit enforcement enabled still stop new work on overflow.
## Testing
Update the hook overflow integration case to verify that the response's
tool is blocked and the host receives no usage report.
GitOrigin-RevId: 2ac80a6aa1d857924a8807df7bb70c6b7c107cd2
## Why
Local stdio discovery needs to accommodate legacy servers that return an
empty response to `server/discover`, take longer to initialize than the
discovery watchdog allows, or require `initialize` as their first request.
## What changed
Mark `mcp_connection_sharing` stable and enable it by default. Treat an
empty discovery response as an unsupported method and let legacy
initialization use the configured startup timeout. Give legacy restarts
a fresh timeout and keep modern version retries within the original
deadline.
## Testing
Cover empty discovery responses, slow initialization on the original
connection, and restarts after ignored or rejected initialization.
Explicitly select legacy mode in tests that depend on legacy behavior.
GitOrigin-RevId: 04d87ddfe02fac8491f879ce420bf294dc725128
## Why
Automatic mailbox wakes can start new turns while the app-server is
draining or has paused turn admission. Native child results still need
to reach the parent during drain so they can survive a daemon restart.
## What changed
- Require a turn admission permit for ordinary automatic mailbox wakes
and hold it through turn registration. Retry queued work when a
temporary pause ends. Explicit follow-ups and native child results can
still wake the parent during drain.
- Let `thread/inject_items` queue plain-text agent messages for native
child threads when native tools are enabled. Injected mail follows the
ordinary wake rules.
- Extract the remote app-server client, shared event and request types,
and WebSocket compression into `codex-app-server-remote-client` so
callers can use them without linking the app-server runtime.
## Testing
Cover delivery of queued mail when admission reopens, injection into
native child threads, and recovery of a child result after a daemon
restart.
GitOrigin-RevId: 4c5ceeca8829c2612cc2b6b74c03d0c7677a9244
## Why
Namespace-wide guidance can repeat on every entry in flat Code Mode listings. The existing prefix limit covers only reachable `functions` tools, leaving indirect namespace guidance outside the budget.
## What changed
- Add `builtin_tool_namespaces` to put guidance on namespace headers in Code Mode prompts and tool search responses, including headers shared with client tools. The selector applies to namespaces with a registered built-in tool and is omitted from flat listings. Overlapping selectors must agree after trimming.
- Validate all four prefix maps together against the selected model's `description_prefix_budget_bytes`, which defaults to 512. Count each trimmed value once in UTF-8 bytes, including unused selectors. Exclude keys, paragraph separators, and rendered copies.
## Testing
Cover shared headers, flat listings, and conflicting selectors. Exercise the default budget boundary with multibyte text and verify that a model can raise the limit.
GitOrigin-RevId: 1570c23ea1dbad6041cc8e48d0dc2b77f92596c7
## Why
Clients need to distinguish a caller who must enroll in Daybreak from a
model that does not support it. The list of accepted access programs
alone cannot express that distinction.
## What changed
Carry the server-resolved status for each caller and model from the
model catalog into `model/list` as `availableAccessPrograms.daybreakAvailability`.
Update the JSON schemas, TypeScript bindings, and Python SDK to expose
the field.
Rust decoders use `default` for missing or unrecognized statuses. The
Python SDK also defaults missing statuses and preserves new strings
from newer hosts.
## Testing
Cover catalog decoding, app-server response serialization, and Python
SDK round trips with known, missing, and future status values.
GitOrigin-RevId: c1e5ddef68fd19b25e583bb6996a93fd78ab9d18
## Why
A thread can start while managed Guardian policy is being refreshed. Startup
and refresh need to coordinate so the thread does not register with policy
that the refresh has already superseded.
## What changed
Let hosts provide a `GuardianPolicyLoader` to `ThreadManager` for startup
and on-demand refresh. Pause thread registration while a refresh loads and
publishes policy. If publication overtakes a thread's startup configuration,
reload Guardian policy before registering the thread.
Apply the published policy to live threads concurrently. Once published, the
updates continue even if the refresh caller is canceled. Return an error if
any live thread rejects the update.
## Testing
Add regression coverage for an idle thread receiving the update while
another thread holds its session lock, and for reporting a live thread's
rejection of invalid Guardian configuration.
GitOrigin-RevId: ca0cfa2a30f0d45c4ac5ded3400e0e18177ede1d
## What changed
Remove the legacy framed stdio protocol and its client and server.
Local Codex launches the standalone host with `--listen grpc+stdio://`,
which is also the host's default. The `stdio` and `stdio://` aliases
now select gRPC over stdio. The `features.code_mode_host_grpc` setting
is deprecated and ignored.
Carry execution trace context into gRPC tool callbacks and
notifications. Reject oversized execute requests before sending them
so an encoding failure does not appear as a connection reset.
## Testing
Exercise gRPC callback cancellation, trace context across overlapping
yielded cells, and isolation of tool preload failures between sessions.
Check that both values of the deprecated feature setting are ignored.
GitOrigin-RevId: f5faff3901dc60958627f677f50cfad834291b69
## Why
HTTP sampling can attach private connector result bodies, but Responses
WebSocket sampling leaves them out. WebSocket requests need the same
destination and account checks before sending those bodies.
## What changed
Apply the existing HTTP eligibility checks to each WebSocket attempt and
attach only result bodies that belong to the current account and match
the input being sent, including when that input is an incremental update.
Keep prewarm requests free of private result bodies. Update
`tungstenite` and `tokio-tungstenite` to keep sensitive payload bytes
out of frame diagnostics.
## Testing
Add regression coverage for connector results reaching the server while
staying out of request observers and client logs. Cover custom-provider
requests and retries across an account change with results from both
Code Mode `exec` and `wait`.
GitOrigin-RevId: df5ec8608e59bb3a0444fafd5268279e669ccb55
## Why
A turn interrupted during setup can be discarded before it runs. Starting
the worktree scan during setup can spend time scanning for a turn that
will never send a model request.
## What changed
Collect `HEAD` and remote URLs in the background after turn setup, and
start the worktree status scan only after the turn is admitted to run.
Model requests use the latest available Git metadata while collection
continues, and later requests can include the worktree status once it
is available.
Use shared background Git root discovery for the memory extraction
change probe and pass the resolved root into the probe.
## Testing
Regression tests cover requests proceeding while status is blocked,
later requests carrying the updated `HEAD`, remote URL, and dirty
status, and an interrupted wake skipping the worktree scan.
GitOrigin-RevId: 00f465a5621d672d8b6d9063c384fb62e493c79f
## What changed
Add `ToolLifecycleContributor::mcp_tool_request_meta` so an extension can
use thread and turn data and the captured tool registration to attach an
entry to the outgoing request's `_meta`. Codex rejects duplicate keys.
Expose the registering plugin's package ID in `McpToolContext` so
contributors can scope metadata to that plugin.
Export `PERSISTED_MCP_RESULT_MAX_BYTES`, the existing 64 KiB limit for
untruncated MCP results in durable history.
## Testing
Extend the multi-environment MCP scenario to check that only the call
for the selected plugin receives the metadata and that the result
callback sees the same plugin context.
GitOrigin-RevId: 25a2afc5402a5c9323de184313d614aede3692fb
## What changed
Pass the resolved result-body destination into sampling, where its owner
is used to select retained bodies for the turn. Check that the capture
owner is current under the retention lock before converting an MCP
result and again before retaining its body.
## Testing
Extend the request-budget integration test for direct calls and Code Mode
to check when executed calls carry result metadata. Cover ungranted and
custom endpoints, independent model credentials, hosted Apps OAuth and
header overrides, and disabled result-body passthrough. Check that the
shared configuration preserves metadata on a subsequent turn.
GitOrigin-RevId: 8e5ac88ba323d10e0f3e696d4ae356d52bdf22a3
## Why
Result body capture covered direct Apps calls, leaving eligible calls made inside Code Mode without their result bodies in follow-up sampling metadata.
## What changed
Capture eligible nested MCP results and bind them to the originating `exec` or `wait` output for the current turn. Send `tool_result` and `tool_result_call_id` together when both fit the request budget. Keep the bodies out of conversation history and reclaim capture capacity when the output binding is lost.
Require analytics to be enabled and the provider to allow request metadata before starting turn-level capture. Check the call's credentials at dispatch and again when recording the result.
## Testing
Add coverage for yielded and finished outputs, late results, retries with replacement output items, capture budget recovery, and the request size boundary for sending the body and call ID together.
GitOrigin-RevId: 0983261ac39021099d14efa5c9a9acac47ac9269
## Why
The Responses client checks the gateway URL and request headers before
allowing connector result bodies to be attached. Provider query parameters
can also change the request while leaving those checks satisfied.
## What changed
Require an empty provider query parameter map, or no map, when selecting
a connector result destination. Check the ChatGPT credential variants
directly and retain the current auth owner for thread grant verification.
## Testing
Extend the client setup test to check that a custom provider URL is
ineligible even with refreshed ChatGPT credentials. Extend the enterprise
MCP lifecycle test to check that the configured provider receives the
account bearer token and executed tool-call metadata. Allow HTTP client
tests to cache a direct system proxy decision as well as a proxied route.
GitOrigin-RevId: 1e7e77ec6e65263eaff658ba39943ec51230d332
## Why
Callers of `CodexThread::inject_response_items` each compile a copy of
its concrete future, duplicating compilation work.
## What changed
Return a `BoxFuture` from `CodexThread::inject_response_items` so the
concrete future stays in the core crate. Raise the core integration
test crate's recursion limit to 256.
GitOrigin-RevId: 2ccb280c7887278fc8011c37df35df84c47b3e35
## What changed
Add the off-by-default `features.connector_tool_result_passthrough` flag. For direct ChatGPT Apps calls, capture eligible text and structured content from the original MCP result before tool output processing. Attach the captured body to the matching executed-tool record on follow-up HTTP Responses requests to the ChatGPT Codex endpoint when the request uses the same authenticated account and turn.
Bound captured bodies in memory for the originating turn. Enabling passthrough alone scopes executed-tool metadata to calls with a captured result ID.
## Testing
Add coverage for same-turn HTTP delivery, omission on later turns or after an account change, and omission of shell-call metadata on HTTP and WebSocket requests when only passthrough is enabled.
GitOrigin-RevId: 410c81559bfc15022b896cf006cb631f3fd9454e
## Why
Custom status lines previously depended on a feature flag in the TUI
client's configuration. When the TUI connects to a separate app server,
that flag can differ from the setting in the server's active profile.
## What changed
Add **Custom status line** to `/experimental` as an opt-in feature. Save
the toggle on the connected app server, restart the TUI, then use
`/statusline` to choose a provider.
Read `tui_extensions_statusline` from the app server's effective
configuration at startup. Keep that value when switching conversations
or reloading local status line preferences, so toggling the feature
takes effect on the next TUI launch.
## Testing
Add a menu snapshot and regression coverage for saving the toggle in a
server profile while preserving the active provider across a thread
change.
GitOrigin-RevId: 4025c9771e560d6d7b1e6bd97236bffc44201556
## Why
The sandbox denial check can spend 20 ms waiting for more output even
after the stream has closed and all denial context is available.
## What changed
Classify the buffered output immediately if the stream is already closed.
While the stream is open, wait up to 20 ms for new output or closure.
Register for the closure notification before rechecking the stream state
so closure during setup wakes the check.
## Testing
Paused-clock tests cover output closed before or during the check,
preservation of the timeout for open streams, and classification of
sandboxed and unsandboxed failures. The remote process-event suite adds
a direct sandbox denial case with a `process/closed` event.
GitOrigin-RevId: 1f3029055d70ff4cd63939564872fe5d37240a33
## What changed
Mark `mcp_lazy_stdio_startup` stable and enable it by default. When a
tool catalog is already cached, Codex can expose tools from an optional
stdio MCP server and defer starting the server until the first tool
call. Required servers still establish a live connection at startup.
## Testing
Exercise lazy startup with the default configuration in the tool-cache
test and explicitly disable the feature for the eager-start control.
Update the code mode and working-directory tests to proceed without
waiting for an optional server when its catalog is cached.
GitOrigin-RevId: a65d83fd1a4c141dba3c10e68b138539aa0a44f0
## Why
A connected account or app can choose an approval reviewer, but that
setting applies across its tools. Users may want to review calendar
event creation themselves while keeping automatic review for other tools.
## What changed
Set `approvals_reviewer` on an individual app tool in `config.toml`:
```toml
[apps.calendar.tools.calendar_create_event]
approvals_reviewer = "user"
```
Codex matches the tool by raw name first and falls back to its title.
The tool's reviewer takes precedence over the connected account, app,
app defaults, and session settings, subject to managed requirements.
This applies to tool-call approval prompts and MCP approval requests
that match a verified app tool invocation. The app-server
`config/read` response also exposes the per-tool setting.
## Testing
Extend coverage for reviewer precedence, tool title fallback, managed
review requirements, tool-call approval routing, strict MCP elicitation,
and app-server config reads.
GitOrigin-RevId: c92bd39b9e708dada9d314c19a446b4c580edf91
## Why
If a provider keeps an SSE connection open after reporting a failure, Codex
can hit the idle timeout and lose the original error and its retry advice.
## What changed
End the SSE stream immediately on `response.failed` or a recognized
`error` event. Classify statusless quota, plan usage, invalid prompt, and
misalignment errors consistently across both event forms. Preserve
`Retry-After` for overload and capacity errors, preferring error-level
headers over event-level headers when both provide valid advice.
## Testing
Add SSE regression tests that hold the connection open and verify immediate
error delivery, terminal error handling, and retry delays. Extend WebSocket
coverage for statusless errors received before the close handshake.
GitOrigin-RevId: 69afd1d3b18ca3139e9b7ad98ae1481a432179f0
## Why
When the Responses API sends a policy rejection in an `error` event
without an HTTP status, the SSE client can wait until its idle timeout
to report the failure.
## What changed
Recognize `bio_policy` and `cyber_policy` in the shared terminal error
parser so both SSE and WebSocket clients surface the corresponding
policy error. Preserve the provider's message and use a default when
it is missing or blank. End the SSE stream as soon as the error arrives.
## Testing
Add SSE tests for both error codes, including when the stream stays
open, and WebSocket cases that verify both errors surface without a
close handshake.
GitOrigin-RevId: 1b46b6557a39a61a1bb10bdd0d8ede48ecd6fa13
## Why
A parent turn can acknowledge a child agent's final reply while a model
request is in flight. If the parent is interrupted before consuming the
queued reply, turn cleanup can discard it.
## What changed
Record queued agent messages in conversation history during interruption
and flush the rollout before emitting `TurnAborted`, even when the
interruption marker is disabled.
## Testing
Add a regression test that interrupts a parent while a child's final
reply is queued. The test checks that the reply is persisted when
`TurnAborted` arrives and appears exactly once in the next model request.
GitOrigin-RevId: 5bd828c4101942fa4fe7ba5040355a8244f02018
## Why
Generic quota errors hide whether the project or organization spend limit
blocked a request. Reporting the scope tells users which limit to check.
## What changed
Recognize API key, project, and organization spend limit errors across
HTTP, SSE, and WebSocket responses. Show a message that names the scope and
treat the error as non-retryable, even when the provider sends
`Retry-After`. Apply the existing usage-limit handling to goals and
compaction.
Expose distinct `CodexErrorInfo` values in the app-server protocol and
generated bindings so clients can identify the limit in live errors and
failed turn history.
## Testing
Extend the transport tests to cover all three scopes and verify that they
stop retries. Extend the app-server test to check that the error survives
`thread/read` and that a subsequent turn can succeed in the same thread.
GitOrigin-RevId: 03341f7a78daa7540e7baa519f1a29ec07e34509
## Why
Remote Noise executors previously connected outbound to a rendezvous relay. An inbound listener lets harnesses that can reach the executor connect directly while retaining registry-backed authorization.
## What changed
Use `--listen ws://IP:PORT` with `--remote` in Noise mode to accept inbound WebSockets. The listener serves RPCs over encrypted Noise streams after the registry authorizes the harness. It limits concurrent connections and handshake attempts, closes sockets that miss the first authorization deadline, and drains connections on shutdown.
Noise clients can attach optional admission headers from the connection bundle to `wss://` requests.
## Testing
The inbound integration test exercises a registry-authorized file read, rejection of a registry-denied harness, the absence of a plaintext RPC response, and connection closure on shutdown. Unit tests cover handshake limits and rejection of admission headers before dialing a plaintext WebSocket.
GitOrigin-RevId: b388672e49a3fe806e38f6db38825435ba25d27a
## Why
A prepared agent fork needs its ancestor's conversation for context.
Treating that conversation as the child's own authorization evidence
can attribute the ancestor's messages and approvals to the child.
## What changed
Allow host-started prepared forks that reference stored history to
inherit the root session ID. Keep ancestor messages as conversation
context and exclude ancestor authorization evidence when starting or
resuming the fork and when reconstructing sender evidence from storage.
Preserve the inherited disabled-plugin settings and the child's own
authorization evidence.
## Testing
Cover prepared forks across startup and resume, including inherited
context, plugin settings, and child-local authorization. Verify that
live and stored sender evidence both contain only the child's messages.
GitOrigin-RevId: 5c5a6547d31fe78dfad3742efb8a41df539173c6
## What changed
In opt-in local MCP mode, deliver board notifications through
`inject_response_items` when the recipient uses Multi-Agent V2 with native
tools enabled. Other deliveries continue to use `Op::InterAgentCommunication`.
## Testing
Extend the HTTP board scenario to check that the parent receives exactly one
`CHANNEL_POST` agent message with the worker as author, the parent as
recipient, and the expected post preview text.
GitOrigin-RevId: deaa1451619a94d9c70c771327892069325c5e60
## Why
A realtime call can end with completed speech that has yet to reach a
Codex turn. The next turn needs that context even if the call's transport
has already disconnected.
## What changed
- For V3 calls with realtime frame history enabled, save pending speech
as context for the next turn. Restore it on thread reload and exclude
it from the turn count used by rollback.
- Drain already received transcript events and settle pending handoffs
before saving the call's closing marker. Report recovery required if
shutdown cannot confirm that history was saved.
- Keep transport detach separate from ending a call. Reattaching restores
saved pending speech, and an open call can be ended from persisted
history after a reload. Use the call ID for TUI attachments so successive
calls on one thread have distinct history.
## Testing
Add coverage for queued speech at hangup, reconnect and stop after
reload, retries after an uncertain write, and rollback across saved
session-end context.
GitOrigin-RevId: 657491f1d7e446a1a48e22189758810c8bdd82cb
## Why
Raw response injection bypasses the native mailbox wake policy, so
injected agent messages cannot wake a sleeping thread through that
policy.
## What changed
In native Multi-Agent v2, route batches consisting entirely of
single-text agent messages with valid agent paths through the mailbox
as queue-only mail. Hold a residency pin across the batch so capacity
eviction cannot interrupt delivery between submissions. Mixed batches,
multipart or encrypted messages, and configurations with native tools
disabled continue to use raw response injection.
Only preempt model sampling for pending mail when the matching turn
still accepts mailbox delivery.
## Testing
Extend coverage for waking live and reloaded sleeping threads,
delivering older queued mail before a new task, and retaining mail in
order when a batch exceeds the submission channel capacity and
eviction is attempted.
GitOrigin-RevId: 3df60d2a4a9e7b193ef298e01f31c565ad8a2785
## Why
The in-memory MCP backend depended on the runner's clock, so a runner
clock failure could prevent posting. The standalone SQLite backend
already uses the system clock.
## What changed
Read UTC time from the MCP backend's system clock after validating
caller membership. Apply this to both tree and agent-specific bindings.
## Testing
Update the HTTP integration scenario to make the runner clock fail and
verify that a child agent's post timestamp falls within the posting
window.
GitOrigin-RevId: bad5dec5a9be7246cf627b017897fbfe2c960cd1
## Why
Managed approval requirements can change while an MCP runtime is still in use.
Later turns need to honor those changes without restarting MCP, while in-flight
MCP actions need to retain the mandatory review requirements of their issuing
turn.
## What changed
- Add `CodexThread::refresh_guardian_policy` to apply managed policy updates to
an existing thread. MCP configuration refreshes preserve the active Guardian
policy, including when a policy update lands while MCP configuration is loading.
- Resolve MCP tool and elicitation reviewers against the issuing turn's policy.
Live requirements can still require Guardian review, and a live policy change
cannot waive mandatory review captured by the turn.
## Testing
Extend coverage for overlapping Guardian and MCP refreshes and for an existing
MCP runtime that must prompt the user on the next turn after a policy update
allows only the `user` reviewer.
GitOrigin-RevId: 5a1649f917313f6fb152a206bc89986fe6345481
## Why
Legacy rollout migration rewrites rolled-back history and can disrupt
the realtime stream. Enroll local threads once they use paginated history
so the stream stays intact.
## What changed
- Add the off-by-default `features.realtime_frames_local` flag for
paginated local threads with a state database. Accept runtime updates
through the app server and keep threads enrolled once they have a
persisted canonical session start.
- Add thread-store APIs to recover a realtime session and look up the
latest session ID from durable history. Route frame completion through
a store seal so completion acknowledges durable writes.
- Add a local seal for accepted model input that writes source frames
before the input and lets callers retry an uncertain flush without
appending the input twice.
## Testing
Cover enrollment for legacy and paginated threads, continued enrollment
after disabling the flag, and retrying a local input seal after a failed
directory sync.
GitOrigin-RevId: 2012feeca3857da90f9b026f077b31a26d15191b
## Why
Guardian review counts need a way to distinguish automation-triggered
turns from other turns, including when a subagent requests the review.
## What changed
Add a `turn_origin` tag to the `codex.guardian.review` counter based on
the trigger recorded when the turn started. Recognized automation
triggers map to `automation`, missing or empty triggers map to
`unknown`, and all other values map to `other`. This keeps the set of
metric labels bounded.
## Testing
Cover trigger classification for both allow and deny verdicts and
verify that a later user turn on the same thread is counted separately
from an automation turn in both main and subagent threads.
GitOrigin-RevId: 6a5808798df7d184203cea18e60a94a82d71f036
## Why
Managed proxy routes require bubblewrap's network namespace even when
`features.use_legacy_landlock` is enabled. WSL1 compatibility checks and
helper arguments need to agree on the effective mode.
## What changed
Resolve bubblewrap or legacy Landlock once and use that mode for both the
WSL1 check and the `codex-linux-sandbox` arguments. Use Linux sandbox
naming for the shared launcher and CLI code, and preserve the published
analytics category for a missing helper executable.
## Testing
Unit tests exercise the production argument builder, including managed
network context serialization when legacy Landlock is requested. They
also cover which sandbox configurations WSL1 accepts and rejects.
GitOrigin-RevId: 619ab9d3eef965de6bc6cb13ff8a33132018abcf
## Why
A first user turn and a concurrent raw response-item injection can both
observe that the session has no reference context. Both can then append
the initial prompt prefix and persist a full world-state snapshot.
## What changed
Allow context preparation to run concurrently, then serialize publication
of the initial prefix and its checkpoints. If injection publishes first,
the user turn computes its context updates against the published baseline.
If the user turn publishes first, injection appends only the
caller-provided items.
## Testing
Add an integration test that forces the overlap in both preparation
orders. It checks the first request's world-state updates, verifies that
the follow-up request contains the initial instructions and injected
content once each, and checks that history contains one full snapshot.
GitOrigin-RevId: b66f9c6ccc5d42a2be0e852b4d83b78adbc9e5b2
## What changed
- Keep the prepared `SandboxExecRequest` intact in core and let
`command/exec` borrow the prepared command for streaming. Windows
restricted-token commands continue through the dedicated sandbox launcher.
- Move runtime read-path selection for exec-server commands and filesystem
helpers into `SandboxManager`. It derives the paths from the executor's
binaries and, for managed process launches, finds the generated proxy CA
bundle in the command environment.
GitOrigin-RevId: 8c9d278496d84589bc4a7b7d0ed08cb1b8e6ba21
## Why
SSE-only mocks return 404 on WebSocket upgrades by default, causing
retries before the tests reach the HTTP stream. In parallel runs, each
CLI subprocess can also start a Tokio worker per host CPU.
## What changed
- Share an SSE mock that returns HTTP 426 on WebSocket upgrades to
trigger immediate HTTP fallback. Reuse it in the fallback test.
- Set `TOKIO_WORKER_THREADS=2` for CLI subprocesses launched by the
affected test helpers. Run streaming and resume cases that don't need
the repository checkout in temporary working directories.
- Test promptless `codex exec fork` option validation without creating a
source thread. In the successful promptless fork case, keep stdin
open and rely on the test runner's timeout to catch a blocked read.
GitOrigin-RevId: 94c20d4b2fd7cc65bc0f2a1cd0318ac188f59f22
## Why
Search MCP and native web search produce provider-specific references.
Switching providers after a thread resumes can mix those references and
break follow-up calls that use them.
## What changed
Persist whether a thread has used Search MCP, native web search, or
neither. Restore that state from response history, including compacted
history, and use legacy attribution and fallback markers for older
threads. When resumed history lacks a search state or legacy attribution
checkpoint, withhold native fallback unless a legacy marker identifies
native search.
Require every Search MCP call to claim the thread's search provider
before execution, including calls retained by Code Mode.
## Testing
Cover resuming a thread with Search MCP references after discovery
becomes unavailable, both with a saved search state and with imported
history that lacks search checkpoints.
GitOrigin-RevId: 100d21c92b0bdbf737ec36c3474f0bc020df8efc
## Why
A captured board view limits evidence searches to the review's cutoff. A
verdict reviewer needs to be able to check for later evidence, including
restrictions or revocations, before deciding on an action.
## What changed
Add a live `guardian_board` binding that lets reviewers search and read
any Guardian evidence channel, including channels they do not follow.
Search also matches text inside JSON-encoded tool arguments.
Reviewers can list their own subscriptions with `subscribed_channels`
and subscribe or unsubscribe by channel. Subscriptions control delivery
of future evidence. Earlier posts are available through search and read
tools.
Let review setup and prewarming select guidance for the installed
retrieval tools. The live board guidance explains how to find original
user messages and assess their authority. Share the provider-scoped
reviewer header setup through the core Guardian review API.
## Testing
Cover searches beyond the captured cutoff and in unsubscribed channels,
paginated listing of the reviewer's own subscriptions, and channel-only
subscription changes in both live and captured views.
GitOrigin-RevId: c2e1c6c849346cd3d6e316bcf17e44260fcd4c8e
## Why
Hosts preparing a child thread lacked the parent's effective base
instructions and the developer instructions a native subagent would inherit.
Hosts also need the base instruction provenance to preserve custom text
while letting model-owned instructions resolve for the child's model.
## What changed
Include effective base instruction text and provenance in
`PreparedChildContext`. Share developer instruction selection with native
subagent creation so host preparation uses the configured V2 subagent
override when present and falls back to the parent turn's developer
instructions otherwise.
## Testing
Add integration coverage that starts a child on a different model and
checks that custom base instructions persist, model-owned instructions
resolve for the child model, and the V2 override takes precedence over
the parent developer instructions.
GitOrigin-RevId: 0e151e343e58d995c8901a9ba819cb7f60d248f5
## What changed
Update the expected hashes for tool lists and incremental tool declarations
across seven core scenario snapshots. The fixtures cover Code Mode, dynamic
tools, and MCP discovery and sharing.
GitOrigin-RevId: 8d69870b488dffc5a24afe0e1c8f522335b25105
## What changed
Add `RealtimeExistingCallAuth` to `RealtimeAttachmentOptions`, with model-provider authentication as the default. Embedding hosts can explicitly select `ExternalHeaders` for existing calls to use header-based credentials and the host's transport without adding model-provider headers or performing runtime agent registration.
Require an explicit, nonempty sideband URL and header-based authentication for this mode. Destination authorization remains the trusted host's responsibility, and application network policy still applies.
## Testing
Add integration coverage for external-header and model-provider authentication through event delivery, reconnect, and detach. Verify that model-provider credentials are excluded in external-header mode and that invalid authentication, missing URLs, and network policy denials reject the attachment before a WebSocket handshake.
GitOrigin-RevId: 2c915e1cf76a3563f58f751272db1ec50718d925
## Why
The bundled Memory hook needs to supply context at startup and after compaction without requiring saved hook trust.
## What changed
Recognize the exact bundled Memory `SessionStart` declaration as a built-in hook: the `^(startup|compact)$` matcher, `codex_apps` server, `codex_dream_memory.get_mec` tool, and empty input. Carry the expected app connector identity through discovery for dispatch checks, and hide this built-in hook from hook listings while preserving other plugin hooks.
## Testing
Add coverage for exact declaration matching, hook listings without an Apps connection, and a scenario snapshot verifying memory context injection at startup and after compaction without saved trust.
GitOrigin-RevId: edc0e8ffa955227328345f46afecc2a868c0be49