## Why
Agent spawn traces need separate timings for preparing forked history and
persisting the parent-child relationship. The persistence write runs in
a separate Tokio task, so it needs the caller's tracing context.
## What changed
Add spans for fork history preparation and the spawn-edge upsert. Carry
the caller's span and subscriber into the persistence task, and enter
the upsert span both when calling the graph store and when polling its
future.
## Testing
Extend the failed-publication test to verify cleanup after a lost commit
acknowledgement and check the exported trace. It asserts that fork
preparation finishes before the upsert starts, that both spans belong
to the spawn caller, and that the graph store span is nested under the
upsert.
GitOrigin-RevId: 28bf2d69ce494ab146aa124f045e28d6a0f5dab9
## Why
A sandboxed command needs read access to the generated CA bundle for its
managed proxy route. Choosing the bundle from the command environment or
from live proxy settings can give the sandbox a different bundle from
the one captured when the route was prepared.
## What changed
Capture the generated CA bundle alongside the proxy environment and
sandbox network policy. Validate the captured bundle when granting read
access. A locally prepared route with no generated CA grants no CA
access. Controller-supplied portable routes still look up and validate
the generated bundle in the command environment.
## Testing
Cover restricted reads for remote processes using both portable routes
and executor-local proxies. Verify that a borrowed proxy's prepared
route preserves its listener and CA grant across a proxy configuration
change.
GitOrigin-RevId: 1a4024b5b84c14febda7cdd6b6f4f950a7741054
## Why
End-to-end tool duration does not show how much time `exec_command`
spends collecting its initial output. Tracking the duration and call
count separately lets readers of the metrics compute the mean
collection time for each configured shell snapshot mode.
## What changed
Record the initial output collection time in whole milliseconds and
count each successful process manager response, including collections
shorter than a millisecond. The timing starts after the early-exit wait
and can include draining output after the process exits.
Tag both counters with the configured `shell_snapshot_mode` (`disabled`,
`v1`, or `v2`), including when execution falls back. Intercepted patches,
process manager errors, and `write_stdin` calls are excluded.
## Testing
Extend a unified exec integration test to check that the recorded time
matches the initial response within one millisecond, both counters carry
the `v2` tag, and a subsequent `write_stdin` leaves the count at one.
GitOrigin-RevId: 289336cf2544a78abb3417484b48d2d22109a56c
## Why
Cancelling a turn or tool call could drop a pending history write or
lose an answer the session had already accepted. A missing write leaves
Guardian unable to confirm that its review history is complete.
## What changed
Let the session finish tracked evidence writes in queue order after the
caller is cancelled, and drain those writes on shutdown. Record verified
`request_user_input` answers at acceptance before waking the tool.
Continue persisting evidence after an earlier write goes unconfirmed,
while still reporting the history gap to Guardian.
## Testing
Regression tests cover initial and retried reviews waiting for a
revocation after caller cancellation, and an accepted answer reaching
history before the turn interruption even with an earlier unconfirmed
write.
GitOrigin-RevId: b8e212d34686bbc793002a34f5a97834a900a342
## Why
The app server already passes its environment and MCP managers to
connector discovery, leaving the standalone listing helpers unused.
## What changed
Remove the unused listing wrappers and re-exports from `codex-core`
and `codex-chatgpt`, including the setup that created temporary managers.
Move `tokio` to the dev dependencies of `codex-chatgpt` and enable only
the features its tests use.
GitOrigin-RevId: 757b32afeb6e46dddb46d507c5af07bf8ff7a2a3
## What changed
Build the retry from the initial sandbox attempt. When policy permits an
unsandboxed retry, clear the sandbox settings and mark the command as
`RequireEscalated` for approval. When policy requires the sandbox to stay
in place, reuse the initial attempt so a network retry preserves file read
restrictions.
## Testing
Cover both Guardian verdicts after a sandboxed attempt. An approved retry
reaches the exec server without a sandbox, and a denied retry is blocked
before it reaches the executor.
GitOrigin-RevId: 5bf36dd4f43b7c0379457b88b8ddbf3dbd482b87
Drop the deprecated `load_config_as_toml_with_cli_*` helpers and
`Config::load_with_cli_overrides_and_harness_overrides`. Existing callers
can use `ConfigBuilder` to apply harness overrides and
`load_config_toml_with_layer_stack` to inspect raw config during startup.
GitOrigin-RevId: 4901d876cf4d87094055f9907bd761525057fa99
## Why
A root-thread instruction can be visible in memory while its history append is still pending. Guardian v3 reads persisted history, so a review can miss a newer instruction that revokes permission for an action.
## What changed
Track pending appends for review-relevant root history and wait for confirmation before capturing the evidence cutoff for an initial review or retry. Confirm the append when the thread store accepts the history batch, before updating thread metadata.
If an append goes unconfirmed, fail review preparation and prompt the user to reload the root thread and resend any missing instructions.
## Testing
Add regression coverage for initial and retry cutoffs waiting on a pending revocation, failed appends of forwarded instructions, and history remaining readable after an acknowledged append followed by a metadata failure.
GitOrigin-RevId: b83ca178ca7b58dbc23b1f064b402df30f9689e1
## Why
Codex needs rejected audio file IDs when reconstructing a session so
later model requests can omit those attachments. Clients only need the
turn error.
## What changed
Store rejected audio file IDs as rollout metadata and restore them from
that metadata when replaying history. Keep the existing JSONL layout
under `error.rejected_audio_file_ids` so older versions can still read
newly written rollouts.
## Testing
Add a regression test that round-trips a legacy rollout entry and
verifies that serializing the protocol event omits the rejected IDs.
GitOrigin-RevId: 982dd85d0037cebee056caf61d70988762e42767
## Why
Mailbox preemption can discard partial response items, and turn item
contributors can rewrite completed items. Parsing those items as soon as they
arrive does extra work before their final contents are known.
## What changed
During mailbox draining or when turn item contributors are registered, track
new response items as deferred, suppress their text and reasoning deltas, and
wait for `OutputItemDone` before parsing them. Rely on the response client to
carry the added item's ID forward when the completion omits it.
## Testing
The mailbox preemption tests check that a buffered reasoning item completes
exactly once under its original ID when the completion omits it, and that raw
reasoning deltas for a discarded item stay hidden.
GitOrigin-RevId: 940e062c8c44faa6670945262ee8c8f16abf4e20
## Why
The output collector could miss a closure notification while starting its
post-exit wait. It could also see an empty buffer just before the producer
appended its final chunk and closed the stream.
## What changed
Use a dedicated `CancellationToken` to signal when the output producer is
done. The collector samples closure before draining the buffer so that
closure during the drain wakes it for another pass. The streaming watcher
flushes queued chunks when it observes closure, and sandbox denial checks
can proceed immediately when output is already closed.
## Testing
Update the bounded collection test to verify that closure alone wakes
the post-exit collector and that the final bytes survive repeated drains.
GitOrigin-RevId: 4b94a018d784664031f326ec360d27fcf166bbda
## Why
A slow model lookup can delay thread metadata reads and goal updates even
though both operations have the settings and data they need locally.
## What changed
Use locally configured settings for app-server thread reads, enrichment,
and direct-input checks. The effective configuration snapshot still
validates the service tier against the selected model.
Record goal updates and emit their raw response events using an internal
submission ID without constructing a turn context.
## Testing
Add a regression test that gates model lookup and checks that the local
snapshot and goal recording complete without requesting model info. It
also checks that the goal event matches the history item and that the
effective snapshot filters out an unsupported service tier.
GitOrigin-RevId: 7d008edd775ae459a1fd1e3db79f38f2d9b5ca30
## Why
Selecting the final item in an idle thread's history ties Guardian review
to what was recorded. For example, a client may record an `exec` script
and need an assessment of an individual `exec_command` from that script.
## What changed
Require `toolCall` in the experimental `thread/guardianReview` request.
Guardian assesses the supplied `function_call` or `custom_tool_call`
against the idle thread's full history without appending or executing it.
## Testing
Cover rejection of requests missing `toolCall` and verify that Guardian
sees the recorded script alongside each command submitted for review.
Check that only the original script call is persisted in the thread.
GitOrigin-RevId: a1ce61e10e98107b38db60071dd63f189ef33ad1
## Why
A pending native agent call can appear alongside historical tool calls in
Guardian's review context. Explicit request boundaries identify the exact call
Guardian should judge.
## What changed
Add the off-by-default `guardian_native_action_framing` feature for Multi-Agent
V2 reviews with native multi-agent history enabled. Wrap the pending call and
its evidence-only output in approval request markers, and point the transcript
entry to the current request.
Keep the call-ID reference when reviewer history already contains the call.
Reserve room for the approval markers when budgeting screenshots so a retry
can replay the framed call if reviewer history changes.
## Testing
Cover call deduplication, replay after compaction, and screenshot admission at
the token limit. Update the incremental review scenario to show the framed
`send_message` call alongside encrypted parent reply history.
GitOrigin-RevId: dd99cd4ad4cf3451afe30d2e93aa3e47b493a4c4
## What changed
Extend the plugin manager's cache test to verify that a per-tool
`approval_mode = "approve"` takes effect after the cache is warmed with
other configurations and is still returned after `.mcp.json` is removed.
Remove the core test for this scenario and its test-only approval lookup.
GitOrigin-RevId: f99d18b435f2c1f3e0574ec2ffedbe24249e6346
## What changed
Use a manifest default of `writes` and a user override of `prompt`
in the plugin manager test to verify that the user setting takes
precedence. Remove the standalone tool-call approval test and keep
the regression test that checks a per-tool override after the plugin
cache has been warmed.
GitOrigin-RevId: 667e613729e47507030308646d5adc5b5794e2c2
## Why
Required MCP servers can finish at different times even when their startup
notifications arrive together. Notification arrival times cannot show how long
each server took to start.
## What changed
Measure each startup attempt and expose its elapsed milliseconds as
`durationMs` on `ready` and `failed` updates from
`mcpServer/startupStatus/updated`. Successful Codex Apps reconnects report
their own duration. Reused connections, `starting`, and `cancelled` updates
carry `null`. The protocol accepts notifications from older servers that omit
the field.
## Testing
Cover distinct durations for fast and slow required servers, timing through
lease registration for newly opened shared connections, and a fresh duration
after Codex Apps recovery.
GitOrigin-RevId: 39c0c418149dd2b220828be04d998085f57acf2d
The turn context renders generic plugin guidance through
`AvailablePluginsInstructions`. Remove `render_plugins_section` and its sole
caller, a test that checks the bundled guidance through that helper.
GitOrigin-RevId: 30e2b7aaab9432b7a29b8124676907b8dc1228e9
## What changed
Remove the test that checked whether a tool-level approval setting
overrides the MCP server default, an unconfigured tool uses the server
default, and an unknown server falls back to `Auto`.
GitOrigin-RevId: 68df73cbefe79772d75cdc35abe42d4de3cf991d
## What changed
Add `features.defer_image_generation` so code mode can discover the image
generation tool through `ALL_TOOLS` without including its definition in
the initial model request. Direct exposure remains the default and
applies when `image_gen` is excluded from code mode.
## Testing
Update the app-server GIF edit test to discover and invoke the deferred
tool through code mode. Verify that the initial request omits the tool
definition, the discovered definition includes the GIF option, and the
edit preserves animation and API defaults.
GitOrigin-RevId: 899f689bae0b86099a0ca3736d1cd2576bc3a7a9
## Why
A TUI composer prompt does not supply `workspace_kind`. The app server
can derive it from the thread's current project assignment.
## What changed
Use the staged assignment until the thread is saved, then read the
persisted assignment on each new composer turn. Use `project` or
`projectless` as a fallback for model request metadata and turn analytics.
Explicit client metadata takes precedence, and the inferred value stays
with the originating turn.
## Testing
Cover the model request header and analytics event on the first turn,
on a follow-up, and after removing the project assignment. Unit tests
cover explicit metadata precedence and verify that MCP requests,
extensions, and child agents do not inherit the inferred value.
GitOrigin-RevId: 62b88484dd4028a6b72584999e0fa9b84e6e3b03
## Why
MCP tools can return structured data alongside a JSON text fallback for
clients that need it. Printing the whole result in Code Mode can show
the same data twice.
## What changed
Enable `features.code_mode_mcp_result_dedup` to let `text()` omit
`content` when it prints an original, successful MCP result whose only
content block is a plain text fallback that parses to the same JSON as
`structuredContent`. The JavaScript result retains both fields.
Carry the result format through gRPC so the host can distinguish MCP
results from ordinary JSON. The feature is off by default.
## Testing
Add coverage for both feature flag settings, for printing original MCP
results and copies through gRPC, and for comparing equivalent JSON.
GitOrigin-RevId: a8b0b42f5375d9744c235a0e663090dd5982e37e
## Why
The local code-mode host could stay running after its last session
closed. A short grace period allows nearby sessions to reuse the same
process while releasing it after sustained inactivity.
## What changed
Keep the host active while session leases or operation RPCs are in
flight. Once they drain, start a five-second idle timer. New activity
cancels retirement and starts a fresh grace period when it drains.
Process metrics only sample an existing host and leave the idle timer
untouched. Opening a session after retirement starts a fresh host.
## Testing
Add a lifecycle test that covers overlapping sessions, reuse during the
grace period, retirement despite metrics polling, and startup on the
next session.
GitOrigin-RevId: 2ebf7f7b3b3bf2d5a602b0e5b9085195eee13446
## Why
The model catalog can stay stale when a server advertises a new
`x-models-etag` only in the WebSocket handshake.
## What changed
Save the handshake ETag through warmup and emit it as a
`ResponseEvent::ModelsEtag` at the start of the first generation on each
connection. Emit it once so reusing the connection cannot replay an old
ETag after response metadata advertises a newer one.
## Testing
Add regression tests for ETag delivery with and without warmup, across
connection reuse and reconnects, and for a single catalog refresh when
the handshake is the only source of the ETag.
GitOrigin-RevId: f8fcaae4aaa0f245f01435b665cecb105c261852
## Why
An extension that manages its own credentials needs to refresh them
without restarting an MCP session, while keeping each session tied to the
identity that opened it.
## What changed
Add `McpServerContribution::SetWithAuthProvider` for host-local Streamable
HTTP servers. Codex asks the provider for fresh headers on each request.
It reuses the connection across credential refreshes for the same owner,
rejects requests whose owner differs from the session owner, and rebuilds
the connection when the active owner changes.
Provider-backed servers reject conflicting credential configuration,
disable HTTP redirects, and bypass the shared startup tool catalog.
Rebuilding the catalog disables a provider-backed registration if its
transport changes.
## Testing
Add coverage for credential rotation, owner changes, conflicting auth
configuration, transport changes, and tool discovery for the current
owner.
GitOrigin-RevId: 409cbb2237ff306932491335461e87cf5a9ec890
## What changed
Make `ThreadStore::model_ids` return a `ThreadStoreResult` and require
persistent backends to preserve alias assignments across restarts for the
lifetime of the session.
The local store returns an explicit error if its state database is
uninitialized. The in-memory store returns its shared alias store, and
the core test wrappers delegate to their underlying stores.
GitOrigin-RevId: ca0d4bcf1c7dfa96f1a877b421760483b0cf3acc
## Why
Interrupting a turn during extension setup or Git root discovery could
leave its prompt missing from resumed history. Interrupting a blocking
start hook could also cause the next turn to skip that hook.
## What changed
Run the input hooks and record accepted input before setting up skills
and plugins or resolving diff display roots. Run those setup steps
concurrently and cancel diff root discovery when the turn is cancelled.
Keep each start hook event queued until its outcome has been handled so
the next turn can retry it after forced teardown. If cancellation has
already been requested, defer events with matching synchronous hooks
while still processing events that match only asynchronous hooks.
## Testing
Add regression coverage for resuming with the interrupted prompt and
the turn-aborted marker, retrying a blocking start hook after
interruption, and handling synchronous and asynchronous hook matches on
a cancelled turn.
GitOrigin-RevId: 7ee1ca6a099f6af65aa0074897af51963b9cdca7
## Why
Codex does not use sequence numbers on text or custom tool input deltas.
## What changed
Add `delta.sequence_number` to the default `x-codex-exclude-stream-fields`
header for Responses requests over HTTP and WebSocket. Explicit provider
header values still take precedence.
## Testing
Update the WebSocket handshake and HTTP output-token replay tests to
expect the new default.
GitOrigin-RevId: d16ecb10f9188ba9cca4504e1b68e32832fb931a
## Why
Administrators who use one gateway for managed configuration and model
requests need to configure the gateway URL and OAuth settings in two
places. A single enrollment keeps those settings together.
## What changed
Accept `[gateway]` with a base URL and `[gateway.auth]` in system
`requirements.toml` or MDM. Use the same OAuth settings for the config
server at the gateway root and the required Responses API provider at
`/v1`, with model discovery at `/v1/models`.
MDM enrollment replaces system enrollment as a unit. Requirements
composition rejects remote enrollment, conflicting config server or
provider settings, and empty or reserved provider names.
## Testing
Add composition tests for MDM precedence, remote enrollment and
rerouting attempts, and invalid or conflicting enrollment settings.
GitOrigin-RevId: 35f04481dc2b592e25afa4ac9235481cd90cf915
## What changed
Wrap the refresh mutex wait in a `cloud_catalog.refresh.acquire_lock`
span and record `acquired = true` once the lock is held. This makes
the wait visible separately from catalog preparation and refresh work.
GitOrigin-RevId: 7cdc642d11282d8efcbc1a3468110ef3ce319b4a
## Why
MCP hook results were flattened to text, so `SessionStart` hooks could
not pass encrypted context to the model as encrypted tool output.
## What changed
Recognize text blocks marked with `codex/encryptedContent` in synchronous
MCP `SessionStart` hooks. Send them to the model as standalone
`function_call_output` items with the originating tool name and namespace.
Keep ciphertext out of hook previews and plaintext spill files. Reject
empty encrypted blocks and cap the serialized encrypted output at
40,000 bytes per hook run.
## Testing
Add a scenario that checks that ciphertext above the plaintext spill threshold reaches
the first model request unchanged, appears once after a cold resume, and
stays out of hook previews and spill files. Cover discarding encrypted
context when hook output fails JSON parsing under both failure policies.
GitOrigin-RevId: cbc11c6f7055cc131212c6e9ddd37a882ed61d38
## Why
Reasoning replay only needs the ciphertext from the completed item, so
sending it when the item is first added is unnecessary.
## What changed
Default `x-codex-exclude-stream-fields` to
`reasoning.added.encrypted_content` on Responses HTTP streams and WebSocket
handshakes. Provider-configured values take precedence, and an empty value
opts out. Use a separate header to preserve compatibility with servers that
recognize `x-codex-exclude`.
## Testing
Extend integration tests to cover the default on both transports, provider
overrides, and replay with or without preliminary ciphertext.
GitOrigin-RevId: 83b72e5dd896f96e2793e67f0f05828218b98af7
## Why
Tool planning built the search index even on turns that never used
`tool_search`.
## What changed
Build the index on a blocking worker when the first search over a
nonempty tool catalog needs it. Regular and Code Mode searches share
the same build within a handler and reuse the completed index. The
build continues if the search that started it is canceled.
## Testing
Add coverage for deferred indexing, concurrent first searches, and
reuse of an in-progress build after the first search is canceled.
GitOrigin-RevId: eb696e93dbc481a76a5adfe7f5506db971047bd5
## Why
Manual compaction could interrupt a running turn before discovering that
the session settings prevent compaction. This can happen when a policy
refresh requires auto review for the current model.
## What changed
Validate the session settings before interrupting the active turn for
`/compact`. If validation fails during a turn, emit a warning and leave
the turn running. If the session is idle, report a bad request and set
the agent status to errored.
## Testing
Add a regression test that verifies the running turn completes after
a compaction warning and that retrying `/compact` while idle reports an
error.
GitOrigin-RevId: 7e841450461b78661c026a348a610aefa24d8a77
## Why
Read-only Bazel runfiles can leave copied patch fixtures unwritable, and
restricted Linux environments can deny the mount setup Bubblewrap needs.
Test environments can also lack Python or use paths long enough to
produce identical truncated worktree headings.
## What changed
- Write fresh, writable copies of patch scenario inputs.
- Treat Bubblewrap's mount permission error as sandbox unavailability in
the CLI and Linux sandbox tests.
- Use `printf` and `tr` to generate output for code mode truncation tests.
- Normalize one worktree heading at a time in the overview snapshot.
GitOrigin-RevId: 88590c9c08a739ecdd4ed49bd41734b02ece3f66
## Why
Interrupting `exec_command` after launch but before terminal registration
can leave the process running. The network denial monitor holds a strong
reference that prevents startup cleanup from dropping the process.
## What changed
Give the network denial monitor a weak reference so startup cleanup can
terminate the process on interruption. The monitor can still terminate a
registered process when a deferred network approval is denied.
## Testing
Add a regression test that interrupts startup while plugin attribution
is waiting on the exec server and checks that the server receives
`process/terminate` for the launched process.
GitOrigin-RevId: 54eb237028f9057d8520098b640782fe85c58331
Other WebSocket handshake tests already verify that `OpenAI-Beta`
includes `responses_websockets=2026-02-06`. Drop the standalone test
that checks the same header.
GitOrigin-RevId: 844173591c7f1f2f7026fdc1f5414d7a41fcdc65
## Why
The code-mode host only exports traces, and Windows sandbox setup only
exports metrics. Selecting the required exporter and HTTP client at compile
time lets the linker drop unused exporter and custom client code.
## What changed
Use `BlockingHttpService` for OTLP/HTTP JSON traces in the code-mode host
and Statsig metrics during Windows sandbox setup. These providers use the
OpenTelemetry SDK's default HTTP client. Traces use the dedicated batch span
processor even inside a Tokio runtime.
Move `codex_home` from `OtelSettings` to `OtelHeadersHelper`, where it
supplies the working directory for user-configured header commands.
## Testing
Exercise the blocking providers in HTTP loopback tests for trace export
inside a current-thread Tokio runtime and cumulative metrics temporality.
GitOrigin-RevId: 21bacbdb18b603f5f536532812ce7643e4eb36d6
Fold the duplicate prompt-prefix case into the provider WebSocket support
test. Assert that both requests use `response.create` on the same
connection and that the follow-up sends the `previous_response_id` and
only the new input.
GitOrigin-RevId: 6d4c88aa4d8babf44b295ec9a1c8a1d4f6956adc
The test for omitting the timing metrics header already streams through
a WebSocket-capable provider with no feature flags enabled. Assert that
it sends exactly one request over a single WebSocket connection and
remove the separate test that exercises the same setup.
GitOrigin-RevId: 15aa2d2b503c3e1accfdf0de80eddd91e0b982e4
## Why
Legacy models such as `gpt-5.2` emit compaction summaries on the final
channel, where the turn's JSON schema can constrain the summary.
## What changed
Remote V2 compaction omits the final-answer schema for the legacy
`gpt-5`, `gpt-5.1`, `gpt-5.2`, and `gpt-5.4-nano` model families,
with an exception for `gpt-5.2-codex`. It recognizes the same model names
with Bedrock's `openai.` prefix. Other models retain the schema in
compaction requests to preserve the cached prompt prefix.
## Testing
Integration tests check schema handling across model variants and verify
that compaction retries use the schema rules for the model handling each
attempt. Regular sampling retains the configured schema.
GitOrigin-RevId: f2ebaa7f3e272cb18ccb879dc7f67973ba1642cc
## Why
Subagents can inherit the root session's service tier or get one from their
role. A per-spawn override lets a caller choose a tier for an individual
child without changing those defaults.
## What changed
Enable the optional `service_tier` argument for v1 and v2 `spawn_agent`
with `multi_agent_v2.expose_spawn_agent_service_tier`. The setting is off by
default, and tool schemas expose the argument alongside model selection.
Omit the argument to use normal inheritance, pass `default` to request
the default tier, or specify a tier available for the child's model and
provider. Unavailable explicit tiers return a spawn error.
Persist the child's choice across eviction and reload. Parent, sibling,
and descendant agents continue to use their usual tier selection.
## Testing
Extend coverage for tier selection in model requests, rejection of
unadvertised Flex on Bedrock, and restoration after eviction without
passing the override to grandchildren.
GitOrigin-RevId: 2e9b92af44232b6a5682fe2cd97980f17cbb5d97
## Why
Guardian review can use spoken context when history supplies completed
transcripts for user recordings and tool results. Source labels distinguish
transcribed speech from typed user messages and identify the originating turn
or tool call.
## What changed
- Collect completed transcripts alongside their source history items so they
participate in review delta selection. Respect tool output filtering.
- Preserve source labels when truncating transcript text. Quote and escape
speech in line format so it cannot introduce a new role header.
- Support an optional `transcript_audio` elastic budget for synchronous and
asynchronous reviews. Without it, user and tool audio use the message and
tool budgets respectively.
## Testing
Add coverage for loading the audio budget in both reviewers, enforcing it in
line and JSON transcripts, and preserving the delta cursor as history grows.
GitOrigin-RevId: fa7e130b1212692e71a996528d8397826837a644
## Why
Interrupting `exec_command` while startup is pending can leave a stale
network approval registration. When the next command makes an untagged
request through the shared proxy, the stale entry makes request
attribution ambiguous and prevents an approval prompt.
## What changed
Tie the registration to the command's approval handle from startup
through completion. Remove the active entry and its stored outcome on
explicit completion or when the last handle is dropped. Cache the outcome
so that all deferred completion observers can report the same denial.
## Testing
Add a regression test that interrupts a pending launch and checks that
an untagged proxy request for the next command prompts for approval and
returns HTTP 403 when denied. Cover cleanup when the last deferred handle
is dropped and denial reuse across cloned handles.
GitOrigin-RevId: 257a32695c487a92d15937772b09085a49533fd3
## Why
A user's authorization can change while Guardian is reviewing a tool call.
A retry could reuse the original evidence cutoff and miss a revocation
that arrived during the first attempt.
## What changed
Capture the root thread's history position when the action is bound and
defer evidence routing until Guardian prepares the review. Capture a fresh
position on retries or if authorization changed before the first attempt.
Use bounded history reads to catch up through the selected position and
wait for routing to reach it before submitting the assessment.
## Testing
Extend the app-server test to revoke authorization through a paused user
goal while an MCP tool call's approval is pending. Verify that Guardian
discards the stale allow, sees the revocation on retry, and denies the
tool call. Cover bounded history reads and shared routing progress in
unit tests.
GitOrigin-RevId: d7cf6f03412c4aa5399700427f40710da3123e52
Update the retained configuration stack during session refresh. Copy only
the MCP server, plugin, and feature requirements in both the parsed and
TOML representations, avoiding a clone of the entire stack.
GitOrigin-RevId: 1bae8cc86a59b4638f9f6cd48ee9eb17de31fef2
Return a `BoxFuture` directly from `Config::load_config_with_layer_stack`
so callers share the future's poll code. Keep the large config-loading
future on the heap to limit stack use on small test threads.
GitOrigin-RevId: 50cf5c27983b38044ecd25dd9be4316c4fdf36ba
## What changed
Return a `BoxFuture<'_, ()>` from `SessionStartup::cleanup` and move the teardown logic into the private async `cleanup_inner` method. Callers continue to await `cleanup()` at the same points.
GitOrigin-RevId: 5c263027fb93d64f1872f4f3d5b732df4b4427e5