## What changed
Add a shared `From<ErrorEvent>` implementation for `TurnError` and reuse it in thread history, rollout projection, and live event handling. Preserve the existing field mappings and keep `additional_details` unset.
Parameterize the compaction replay test by error code and recoverability, retaining the existing `server_error` case, and document retry expectations for WebSocket closes.
GitOrigin-RevId: 3afcc23e9fdc314477febe6b4a4aeb680efafd5a
## Why
A delayed terminal event from an earlier turn could acknowledge interrupts for a later turn. Interrupts could also remain pending after the thread listener shut down.
## What changed
- Associate pending `turn/interrupt` requests with their target turn and reply only when that turn completes or aborts.
- Track the current Core turn through stop hooks and resolve review delegate IDs to the owning turn when validating interrupts.
- Settle pending interrupts with an error on listener shutdown and reject further interrupts against the retired runtime.
## Testing
Add regression tests for delayed terminal events, queued turn starts, review delegates, and interrupt handling during thread revert and runtime replacement.
GitOrigin-RevId: 9695fc3f718baa6b792a14d54136bb87fc003100
## Why
A slow thread resume, such as one waiting for MCP startup, can block unrelated resumes behind the exclusive thread-list permit.
## What changed
Allow resumes using canonical thread IDs to share thread-list access for independent root threads. Keep aliases, paths, supplied history, daemon recovery, and agent-owned or uncertain sources under exclusive ordering.
Check source identity and ownership during resume, upgrading to exclusive access when needed. Preserve probe order during upgrades and keep later list mutations behind earlier probes.
## Testing
Add coverage showing that an independent cold resume completes while another waits for MCP startup, that only canonical ID resumes share access, and that permit upgrades preserve probe order ahead of a queued writer.
GitOrigin-RevId: 23fa6ddd551689be478fcca8e8bac2f8210984e2
## What changed
Introduce `ThreadListState` to wrap the single-permit semaphore shared by thread and project request processors. Centralize exclusive permit acquisition and error handling while preserving the existing locking behavior.
GitOrigin-RevId: e596241d5f2620ea791c3bf95f5d97aabc1e8623
## Why
Sandbox helpers with non-UTF-8 paths can lose their exact executable path when converted into command requests. PTY launches with a custom `argv[0]` can also try to execute the dispatch name instead of the configured program.
## What changed
- Carry native executable paths through sandbox requests, local execution, shell snapshots, and sandbox integrity checks.
- Use native Unix PTY spawning when `argv[0]` differs from the executable, preserving the dispatch name and controlling terminal setup.
- Preserve PTY executable lookup through the child environment's `PATH` and fallback to its home directory when the requested working directory is missing.
## Testing
Add regression coverage for non-UTF-8 sandbox helper paths, PTY dispatch names, child `HOME`/`PATH` lookup, controlling terminals, and exit-code preservation.
GitOrigin-RevId: 6a2af0486220d98195f5d67fde2597e3c4515e11
## Why
A remote plugin's catalog version can differ from the package available locally. Matching names and versions also do not establish that a cached package belongs to the same remote plugin.
## What changed
- Resolve `local_version` for remote plugin lists, details, and shares from the active local package, requiring a matching remote plugin ID and an existing manifest. Perform these filesystem reads on a blocking task.
- Download the package when a same-version cache has a conflicting or unreadable identity receipt. Preserve migration for older caches without receipts, and retain the original receipt if the replacement download fails.
## Testing
Add coverage for local package identity and manifest requirements, differing catalog and local versions, and preservation of the original receipt after a failed replacement download. Update share expectations to leave `local_version` unset when no matching local package exists.
GitOrigin-RevId: 5d86f834ac3861a4a3d3bf0d042bfe3f991a7cad
## Why
Clients need read-state updates for threads they have not opened so they can keep thread lists current.
## What changed
Broadcast `thread/readState/changed` to initialized experimental clients whenever a durable read receipt changes, regardless of thread subscription. Preserve filtering through `optOutNotificationMethods` and document refreshing the list after reconnecting to recover missed changes.
## Testing
Add a WebSocket regression test verifying that an unsubscribed experimental client receives updates while clients without the experimental capability and clients that opt out do not.
GitOrigin-RevId: a1a0f29405a856fdf6e379ded1376ed7d3d765cb
## Why
A background command can request approval after its originating turn has completed. Interrupting a later turn cancels the pending approval but can leave the command item marked as in progress.
## What changed
Complete these late command items with `Declined` status when their approval is canceled by a turn transition. Route completion through the thread listener so `item/completed` reaches the thread's current subscribers, preserving the original turn ID and command start timestamp.
## Testing
Add regression coverage for interrupting a turn with a pending approval from a completed turn, and for delivering late command completion to a replacement subscriber.
GitOrigin-RevId: 8c62fa3302fd3754b84e6fb87b3117f678f55164
## Why
Metadata-only `thread/read` requests for loaded threads reread the store to attach a title after already loading persisted metadata.
## What changed
Reuse persisted metadata and overlay live settings, returning metadata-only responses without another store read. Keep history loading conditional on `includeTurns` and centralize stored-title trimming and legacy preview fallback handling.
## Testing
Extend the in-memory store test to verify that a loaded thread without a rollout path returns its trimmed stored title with exactly one metadata read, while requests with turns still return stored history.
GitOrigin-RevId: 74f20914afb44901d7586eb8e944afdae2640c31
## Why
A turn can complete after the next turn has started. Sharing one turn summary lets late completion events consume the next turn's metadata and clear its command tracking.
## What changed
Track turn summaries and command start times by turn ID so errors, timestamps, final agent messages, and command lifecycle notifications stay associated with the correct turn. Read and remove only the completing turn's state, and clear tracked state when listeners are replaced or removed.
Initialize summaries for inline reviews that can finish before their delegate emits `TurnStarted`.
## Testing
Extend regression coverage to check that overlapping turns retain their own errors, completed turns include start timestamps, and the next turn's approved command emits one start and one completion notification despite a late completion from the previous turn.
GitOrigin-RevId: 91f022d885c67c7d8982091c72325f1d701569a6
## Why
A turn's terminal event can arrive after the next turn has started, cancelling the newer turn's pending approval requests and incorrectly changing the thread's active status.
## What changed
Track the latest started turn in the app server. Only let completion or abort events for that turn cancel pending server requests and update thread watch status, preserving the existing behavior when no started turn is recorded.
## Testing
Add a regression test that delays one turn's completion until the next turn requests command approval, then verifies that the thread remains waiting on approval and the approval can still be accepted to execute the command.
GitOrigin-RevId: 521f4fb74728b3e70572839b2e73d2d2b2735f35
## What changed
- Install Guardian V3 with a local message-board host when the server enables `features.guardianv3.enabled`, independently of thread overrides.
- Clear inherited user, thread, and project instructions from Guardian V3 private threads and skip repository instruction discovery.
## Testing
Add integration coverage for routing the first live message while the actor is still sampling, for both new and resumed threads. Verify that resumed history is skipped, `AGENTS.md` reaches only the actor, and thread overrides cannot enable or disable server-level housekeeping.
GitOrigin-RevId: 3f3ae1be404c9e17b73eea12c95f5a95c96052cf
## What changed
Remove `position` from app-server `Project` responses, the thread-store project model, and generated schemas and SDK types.
Document that clients should use the returned project order and that `beforeProjectId` places a moved project before another project, or appends it when omitted or null.
GitOrigin-RevId: 5de481e13f524c03260b7fed5c74874f051d6f30
## What changed
Reuse connected thread tool inventories for paginated `ToolsAndAuthOnly` status requests when registrations, client settings, permissions, environments, and authentication match. Restrict reuse to connections with fixed credentials; discover remaining servers separately and preserve enterprise-managed servers' admitted thread connections.
Bind status configuration to the same environment and permission inputs used by the thread runtime, and limit authentication-failure inspection to the requested servers.
## Testing
Extend status tests to cover fixed-credential reuse, fresh discovery for stored OAuth authority, full resource discovery, and inventories for dormant threads without starting their runtime connections. Verify that paginated lightweight results keep same-named servers in different environments separate.
GitOrigin-RevId: eaca6365fb2a739eaad76eefdc62ec9f796b1024
Build `config/read` responses from the latest loaded configuration's layer
stack so requests with a relative `cwd`, such as `.`, succeed and reflect
external configuration edits. Reuse that configuration for feature overrides
and preserve precedence for layer read and decoding errors over full-config
validation errors.
Add a regression test that reads with `cwd: "."` before and after an external
model configuration edit and checks that both values are returned.
GitOrigin-RevId: 82eb835f2eac4e53414b01fc9286c2aac71babf2
## What changed
- Add `RequestCountry` for host-supplied country codes. Normalize two-letter ASCII codes to uppercase, omit the field by default, and serialize explicit unknown (`XX`) as `null` to prevent fallback to request provenance.
- Carry `request_country` through thread defaults and captured step settings into Codex backend HTTP and WebSocket requests. Allow live country updates without enabling `step_model_switching`, and preserve WebSocket continuation reuse when the country changes.
- Propagate the captured country to subagents, reviews, and compaction requests.
## Testing
Add coverage for country validation and serialization, thread and live-turn update lifetimes, prewarm settings capture, agent inheritance and reloads, compaction and reviews, WebSocket country changes, and HTTP fallback.
GitOrigin-RevId: 787cd1fa7ba5d465a4eb64a92f13c79e93d9bca7
## What changed
Add experimental `thread/realtime/list` reads independent of turn pagination or a live runtime. Support session, observation-time, and event-ID filters, with ordering by observation time or committed position.
Keep cursor pagination within a fixed snapshot and expose positions for catching up on events committed later. Return `unsupported`, `pending`, or `ready` coverage so clients can distinguish unavailable history from events awaiting indexing. Limit fork reads to the child's own realtime history.
## Testing
Add SQLite tests for snapshot stability, late-event catch-up, cursor validation, and coverage tracking. Extend app-server tests to cover filtering, exact event lookup, and fork isolation.
GitOrigin-RevId: 8158df53f10d948ede4911654aa8adbc7297b258
## What changed
- Record voice transcripts as `frame` items with a `voice_transcript` channel for eligible threads, while retaining legacy transcript support and the existing app-server live and mixed timeline representation.
- Assign first-observed timestamps that never move backward, retain them through completion, and restore the clock floor from history and compaction checkpoints.
- Flush realtime records before completion notifications, including file and initial directory durability barriers for local rollouts.
- Generate a distinct default session ID for each new call, use the call ID when attaching to an existing call, and derive opening record IDs from session IDs.
- Add protocol types for turn-input acceptance and session-end input receipts, excluding those receipts from live notifications and mixed timelines. Update generated schemas and SDK types.
## Testing
Add coverage for frame serialization and required voice payloads, clock rollback and checkpoint restoration, durability barrier failures and retries, per-call session IDs, and persisted transcript availability immediately after completion.
GitOrigin-RevId: 3f6632b517d563861aee085b723475b8945c391c
## Why
Clients reconciling saved thread IDs need to retrieve matching summaries within the current list filters, including threads beyond the first page of history.
## What changed
- Add `includedThreadIds` with up to 100 entries, applied before pagination alongside existing filters. Exclusions take precedence, and results retain the requested list sort.
- Treat omitted or null inclusions as unrestricted and an empty array as matching nothing. Reject invalid IDs and oversized arrays without truncating them.
- Use indexed metadata and primary-key lookups for local inclusion queries, without scanning rollouts for repairs. IDs absent from the index do not match.
- Update protocol schemas, generated bindings, and documentation, including guidance to verify server support before treating missing saved IDs as removals.
## Testing
Add coverage for saved IDs across project moves and archiving, pagination, exclusions, validation limits, and combinations with search, account, and relationship filters. Add a SQLite query-plan test for primary-key lookups across scopes.
GitOrigin-RevId: 90b02a12aee5716f872a9d5d6168d23cf86c6333
## What changed
- Add hidden app-server options `--plugin-mcp-launch-cwd` and `--mcp-launch-cwd` for host-supplied local stdio server launch directories without writing them to shared configuration.
- Apply these directories when both `mcp_shared_repl_cwd` and `mcp_connection_sharing` are enabled. For configured servers, require a matching executable and preserve any explicit working directory.
- Attach thread-specific sandbox state to direct MCP tool calls for servers advertising support, stripping caller-supplied sandbox and launcher metadata first.
## Testing
Add regression tests for launch-directory feature toggling and executable matching, and for direct MCP calls using each thread's sandbox working directory despite forged caller metadata.
GitOrigin-RevId: d7f78ea92163ec0ee9311f68ef17e87a6694b13b
## Why
Model lookups through the startup catalog can use the wrong provider's capabilities or instructions after a default provider switch or when a thread has its own catalog.
## What changed
- Resolve model metadata for sampling, prediction forks, and memory writes through the owning thread's catalog.
- Make the thread's models manager available to extensions before startup callbacks and use it for guardian sampler configuration.
- Import external sessions using the destination provider and originator's catalog, loading its offline cache only when no refreshed catalog is available.
## Testing
Add regression coverage for sampling after a default provider switch, parent-specific prediction fork capabilities, thread-scoped model lookups, and imported sessions retaining destination provider instructions and originator.
GitOrigin-RevId: c86081b9e55c5e2b42a7f082966485d7fb5139d4
## Why
A user-configured `model_providers.gcp.base_url` previously blocked GCP setup, requiring manual removal before configuring a project and location.
## What changed
Have `account/gcp/setup` clear the active user configuration’s `base_url` override after obtaining an access token, allowing the requested project and location to determine the Vertex AI endpoint. Continue rejecting configuration layers that would still supply an endpoint override or otherwise conflict with the request. Document this behavior.
## Testing
Update integration tests to cover clearing an existing override on success, preserving it when authentication fails, and rejecting a managed endpoint override.
GitOrigin-RevId: 26a725133d9069ad63dfb0bb06ddf3c5d1545cad
## What changed
Reject workspace routing to `gov.chatgpt.com` when the workspace backend is `NO_CONSTRAINT`, whether the backend comes from the required or effective base URL.
Return an invalid-request error from account reads with `reason: "governmentWorkspaceRequired"` and `action: "relogin"`, prompting users to sign in to a government workspace.
## Testing
Add routing tests covering required and effective government backend URLs, including hostname case and the default HTTPS port.
GitOrigin-RevId: a54b990d2b0dc716122124ee6924538aa06d30d2
## What changed
Add `modelProvider/default/set` with a `providerId` parameter to persist the default provider for new threads and model lists. Return `ConfigWriteResponse`, reject unconfigured providers, and respect managed requirements, read-only configuration, and CLI overrides.
Reload the model catalog on its next read when the default changes effectively. Resolve explicit `model/list` provider selections against the current catalog configuration so clients can continue listing models for a retained provider after switching defaults.
Update the protocol schemas, generated TypeScript and Python types, and app-server documentation.
## Testing
Add coverage for switching defaults and switching back, rejecting unknown providers without changing the catalog, retaining explicit provider selections, reporting CLI overrides, and rejecting writes blocked by configuration restrictions.
GitOrigin-RevId: 3615835f58045d33a21b3c57d47932d6d1e3fb12
## What changed
- Remove `Config::legacy_sandbox_policy` and `Permissions::legacy_sandbox_policy`.
- Update core and TUI tests to use permission profiles and filesystem/network policies directly, with explicit conversion where legacy wire formats are required.
- Report the active sandbox label in app-server resume override mismatch diagnostics.
GitOrigin-RevId: cbc5417944e23404523e69dc5516d66d6bfafefe
## What changed
- Make `TimeProvider::current_time` and `CodexThread::current_time` synchronous, with clock reads required to avoid yielding or calling back into the session.
- Remove the experimental `currentTime/read` app-server request and its client-backed clock and sleep polling implementation.
- Require a host-provided `TimeProvider` for external clocks. App-server thread startup now fails when `features.current_time_reminder.clock_source = "external"` has no provider.
## Testing
Add coverage for external provider selection and rejection of app-server thread startup without an external provider.
GitOrigin-RevId: 09479d6eb28453b343dee78b3673092e73ae5d73
## Why
Paginated MCP server status requests previously discovered all configured servers before selecting the response page, causing unnecessary connections to servers outside that page.
## What changed
Select and deduplicate server identities before discovery, then collect status only for servers on the requested page. Include thread runtime statuses when selecting pages and preserve separate entries for same-named servers in different environments. Empty pages skip discovery.
## Testing
Add coverage that counts MCP initialization requests across successive pages and an empty final page. Extend environment inventory coverage to verify that pagination preserves each registration's identity, authentication status, and tools.
GitOrigin-RevId: 0c9c9ca6c8016147eb9a12b53ffe533ac3334444
## Why
Relative attachment paths in queued submissions should refer to files in the thread's working directory, even when the app server runs from a different directory.
## What changed
Resolve relative `LocalImage` and `LocalAudio` paths against the loaded thread's current working directory or the stored working directory for an unloaded thread when adding or updating queued submissions. Preserve absolute paths and reject relative paths that cannot be resolved to an absolute path.
## Testing
Add a regression test for queue add and update with different images sharing the same filename in the thread and server working directories. Verify that the relative path selects the thread's image and that explicit absolute paths retain their meaning.
GitOrigin-RevId: 3c1a48693c031f1c650650a9b3a7059fb962ba5c
## What changed
Allow `thread/inject_items` to accept wrapped items with `retention: "default"` or `retention: "always"`, while preserving support for raw response items. Persist explicit policies separately from legacy client-authored metadata.
Carry explicitly retained items through local and remote compaction, context-window changes, and child-agent creation, subject to retention budgets. Preserve history order and keep retained tool exchanges together; require matching calls and outputs to be adjacent in the injection request and both marked `always`.
Update Quinn dependencies and record exceptions for additional Hickory DNSSEC advisories where DNSSEC is disabled.
## Testing
Update injection tests for explicit retention metadata and extend the compaction scenario to cover a retained tool exchange across repeated compaction and restart.
GitOrigin-RevId: 1195a4ed62dc162a62e58bc2ad733262fbabea27
## What changed
- Make `McpManager::runtime_config` accept `McpServerContributionContext` and honor its originator, selected environments, and disabled plugin IDs.
- Add `McpServerContributionContext::for_host` to carry thread initialization data, originator, and session source without live extension state or discovery.
- Pass explicit global contexts from threadless discovery and control paths.
## Testing
Extend the thread manager test to cover host-only contribution identity, originator headers, and server restrictions for disabled plugins and pending environments.
GitOrigin-RevId: 04ea2c8951187d9014867f0020223b6a7dd94d8d
## Why
An unset voice preference should use the call destination's default. Changed or cleared preferences should also take effect on the next V3 call, even when the thread retains an older setting.
## What changed
- Use `gpt-live-1.1-codex` as the default V3 realtime model.
- Preserve an unset voice until request serialization, defaulting V3 API calls to `marin` and ChatGPT calls to `cove`, while honoring explicit voice selections.
- Reload current voice settings when starting a new V3 call through the app server, including cleared preferences.
- Populate the TUI voice picker from the V3 catalog, add `marin` to that catalog, and remove voice-catalog lookups from call startup and preference saving.
## Testing
Add regression coverage for API and ChatGPT voice defaults, explicit overrides, changed and cleared settings, and TUI call requests and voice selection.
GitOrigin-RevId: d0dd4dcd4bcad9ab869d7bf524e7095a88ffcfaa
## Why
MCP servers registered under the same name in different environments need distinct inventory, routing, and status reporting.
## What changed
- Keep MCP inventory and runtime status keyed by registration scope so same-named servers remain separate.
- Add optional `environmentId` selectors for status lookup, tool calls, resource reads, and OAuth login. Omitting the selector preserves existing name-only routing.
- Carry environment identity through startup notifications, elicitation requests, and tool-call history, and display it in the TUI.
- Support `/mcp login <name> --environment <id>` and update generated protocol schemas and SDK types.
## Testing
Add integration coverage for two environments with identically named MCP servers, tools, and resource URIs. Verify separate inventory, explicit environment routing, legacy routing when the selector is omitted, and errors for unknown environments. Update protocol and TUI tests for environment identity.
GitOrigin-RevId: 074a3db10549438cb6aff33eb7bed10791adae4d
## What changed
- Update the workspace, Bazel toolchain and lockfile, CI and release workflows, and Windows setup script from Rust `1.95.0` to `1.99.1`.
- Adapt Rust code to the updated toolchain and Clippy lints, including `try_update` for atomics, `as_chunks` for fixed-size slices, and targeted allowances for generated tonic services.
- Refresh the halfwidth sound mark rendering snapshot to use literal characters in debug output.
GitOrigin-RevId: 5852029f687436dc814c2bca68141ee1f4a67d49
## What changed
Use `legacy_sandbox_policy_label` from the active permission profile to check sandbox overrides when resuming a loaded thread. Continue accepting `external-sandbox` for `danger-full-access` requests, and construct the legacy sandbox policy only when reporting a mismatch.
GitOrigin-RevId: 0f923323394692d2e1f39bafe637c70ce305dc3d
## Why
Allow collector credentials to refresh without rebuilding OpenTelemetry providers.
## What changed
Add `otel.headers_helper`, a command run from `CODEX_HOME` that returns a JSON object of header strings. Share its results across explicitly configured HTTP log, trace, and metric exporters. Refresh every 29 minutes by default, configurable through `otel.headers_helper_refresh_interval_ms`.
Helper headers override matching static headers. Failed refreshes block affected exports until the helper recovers, and HTTP redirects are disabled when helper headers are used. Repository-local configuration cannot set the helper; exporters set by admin requirements, gRPC exporters, and built-in analytics do not use it. Helper execution respects network policy.
## Testing
Add tests for shared execution, credential refresh and recovery, blocked exports after failure, network restrictions, and configuration validation. Collector tests cover header precedence across all three signals using JSON and binary HTTP encodings, including exclusion of an admin-managed exporter.
GitOrigin-RevId: 89018ac09c2c99523d3f92bf77048e7ed9dae5f2
## Why
A recovery turn can occupy the core turn slot before `TurnStarted` is published and thread statuses reflect it. During this window, `thread/resume` with configuration overrides could treat an unsubscribed thread as idle and shut it down, interrupting recovery.
## What changed
Require the core turn slot to be empty before replacing a loaded thread during resume. Expose `CodexThread::has_active_turn()` and reuse it in the residency unload check.
## Testing
Add a regression test that blocks paginated history writes to hold a recovery turn before status publication, reconnects with a configuration override, and verifies that the client receives completion for the preserved recovery turn.
GitOrigin-RevId: f295038c8502a9b2849ddc08614db4a3cb5610cf
## What changed
Add `biometricType` to `userVerification/verify` responses as context alongside the signed `proof`. Successful Touch ID protected signing reports `"fingerprint"`; an unknown method reports `null`. Responses from older servers that omit the field remain supported.
Carry the native method through the verification provider and app-server protocol, and update the experimental protocol exports and API documentation.
## Testing
Add coverage for responses without `biometricType` and for returning `"fingerprint"` separately from the proof. Update existing verification coverage to check the `null` case.
GitOrigin-RevId: c82e84a325a4d9ab1e5262e5100ffc1a043bd97e
## Why
MCP servers discovered on different executors can share a name. Resolving them by name alone exposes only one server and prevents tools and resources from being addressed independently.
## What changed
- Add the disabled-by-default `multi_environment_mcp` feature to expose environment-scoped servers, including multiple installations of the same plugin.
- Carry exact `McpServerKey` identities through catalogs, connections, tool calls, resources, and approval tracking. Give environment-scoped tools stable namespaces derived from their environment.
- Include `environment_id` in scoped resource listings and accept it in resource requests. Require it for environment-owned servers when multiple environments are selected.
- Preserve server ownership through hooks and use the owning environment's permissions for scoped elicitation review.
## Testing
Add coverage for same-named servers across environments, independent calls and approvals, resource selection, plugin discovery, and rejection of hook changes to the tool environment.
GitOrigin-RevId: 5593372b06a15c16aa3220faa3b19f5d3b20e67e
## Why
An immediate request after `start` could compete with the pending `initialized`
notification for channel capacity and fail with `WouldBlock`.
## What changed
Wait for an acknowledgment that `initialized` has been processed before returning
from `start`. Shut down the runtime if sending the notification or receiving its
acknowledgment fails. Ordinary notifications remain fire-and-forget.
## Testing
Require the first request after startup to succeed without retries with channel
capacities of zero (clamped to one) and one.
GitOrigin-RevId: 119a9a4375109f6b85aee0a9a4f8398a69269567
## What changed
Make “Yes, clear context and implement” save the approved plan as an app-server attachment and submit a short prompt referencing it. Add the experimental `thread/prepareApprovedPlan` request to verify that the fresh thread's executor can read the file and that its contents match the approved plan.
If the attachment cannot be written or read, inject the complete plan as `proposed_plan` tool output within the model's context and truncation limits. If the complete plan cannot fit, report an error and keep the current session. Clear the UI and switch threads only after plan preparation succeeds.
## Testing
Add TUI tests covering a large plan read from its attachment, complete fallback context when attachment writes or reads fail, and preservation of the original session when the fallback is too large. Snapshot the fresh thread's initial request.
GitOrigin-RevId: b717f30359256994c6efb3f4fe7f87aabe8936af
## What changed
Carry `ContextWindowId` through session metadata, compaction checkpoints, rollout recording, and thread creation instead of converting IDs to strings. Add deserialization and JSON schema support while preserving the serialized string format and legacy numeric compaction IDs.
Validate deserialized IDs as UUIDv7 values before restoring context windows, preserving the existing handling of unsupported IDs.
GitOrigin-RevId: fda329d0654f438171a955c9f75550817c32c047
## What changed
Add the disabled-by-default `daybreak_program_propagation` feature to capture a parent's saved Daybreak choice when spawning native helpers. Retain the choice and account identity for helper turns and nested spawns, while preserving explicit `cyber_access_program` overrides. A helper's own saved preference takes precedence on later turns.
Read pending metadata before persisted metadata so preferences survive thread materialization, with stored choices taking precedence. Share this resolution logic with `thread/read` and support refreshing the feature through user configuration.
## Testing
Add coverage for saved and pending preferences, unset choices, explicit overrides, failed metadata reads, nested spawns, parent unloading, feature withdrawal, and preference changes between helper turns.
GitOrigin-RevId: b3b349da8cb3d48154cddf058890587385efcda2
## What changed
Add experimental `environments` fields to `turn/settings/update` and `thread/settings/update`. Turn updates apply to later steps of the running turn; thread updates apply to future turns. Omission or `null` preserves the selection, while `[]` clears it. Providing `cwd` in a thread update without an environment list selects the defaults for that directory.
Include the ordered environment selection in `thread/settings/updated`. Wait for Core to accept thread settings updates before returning success, and return rejections as request errors.
## Testing
Add integration coverage for attaching, replacing, preserving, and clearing environments; rejected updates; and the distinction between later steps and future turns.
GitOrigin-RevId: bfebeda57c676be94427aeb0c567c0b94fd9c387
## Why
`thread/sample` previously required the source's latest turn to finish before it could be sampled.
## What changed
Add `allowInProgressTurn`, defaulting to `false`, to sample a snapshot of the latest turn while the source continues running. The requested turn must still be the latest, but source history changes during sampling no longer invalidate the result when this option is enabled.
For an in-progress snapshot, include a context note explaining that the source was not stopped and pending tool calls may appear as `aborted` in the copy. Suppress the copy's default interruption message.
## Testing
Add coverage for sampling running turns in legacy and paginated history modes, including pending tool calls and mid-turn compaction. Verify that the source continues independently and that finished-turn samples retain their existing context.
GitOrigin-RevId: 771b979bf677e4ff0686476bfaf21aff92f7e7ac
## Why
Title and content searches exclude attached threads, preventing clients from finding their saved conversations alongside ordinary threads.
## What changed
- Add `includeAttachedThreads` to `thread/list` and `thread/search`. For `thread/list`, require a non-empty `searchTerm` and preserve the usual provider and source filters.
- Expose `attachedToThreadId` on thread responses to identify the owning parent independently of fork and subagent lineage.
- Support inclusive searches through SQLite and filesystem fallback, repairing missing database entries with saved thread names during title searches.
## Testing
Add regression coverage for opt-in title and content searches, attached-parent metadata after restart, default search filters, filesystem searches without SQLite, and discovery and repair of unindexed title matches.
GitOrigin-RevId: ac12ec3c730ad7f1722bdf8e21600d17f12017f0
## Why
Reference-backed forks can lack a local opening user message, causing them to disappear from thread listings or lose their inherited preview when a new turn is written. Compaction can also remove the opening message from the model context used to prepare a fork.
## What changed
- Persist inherited previews and preserve them when recording new turns and merging thread-list metadata.
- Include reference-backed forks with inherited history in thread listings before their first local message.
- Recover opening previews from transcript history within the requested fork boundary when compaction omits them from model context.
- Use the shared `user_message_preview` helper when deriving previews from rollout items.
## Testing
Extend thread-fork integration tests to check previews in listings before and after a new turn, after reopening, and when forking at a boundary after compaction.
GitOrigin-RevId: 5962cf71ea7104f07c9013cc77259b105e4c60d7
## What changed
Return first-party provider models in catalog order while retaining priority-based default selection and existing filtering. Apply this ordering only to provider-origin catalogs for the OpenAI provider using Codex backend routes or `model_catalog_url`. Bundled, configured, and third-party catalogs retain priority ordering.
## Testing
Add coverage showing that catalog display order can differ from priority order while the recommended model remains the default. Update custom-provider coverage to verify priority ordering with a reversed catalog response.
GitOrigin-RevId: 9c2361e070ba424c092a282ca7f1cf9952d270b3
## What changed
Move `ThreadMetadataBuilder` into its own module, make its fields private, and replace direct field assignments with fluent `with_*` methods. Initialize `updated_at` and `recency_at` from the creation time and default the approval mode to `OnRequest`.
Update `apply_rollout_items` to accept a boxed `ThreadMetadata` seed, keeping callers' async frames small while preserving existing database fields except for the seed rollout path. Add `build_thread_metadata` to use the state runtime's configured provider, and use `thread_id_from_rollout_path` directly for the doctor's filename fallback.
GitOrigin-RevId: a27e4c6b22832e902922dbdd60d7f5c11b4a1a83
## Why
MCP requests need to retain inbound W3C trace context even when no OpenTelemetry tracing layer is installed.
## What changed
- Carry validated request trace context through app-server MCP tasks, connection startup, and resource listing tasks, while preferring active span context.
- Forward fallback `traceparent` and `tracestate` headers for MCP HTTP requests, including discovery and initialization.
- Use HTTP trace headers as a fallback for exec-server RPC calls when active span context is unavailable.
## Testing
Add an app-server integration test that disables trace exporting and verifies that `mcpServer/resource/read` forwards the inbound `traceparent` and `tracestate` to the MCP server.
GitOrigin-RevId: c886a55ce0a3992f1b2e04614efec80a20cb4b49
## What changed
- Track and log `McpRefreshReason` values for runtime refreshes, including invalidations received during thread startup and forced refreshes. Restore claimed reasons when a refresh is cancelled before publication, while preserving concurrent invalidations.
- Correlate installed-plugin metadata invalidations with downstream MCP refreshes using a shared change ID. Log changed field names by plugin ID, additions, removals, and reordering without logging field values.
- Record whether background installed-plugin bundle updates were requested by startup, plugin listing, or installation.
## Testing
Add coverage for metadata change attribution across membership changes and reordering, and for retaining refresh causes across cancellation and concurrent invalidation.
GitOrigin-RevId: 3d4485ccfcc1d8788eb9909a060ac200c467af13