## Why
When the retried response also meets the guardian's resampling criteria,
it can trigger another model request and keep the turn from finishing.
## What changed
Consume the original prompt when scheduling the retry. The second
verdict stays buffered until completion and is replayed after usage
accounting, even if it also meets the resampling criteria. Usage from
the discarded first response still counts toward spending.
GitOrigin-RevId: f8ded8f31bd7d9e440c0c92a92a80480acec61d2
## Why
Tool schema budget checks cloned the schema and allocated a JSON buffer
just to measure its size. Building a Responses Lite catalog also cloned
tool definitions before serializing them.
## What changed
- Deserialize schemas from borrowed JSON during compaction, count
serialized bytes without allocating a buffer, and reuse the parsed
schema when it fits the budget.
- Serialize borrowed tool specs and namespace members directly, and pass
filtered specs as an iterator. Preserve the serialized namespace field
order because the bytes contribute to the `additional_tools` item ID.
## Testing
- Compare the exact serialized Responses Lite catalog against the
expected namespace layout.
- Add a `tool_catalog` benchmark for connector schema preparation and
Responses Lite catalog encoding with 1 and 64 tool specs.
GitOrigin-RevId: 6bd03a12fcedd4abfa8c3a03f298243483e98c63
## Why
An explicit `thread/guardianReview` request could return a null assessment when live execution would skip approval, leaving callers without a verdict on the recorded action.
## What changed
Require `assessment` on every successful `thread/guardianReview` response. Review eligible recorded calls even when a command is allowlisted, an MCP tool is configured for automatic approval or has a remembered approval, or the policy disables permission requests. The review runs without executing the call or granting permissions.
Include the MCP server's owning environment permissions in the review context, matching live review.
## Testing
Cover allowlisted commands, permission requests with prompting disabled, and automatically approved MCP tools. Compare live and recorded MCP review input for a server whose owning environment has denied paths.
GitOrigin-RevId: 54689dc043d77f940e10d29842308340f6937980
## Why
Only catalog role instructions carried the `<multi_agent_role>` tag,
so the same guidance appeared in different formats depending on its source.
## What changed
Render bundled, catalog, and configured root and subagent guidance as
`multi_agent.role_instructions` developer messages. Wrap the guidance in
`<multi_agent_role>` tags and preserve configured text that's already tagged.
Match untagged parent guidance by its body when filtering forked history.
## Testing
Update prompt and session assertions for tagged role instructions, and keep
the cold-resume test exercising a rollout with legacy untagged guidance.
GitOrigin-RevId: 60c55b5d7227811b92bd1bf125f1cd3a965720fd
## Why
A successful JSON-RPC exchange can still return a failed tool result.
MCP error metrics count that failure, but the trace span can lack an
error status. Dropped calls can also leave spans without an outcome.
## What changed
Record `codex.mcp.call.outcome` on `mcp.tools.call` spans and mark
failures with OpenTelemetry error status using the same classification
as the metrics. Record `interrupted` when the call future is dropped
before completion, including before its first poll.
Capture the numeric JSON-RPC error code in `rpc.jsonrpc.error_code`
when available, leaving server error messages and data out of the span.
## Testing
Extend in-memory telemetry tests to check that spans and metrics agree
on error classification and that span attributes omit sensitive test
values. Cover success and cancellation before the first poll and while
the call is pending.
GitOrigin-RevId: 57fcdc36f19cfc2f227c1ec964a932f3cf7eaa04
## Why
A required hook check can fail to run or return a usable result. Continuing
after that failure can let an action proceed without a completed check.
## What changed
Add per-handler `onFailure` for command and MCP tool hooks. The default
`continue` preserves existing behavior. On supported synchronous hooks,
`block` applies the event's blocking behavior and reports the reason while
preserving failure diagnostics. For example, a failed `PreToolUse` check
prevents the tool from running, while a failed `PostToolUse` check withholds
the result of a tool that already ran.
Expose the policy in the app-server's `configRequirements/read` response.
## Testing
Add tests for command and MCP failures under both policies, and scenario
coverage for blocked tool execution, withheld results, and completion after
a `Stop` hook recovers.
GitOrigin-RevId: 20d6ebda0094382fe052bbf34338edb994cc7bd3
## Why
Fixed retention limits could discard long user instructions or leave
older sender messages out of Guardian review even when the configured
elastic budget had room for them.
## What changed
- Apply the configured retained-instruction entry limit when capturing
and restoring user messages. Fixed-budget reviewers use the fixed
retention window for both user and assistant messages.
- Build elastic sender snapshots at delivery using the receiver's sender
evidence budget. Give recent user messages first claim on space, then
include preceding assistant context where it fits. Mark omitted
evidence and save the snapshot for review and rollback.
## Testing
Add coverage for cross-host delivery after compaction, large sender
snapshots through checkpoint restore and rollback, and how synchronous
and asynchronous reviewers read saved or empty sender snapshots.
GitOrigin-RevId: f0b01a2d558e3286335efac85a4f8645dd9b954b
## Why
The fixed retention window can discard assistant messages before elastic
Guardian reviews can use them as context for a user's reply.
## What changed
Apply the thread's Guardian retention policy when recording assistant messages,
including confirmed messages sent through the user messaging tool. Keep full
text within the configured record limit and the overall assistant history byte
budget. Preserve an incomplete marker when a confirmed delivery exceeds the
record limit.
Recover the thread's retention settings from saved history and compaction
checkpoints. Fixed-budget reviews continue to use the fixed retention window.
## Testing
Add coverage for record limits during capture and restore, thread-owned
settings recovery, and replay of oversized confirmed deliveries.
GitOrigin-RevId: e828f06824ce6712910a9cc5ef42a438d1ddf27e
## What changed
At session startup, derive `assistant_record_bytes` from the Sync Elastic
per-entry token limit for retained user instructions. Use the default
section limit when the configuration omits that section.
Store the resolved byte limit in the optional `guardian_retention` field
of `ThreadSettingsSnapshot` and update the app-server schema. Fixed-mode
snapshots omit the field, and older snapshots can still be read.
GitOrigin-RevId: a8de88c5bd0e35c4a114577e70fb0c858acb13c9
## What changed
Use the turn's effective `web_search` mode for standalone and hosted
web search. Remove model-selected Search MCP discovery, fallback, and
provider tracking across thread resumes.
Remove `web_search_provider` from model metadata, the
`tools.client_search_provider` hint from configuration, and the
`hosted_search_policy` feature flag. Update the app-server schemas and
generated SDK types to match.
GitOrigin-RevId: 59e3371f4a43d532a484db52d5998f6770292028
## Why
Matching messages by text can link a tool call to an earlier message
with the same content. A recipient can also accept a message without
ever including it in a model request.
## What changed
Record the originating tool call ID when the recipient adds a spawn,
task assignment, or message to its history. On replay, use that ID to
link the accepted message to its sender even if the recipient records
it before the sender tool finishes.
Keep the interaction edge pointed at the recipient thread until the
message appears in a model request. Track distinct conversation items
across history resets and count repeated prompt prefixes only once.
## Testing
Replay tests cover identical message text, receipt before tool
completion, and messages observed again after compaction.
GitOrigin-RevId: ccab7c33993ba5fce7fceb733dc90c9d428ec78f
## Why
The daemon's automatic update preference still permits manual updates.
Administrators need a policy that covers both paths.
## What changed
Set `features.daemon_updates = false` in managed `requirements.toml` or
local MDM policy to block scheduled updates and manual daemon package
replacements. Updates are allowed by default. User configuration cannot
override the policy, and cloud-delivered requirements reject the setting.
When policy blocks updates, the TUI hides update actions in `/daemon`,
suppresses update offers in version notices, and directs users to their
administrator where a newer daemon is required.
## Testing
Add coverage for the default, disabled, and invalid policy cases,
rejection of the setting in cloud requirements, and the TUI with daemon
updates disabled.
GitOrigin-RevId: de9e50c4acc4dc8e83bbd2b9a5e902deb8c6f477
## Why
Discovery could retry transport failures on successive lookups while
caching server errors until invalidation. That could repeat requests
against an unhealthy executor or leave a session without an inventory
after the server recovered.
## What changed
Cache failed discovery loads per context and return the cached error
during cooldown. The first lookup after cooldown retries, with delays
doubling from 1 second up to 30 seconds on consecutive failures.
Successful inventories are reused, canceled loads add no cooldown, and
explicit refresh clears the cooldown for the next lookup without
interrupting in-flight readers.
Compare discovery snapshots to detect inventory changes so recovered
plugins and MCP capabilities can become available without an explicit
refresh.
## Testing
Cover backoff timing, shared results for concurrent callers,
cancellation, and refresh bypassing cooldown. Exercise recovery after
failed prewarming and verify that MCP inventory updates after recovery.
GitOrigin-RevId: 6de34bb8957a0b24ee874e2447157bd3af562430
## Why
An exhausted carryover budget could drop explicitly pinned items, and an
oversized pin could crowd out ordinary user messages during local compaction.
## What changed
Preserve eligible pins in full and in their original order for the current
thread, child threads, or both, according to their retention policy. Apply
the carryover budget to the remaining history, including items retained by
features without an explicit pin.
## Testing
Add regression tests for destination-specific pins at zero budget and for
keeping an ordinary user message alongside an oversized pin during local
compaction.
GitOrigin-RevId: fc8529bcc254d8e7a4a010337ce760e94daa4bef
## Why
Invalidating Codex's discovery cache could still return stale inventory
if the executor reused its cached snapshot before its file watcher
reported a change.
## What changed
Add an optional `forceReload` flag to `capabilities/discoverV2` that
makes the executor rescan its files. Codex sends it on the next lookup
of each invalidated context. Explicit reloads also replace the matching
cache entry so subsequent ordinary requests can reuse the fresh result.
## Testing
Add coverage for discovering a newly added skill before the watcher
runs, forwarding the reload flag after invalidation, and reusing
refreshed results.
GitOrigin-RevId: c98f2b8d4772e10b74ff09dd382ad8386857158f
## Why
Step-time discovery can make the first step that needs a remote executor
inventory wait for a discovery round trip. Starting discovery during
environment setup lets deferred turns begin sampling while the inventory
is being fetched.
## What changed
When executor capability discovery V2 is enabled, prewarm the thread's
discovery cache for supported remote executors before marking their
environments ready. Reserve cache capacity for all selected environments
so the first step can reuse their inventories.
Give each prewarm up to five seconds and let environment startup proceed
after discovery errors or a timeout. Step-time discovery reuses cached
successes and permanent errors and can retry transient failures and
timed-out loads.
## Testing
Add integration coverage for deferred readiness and cache reuse after
success, permanent errors, transient failures, and timeouts. Also cover
cache retention across multiple environments and session startup when
discovery receives no reply.
GitOrigin-RevId: d07fc78bd42953a4caf9e4b39528db8a254eb2b8
## Why
The `always` policy ties retention across context windows to inheritance by
spawned agents. Callers need to control those behaviors independently.
## What changed
- `alwaysInThread` carries items across context windows in the current thread
and excludes them from spawned agents, including full-history forks.
- `alwaysInChildren` passes items still in the parent's context to spawned
agents and leaves each thread's context-window retention to the usual rules.
- `always` continues to apply in both scopes, including for items saved by
older versions. Retained tool calls and outputs must be adjacent, with the
call first and the same retention policy on both items.
## Testing
Extend integration coverage for retention across remote compaction, inheritance
by spawned agents, and injection through the app server.
GitOrigin-RevId: aafede69cfbe149aa52292e6029d248d4bdf6401
## What changed
Add `InheritedHistoryVisibility` to `CreateThreadParams` and pass it through
prepared forks. `Full` is the default and remains the mode used by app-server
forks. `ModelContextOnly` requests that `list_turns` and `list_items` omit
inherited history. The local thread store rejects that mode as unsupported.
## Testing
Add a regression test that requests `ModelContextOnly` through a prepared fork
and checks that the local store's unsupported-operation error reaches the caller.
GitOrigin-RevId: de675d6b83ca610eca5a304b9622b312d64828f6
## Why
Starting a turn discarded the discovery cache and forced MCP to rebuild
from a fresh inventory even when the executor context was unchanged.
An MCP refresh could also discover a different inventory from the one
the step had already captured.
## What changed
Keep a per-thread cache keyed by environment, executor session, working
directory, and sandbox. Explicit invalidation reloads discovery on the
next lookup and lets in-flight readers finish with their captured results.
Use the step's captured inventory for MCP reconciliation and bind it
with the current MCP policy. Apply the binding's plugin policy when
selecting skills and hooks.
## Testing
Cover cache reuse across turns, lazy invalidation during in-flight
discovery, and MCP refresh with a captured inventory after a server
has been revoked.
GitOrigin-RevId: 8d4087dffdb3d6feef2456918a08ae7724cf18e4
## Why
A WebSocket response can still complete with a final answer while Codex drains it after a mailbox interrupt. Treating the interrupt alone as a reason to resample reopens the turn even when the pending mail can wait.
## What changed
Recheck whether pending mail requires preemption after the drain. When the drain retains a final answer, queue-only mail waits for the next turn's sampling boundary. User steering can still reopen the current turn.
## Testing
Add WebSocket regression cases for queue-only mail after both empty and nonempty final answers, and for user steering received during the drain.
GitOrigin-RevId: 914b51f2de1afc91311667cc05718507717aaaa0
## What changed
Move ID derivation for base instructions and Responses Lite tool definitions
into `ThreadContextIds`. These items keep the same thread-scoped,
content-derived UUIDs when rebuilt for a request.
Invoke prefix ID assignment for newly rendered items during history
replacement and when publishing initial context into empty history.
The UUID allocator leaves these items to ordinary response item ID
allocation.
GitOrigin-RevId: f230a58e3264894bddfd5a250a4b6d1baeabecf0
## Why
Response item IDs and context window IDs use separate generator callbacks.
A shared allocator gives history and inference a single API for both.
## What changed
Use `ThreadContextIds` to allocate response item IDs, retained-context
revisions, and compaction window IDs. Move initial window selection into
`InitialHistory` so resumed threads reuse a valid window ID from their
rollout. Give rollout reconstruction its own allocator.
Assign hook prompt IDs through the session's normal response item
recording path.
## Testing
Move the prefixed UUIDv7 item ID test to the allocator crate and add
coverage for JSON escaping in Guardian's item ID token budget.
GitOrigin-RevId: 31232f50648382033506d1f86815ce7c1de78378
## Why
A failed catalog fetch can leave an explicitly configured Guardian provider
without a classifier. Waiting for another fetch during tool dispatch would
delay the tool call.
## What changed
When a tool call is observed and background scoring is allowed, retry
initializing the Guardian catalog without blocking dispatch. Allow only one
background retry at a time. Check catalog readiness against the current
credentials and schedule initialization if auth needs to be resolved first.
## Testing
Add a regression test that holds the catalog retry open while the first tool
call completes, then verifies that a later call is scored once discovery
succeeds. Cover full-access sessions and mandatory review requirements, where
background recovery is skipped.
GitOrigin-RevId: 2f07bb6bdcfbf22e512f0bd223845f149fa186b5
Pass `SamplingUsage` into numeric usage accounting and let the host and
controller paths apply their budget decisions directly. Host-wide
exhaustion stops new work, while turn-only exhaustion returns
`SessionBudgetExceeded`. The controller still stops new work on budget
exhaustion when there is no native rollout budget.
GitOrigin-RevId: 544b9a49a23e2becc68d9cecae347e4d00bbdea0
## Why
Configuration, protocol, and prompt code use in-memory policies and
previously pulled in the Starlark parser through `codex-execpolicy`.
## What changed
Move policy construction, rule validation, and evaluation into
`codex-execpolicy-rules` and use it directly from those crates. Keep
Starlark policy loading and file updates in `codex-execpolicy`, which
re-exports the shared rule types and wraps rule validation errors while
preserving their source locations.
GitOrigin-RevId: 5bc70d3cd387b43a3ad1fcc56af96ad169ac8b13
## Why
Recommendation lookups poll the plugin service for a tooling-state marker even when the cached catalog can still be reused. Install flows and installed-plugin snapshots already give Codex signals to refresh recommendations.
## What changed
Remove tooling-state polling and refresh recommendations on the next lookup after a known install event or a change to the installed plugin inventory or enabled state. Invalidate all product SKUs for the affected plugin service and account scope. If the account changes while a remote install prompt is open, invalidate both account scopes when the user accepts.
Concurrent lookups share a catalog fetch. If a refresh fails, keep serving the last successful result when available and retry on the next lookup.
## Testing
Cover invalidation across accounts, backends, and product SKUs, retention of the last catalog after a failed refresh, and isolation from fetches that complete after invalidation. Update the remote install integration test to exercise the next turn without waiting for the poll interval.
GitOrigin-RevId: 5d2ba84d1118e9346308bf6225543e0e174f8125
## Why
An explicit Guardian provider could handle approval reviews, but configuring it
disabled Guardian V2 scoring. This prevented automatic reviews from using
background scores from that provider.
## What changed
Route classification through the configured Guardian provider and use its
classifier catalog for instructions, reasoning effort, review thresholds, and
input limits. Apply the Guardian provider's API-key access policy to classifier
requests and ignore assessments from the actor's response stream when a
Guardian provider is configured.
Keep mandatory review requirements in force and skip background scoring in
User approval mode and Full Access.
## Testing
Extend coverage for separate actor and Guardian providers at startup and after
cold resume, including when both use the same model name. Cover catalog
settings, scoring restrictions, and provider-specific API-key policy.
GitOrigin-RevId: 5f83d1704bacc63033e144bba0d78752283cb590
## 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
## What changed
Choose the full config or shell environment filter schema inside the
diagnostics module. Config loaders call the helper for the validation
that failed without passing a deserialization type or the
`config.toml` filename. Both helpers use the same layer traversal and
source location reporting.
GitOrigin-RevId: 5dcc7984b907e3769904c303cd08577c6faf4769
## 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
Process lifecycle handlers could overwrite each other's updates by reading
and replacing the entire state. For example, a rejected stdin write could
restore an older snapshot after the output collector recorded an exit code.
## What changed
Apply lifecycle transitions in place under the watch channel's write lock.
Rejected stdin writes and confirmed termination only mark the process as
exited, preserving any exit code already reported by the executor.
## Testing
Regression tests cover both closed stdin and unknown-process responses.
They verify that subsequent lifecycle updates preserve the exit code and
sandbox denial recovered from the final read, and that repeated calls to
`fail_and_terminate` preserve the first failure message.
GitOrigin-RevId: f090c0860c86b6e668c31d122d986ea4f4a119b6
## 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
Pass the host's existing `&[UserInput]` into `TurnInputContext` to avoid
cloning the input when building extension turn items. Use the borrowed
slice directly for skill mention detection and shadow selection.
GitOrigin-RevId: f4983b584830e481d914f0c9aa1e39e78b965a19
## 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
Take the payload from the successful tool result and pass it directly
to the post-tool-use hooks.
GitOrigin-RevId: bb7dbe82bbc7b565257b94a0473476326e60db12
## 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
## Why
Attached reviews used fixed evidence limits even when elastic budgeting
was configured. This could reject a pending tool call whose exact
arguments would fit within the review request's input budget.
## What changed
Use the configured budgeting policy to prepare the pending action and
permissions for attached reviews. With elastic budgeting enabled, check
whether the exact call fits when enforcing the final request budget.
## Testing
Add a regression test for a tool call that exceeds the fixed evidence
limit. Elastic budgeting rejects it when the request budget is too small
and preserves the original call when it fits.
GitOrigin-RevId: 42cc4a8682a98badfe6be95434703500403e7118
## Why
Boxing the thread startup future at each call site makes each caller
compile its own copy of the future.
## What changed
Return a `BoxFuture` from `spawn_thread` and move the startup logic into
`spawn_thread_inner`. Thread start, resume, and fork paths now await
`spawn_thread` directly.
GitOrigin-RevId: 5004651423551e173b1cc98b185c6a1dc2bc097e
## 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