Commit Graph

8138 Commits

Author SHA1 Message Date
jif
8b2c84ddcc Apply MCP startup timeouts during client creation (#32781)
## What changed

- Apply each server's `startup_timeout_sec` (or the default) while creating the
  MCP client, so the deadline also covers transport setup.
- Launch local stdio servers on a blocking task so synchronous command
  resolution and process creation do not prevent the deadline from firing.
- Recognize the new client-startup timeout error and show the existing
  `startup_timeout_sec` configuration hint.

## Testing

- Extend the timeout error display test to cover the client-startup timeout.

GitOrigin-RevId: 1967c62f943d55f6aa18792d4488e52c22f1e717
2026-07-13 12:00:50 +00:00
jif
4477b20713 Enable skill search shadow selection by default (#32780)
## What changed

Mark `skill_search` as stable and enable it by default so the app server runs
shadow skill selection and emits its experiment metrics.

GitOrigin-RevId: ea9da3b71bfb3be2093aac89ad3d3e388931901d
2026-07-13 11:46:25 +00:00
jif
2b0b37abb7 Align shadow skill selection with observable sources (#32768)
## Why

Shadow selection can observe invocations from host and orchestrator skills, but
including executor skills in its candidates can skew the resulting metrics.

## What changed

Limit eligible shadow-selection candidates to enabled, prompt-visible skills
from host or orchestrator sources.

## Testing

Extend the implicit-invocation test to add matching executor candidates and
verify that the host skill remains the selected invocation hit.

GitOrigin-RevId: fd444fe27254b5a880ef5c03c29b5e195127cd97
2026-07-13 11:05:31 +00:00
jif
c100109280 Add shadow metrics for lexical skill selection (#32761)
## What changed

- Add an opt-in `skill_search` feature that ranks prompt-visible skills against each turn's user input with a bounded weighted lexical selector.
- Keep the ranked selection out of model-visible context and record metrics for selection cost, catalog reduction, and whether later implicit or `skills.read` invocations matched the ranked candidates.
- Include host-provided skills in the experiment catalog without changing the rendered skill catalog.

## Testing

- Add selector unit tests covering ranking, limits, truncation, stop words, and deterministic tie-breaking.
- Add extension tests covering turn-local invocation recording and host-skill shadow selection.

GitOrigin-RevId: 4d00a1c805ea8b391d6c6ac6a8450afa88ca3e25
2026-07-13 10:38:37 +00:00
jif
92938d880e Restrict spawned-agent models to the active backend (#32751)
## Why

Model overrides for `spawn_agent` must be compatible with the multi-agent backend used by the current turn.

## What changed

- Carry each model's multi-agent backend metadata into `ModelPreset`.
- Filter the advertised `spawn_agent` model overrides for multi-agent v2 and reject overrides assigned to another backend.
- Limit error suggestions to picker-visible, backend-compatible models.

## Testing

Added coverage for hiding incompatible models from the tool description and rejecting them during spawn validation.

GitOrigin-RevId: 22c12aba67df46e9743a74f019b72a1b8b76b308
2026-07-13 09:52:27 +00:00
jif
ea15456284 Expose model overrides for multi-agent v2 spawns (#32749)
## What changed

- Add the `features.multi_agent_v2.expose_spawn_agent_model_overrides` setting, enabled by default, to expose `model` and `reasoning_effort` on the v2 `spawn_agent` tool.
- Keep these controls available when other spawn metadata is hidden, while allowing them to be disabled independently.
- Add root-agent and subagent guidance that overrides require a partial or context-free fork and should only be used when explicitly authorized.

## Testing

- Cover configuration parsing and defaults, usage-hint preservation, and tool-schema behavior with override exposure enabled and disabled.

GitOrigin-RevId: 92370498108c96fbd51f32965624ce531e991d9a
2026-07-13 09:48:33 +00:00
Dylan Hurd
ea0fd84d94 Align Guardian reviews with session configuration (#32747)
## What changed

- Include permission instructions in Guardian review requests and let the review model use its configured tool mode and standard tool plan instead of a Guardian-specific direct-tool override.
- Refine the Guardian policy for tenant policy precedence, authorization scoring, prompt-injection handling, read-only investigation, and post-denial user approval.
- Simplify low-risk allow responses to `{"outcome":"allow"}` regardless of authorization scoring.

## Testing

- Update Guardian request-layout snapshots to cover the permission instructions included in initial and follow-up reviews.

GitOrigin-RevId: eb83571ef61f7b4e854c12e13e7163c6fab43f00
2026-07-13 09:44:56 +00:00
Felipe Coury
769a5de257 Make advanced reasoning selection explicit in the TUI (#32746)
## Why

`Max` and `Ultra` consume usage limits faster than standard reasoning levels, so they should not be selected accidentally while navigating the normal effort scale.

## What changed

- Move `Max` and `Ultra` behind a `More reasoning…` entry with a dedicated warning and descriptions.
- Keep the reasoning shortcuts from silently increasing into advanced efforts.
- Apply `Ultra` to the active conversation without changing defaults for new threads, while preserving it across mode switches and thread resumes.
- Record applied thread settings in thread metadata, including explicit clearing of reasoning effort, so resumed threads restore their latest model settings unless the user supplied an override.

## Testing

- Add TUI coverage for the advanced picker, shortcuts, Plan mode, configuration defaults, and resumed conversations.
- Add app-server and thread-store coverage for persisting, clearing, and restoring model and reasoning settings.

GitOrigin-RevId: 6708c7c2e8d38f491bf63000ea34f83476afdfe6
2026-07-13 09:40:51 +00:00
rhan-oai
2a4942c081 Log missing personality messages at trace level (#32744)
## What changed

Emit the diagnostic for a requested personality without model-specific messages
at `trace` instead of `warn`. The existing fallback to `base_instructions` is
unchanged.

GitOrigin-RevId: f7a00d28b57d4a6513df5d43c9456ae9b16c738b
2026-07-13 09:36:31 +00:00
Matthew Zeng
2f7d89b141 Extract connector runtime snapshot management (#32698)
## What changed

- Move the Codex Apps tool cache into a reusable `codex-connectors` runtime manager keyed by account and workspace.
- Represent cached tools as atomically published snapshots with refresh timestamps while preserving the newest accepted fetch generation.
- Harden disk persistence with bounded reads, atomic file replacement, and serialized writes so an older fetch cannot overwrite newer state.

## Testing

Add coverage for identity isolation, snapshot timestamps, oversized cache files, atomic replacement, and concurrent persistence ordering.

GitOrigin-RevId: 5ea2234469daae3abf54b030244c3251de62ca5a
2026-07-13 05:02:52 +00:00
Charlie Marsh
c888e8e75a Improve composer completion target resolution (#32628)
## What changed

- Resolve `@` and `$` completion targets on either side of the cursor while treating atomic text elements and line breaks as boundaries.
- Prefer the nearest editable mention when file, skill, and plugin candidates compete, and avoid treating common uppercase environment variables as skill queries.
- Insert a separator before completions adjacent to atomic elements and keep dismissed popup state scoped to the matching editable token occurrence.

## Testing

- Add unit and snapshot coverage for adjacent and partially bound mentions, whitespace boundaries, shell variables, popup dismissal, and file, image, skill, and plugin insertion.

GitOrigin-RevId: 352a42c7bcdbf4f6cd35368ced25f71926fdbc1b
2026-07-12 19:18:37 +00:00
Felipe Coury
9e552e9d15 Use available width for skill names in the toggle view (#32485)
## Why

The skill toggle view truncated every display name to 21 characters, even when
the popup had enough room to show more. This could hide the part that
distinguishes similarly named skills.

## What changed

- Pass full skill display names to the shared row renderer so it can fit them
  to the available width alongside descriptions.
- Keep narrow layouts bounded by the renderer's width-aware truncation.

## Testing

Added coverage for preserving and filtering full display names, plus snapshots
for wide and narrow popup layouts.

GitOrigin-RevId: c434237e00440f920d8aa9c365b6bda5e68e0941
2026-07-11 21:03:12 +00:00
Felipe Coury
385c0a9351 Expand tabs when rendering TUI diffs (#32461)
## What changed

- Replace tab characters in rendered diff spans with four spaces while keeping
  their wrapping width and style intact.
- Ensure diff buffers never contain literal tab characters.

## Testing

- Cover tab expansion and wrapping in `wrap_styled_spans`.
- Update diff gallery snapshots at multiple terminal sizes.

GitOrigin-RevId: 2159e84991b844ea8c4c57dfad52bc3fe7a9059f
2026-07-11 17:47:17 +00:00
Eric Traut
bbdf3030de Emit thread-idle lifecycle after guardian interrupts (#32460)
## What changed

- Emit the thread-idle extension lifecycle when the guardian successfully aborts an active turn after repeated automatic review denials.
- Keep user-initiated interrupt behavior unchanged.
- Add a regression test that waits for the thread-idle callback after a guardian interrupt.

GitOrigin-RevId: 6622c35361a3da9126c11bd6ca49a532c1bd6e27
2026-07-11 17:13:16 +00:00
jif
54b8f112a3 Preserve parent sandbox enforcement for memory consolidation (#32441)
## What changed

- Pass the parent turn's effective permission profile to the memory consolidation agent, including thread-level permission and legacy sandbox overrides.
- Preserve disabled and externally enforced permission profiles instead of replacing them with a managed sandbox.
- Continue restricting consolidation to the memory root without network access when the parent uses Codex-managed permissions.

## Testing

- Add coverage for disabled, external, and managed parent permission profiles.

GitOrigin-RevId: 9ca3be0e41dc14d858053f6f70e33f4ae7c578e1
2026-07-11 15:20:49 +00:00
Owen Lin
5c19155cbd Add ordinals to paginated rollout records (#32332)
## Why

Paginated thread history needs durable ordering so consumers can process a rollout suffix without rebuilding all earlier history.

## What changed

- Add optional, zero-based ordinals to `RolloutLine` records in paginated rollouts while leaving legacy rollout serialization unchanged.
- Continue ordinals from the last valid record when appending or resuming, including after gaps or an incomplete tail, and reject overflow without appending.
- Add a stateless `project_rollout_line` helper that maps canonical turn lifecycle and completed-item records into thread-history change sets.

## Testing

- Cover ordinal assignment, legacy compatibility, resume and tail recovery, overflow handling, and thread-history projection for completed, failed, and interrupted turns.

GitOrigin-RevId: 3a9bb6cd2a1f674a9f154342e96e9aa3d8330781
2026-07-11 04:15:42 +00:00
Michael Bolin
f93c18ed0f Use canonical links in the moved config notice (#32326)
## What changed

Update the links in `codex-rs/config.md` to point directly to the configuration documentation on GitHub, including the MCP servers section.

GitOrigin-RevId: 8bf830b7062f83e44b5121dd11b1f1a20bb68e43
2026-07-11 03:27:51 +00:00
Eric Traut
203d530cc6 Stop falling back to older model availability announcements (#32316)
## What changed

Select the first model availability announcement in catalog order before
checking its display count. Once that announcement reaches its display limit,
show no announcement instead of falling back to a lower-priority model.

## Testing

- Update the model catalog test to verify that an exhausted higher-priority
  announcement does not expose an older announcement.

GitOrigin-RevId: 65f23b34e1ecb38934effd5305704d7ab2353492
2026-07-11 03:01:18 +00:00
pakrym-oai
c9d52de5ca Require prefixes for outbound response item IDs (#32312)
## What changed

- Add a `ResponseItemId` type that generates item-specific prefixes with UUIDv7 suffixes and use it across response items.
- Keep deserialization permissive for legacy histories, but omit empty or unprefixed item IDs from HTTP and WebSocket requests.
- Export the new type in the generated TypeScript protocol schema.

## Testing

- Cover prefixed ID generation, legacy deserialization, prefix recognition, and outbound request filtering.

GitOrigin-RevId: 0209fe430c826d0ae88bc4648652c4ebf390c4a4
2026-07-11 02:29:14 +00:00
Colin Young
08ba14b03d Improve file blob upload diagnostics (#32305)
## Why

Blob upload failures previously surfaced the full signed upload URL and offered limited information for diagnosing transport and service errors.

## What changed

- Add a unique `x-ms-client-request-id` to each blob upload.
- Report transport failures with the upload host, elapsed time, error category, and client request ID, while stripping the signed URL from the underlying error.
- Report unsuccessful responses with Azure request and error IDs, and emit structured warning events with upload metadata and available Azure and Cloudflare identifiers.

## Testing

- Verify successful uploads include the client request ID header.
- Verify response and transport errors expose diagnostic fields without leaking signed URL parameters or response bodies.

GitOrigin-RevId: 9ae2cb2a9aacec4df237b3ee79a6467a6b9107e7
2026-07-11 01:46:27 +00:00
Eric Traut
dfefd8aa8b Prefer the Codex home socket for Unix IDE context (#32302)
## What changed

- Look for the Unix IDE context socket at `CODEX_HOME/ipc/ipc.sock` first.
- Fall back to the existing per-user temp-directory socket paths, including both legacy paths for UID 0.
- Apply one request deadline across all connection attempts, and stop fallback after a timeout or a protocol error on a connected socket.

## Testing

- Added coverage for socket path selection, primary preference, legacy fallbacks, and timeout and protocol-error behavior.

GitOrigin-RevId: 560c827ad3d446a82ec503779995757096ac33e0
2026-07-11 01:15:48 +00:00
Abhinav
076a110eb8 Trust hooks from materialized workspace plugins (#32301)
## What changed

- Carry newly installed or updated remote plugin metadata through effective-plugin refresh callbacks, including coalesced refreshes.
- After a successful refresh, record the current hook hashes for listed workspace plugins associated with the active account while preserving existing hook settings and unrelated state.
- Serialize the background trust write with config mutations, and leave hooks untrusted if the write fails or the active account changes.

## Testing

- Cover eligible plugin selection and escaped hook config keys.
- Verify end-to-end trust for newly materialized plugin hooks, preservation of existing config, and fail-closed behavior when config cannot be written.

GitOrigin-RevId: 0b150766415be6fccc117f7856a241e10ad456f2
2026-07-11 01:11:37 +00:00
Felipe Coury
dffe1f02a3 Respect model support for reasoning summaries (#32290)
## What changed

- Add `supports_reasoning_summary_parameter` to model metadata, defaulting to
  `true` for backward compatibility.
- Omit `reasoning.summary` and its summary-delivery stream option when the
  selected model does not support the parameter.
- Apply the capability of the final selected model when a spawned agent uses a
  different model.

## Testing

- Cover unsupported models in regular requests and spawned-agent model
  overrides.

GitOrigin-RevId: 72b783799fc0685cef1501ef2dbf62d1308ceead
2026-07-10 23:39:21 +00:00
Owen Lin
bfe31598c7 Persist paginated items in the local thread store (#32289)
## What changed

- Allow the local thread store to create paginated threads while keeping them unsupported through the app-server API.
- Filter live append items using the history mode recorded with the thread's live recorder, so paginated threads persist canonical `ItemCompleted` events instead of legacy history events.

## Testing

- Add a local-store test that creates a paginated thread and verifies that a paginated item is persisted while a legacy user-message event is omitted.

GitOrigin-RevId: 83d93660afd5f0217213d4f21b5bf2a97745ff19
2026-07-10 23:26:58 +00:00
Celia Chen
610f09abcf Make GPT-5.6 Sol the default Bedrock model (#32288)
## What changed

- Prioritize the GPT-5.6 Sol, Terra, and Luna variants ahead of GPT-5.5 and GPT-5.4 in the static Amazon Bedrock catalog, making Sol the default.
- Use each GPT-5.6 variant's bundled description and default reasoning level while retaining Bedrock's `max` reasoning support.

## Testing

- Update model-provider and app-server tests to cover catalog ordering, variant metadata, and provider-aware fallback to GPT-5.6 Sol.

GitOrigin-RevId: 1761390254deae47b62c043b1ba707c384cde5e9
2026-07-10 23:22:56 +00:00
Eric Traut
b5314aea11 Clarify waiting behavior in safety buffering prompts (#32286)
## What changed

- Rename `Keep waiting` to `Dismiss and keep waiting`.
- Explain that no action is required, waiting continues, and the menu closes when the response is ready.
- Replace the generic confirmation hint with the new explanatory footer.

## Testing

- Update snapshots for safety-buffering prompts with and without the retry option.

GitOrigin-RevId: 2d336c59066e2689f291c5098ecc300921f39977
2026-07-10 23:16:09 +00:00
Owen Lin
c4318c386d Include terminal errors in turn completion events (#32280)
## What changed

- Add an optional `error` payload to `TurnCompleteEvent` and omit it when a turn completes without an error.
- Preserve the full terminal `ErrorEvent` through the turn lifecycle so the completion event includes the same error details emitted separately by `EventMsg::Error`.

## Testing

- Extend the stream-error integration test to verify that `TurnCompleteEvent` contains the emitted error and that the next turn can still proceed.

GitOrigin-RevId: 8d32942a44132763076130102d8b89ab356d59d0
2026-07-10 22:04:03 +00:00
rhan-oai
09ccae2c07 Honor personality = "none" in model instructions (#32277)
## Why

Model catalog instructions can include a baked-in `# Personality` section. An
explicit `none` setting should omit that section instead of sending it as part
of the model's base instructions.

## What changed

- Pass the configured personality into the models manager.
- When personality support is enabled and the setting is explicitly `none`,
  remove the `# Personality` section through the next level-one heading from
  catalog base instructions and instruction templates.
- Preserve explicit `base_instructions` overrides and avoid warning when no
  personality was requested.

## Testing

Added unit and integration coverage for section removal, heading boundaries,
CRLF input, preserved configurations, and explicit base instructions.

GitOrigin-RevId: 452c88d3ac6001c2ac7d4fef269cd75dc239fa61
2026-07-10 21:39:56 +00:00
Owen Lin
e7d0e14172 Repair unterminated rollout files before appending (#32276)
## Why

Appending directly to a non-empty rollout that lacks a trailing newline joins the
next JSON object to the existing record, producing invalid JSONL.

## What changed

- Ensure non-empty rollout files end with a newline before opening them for
  append, including resumed, compressed, and direct append paths.
- Perform the synchronous tail inspection outside the async runtime.

## Testing

- Add a regression test covering newline repair and repeated opens.

GitOrigin-RevId: a3ca84cc1fd3b811caa9f4c5c8761a4b5b791357
2026-07-10 21:31:00 +00:00
Dylan Hurd
c0ea3c4d0a Remove the personality migration (#32274)
## What changed

- Stop the TUI and app server from inspecting existing sessions at startup to
  set `personality = "pragmatic"` automatically.
- Remove the migration marker, helper APIs, and associated tests.

GitOrigin-RevId: 9e963bf113aff21651696bbc463f2749ac0f510a
2026-07-10 21:24:03 +00:00
Abhinav
431ad23be4 Expose scheduled tasks in plugin details (#32272)
## What changed

- Add optional `scheduledTasks` metadata to `plugin/read` responses for remote
  plugins, including hourly, daily, weekday, and weekly schedules.
- Preserve the distinction between unavailable metadata (`null`) and a catalog
  response containing no scheduled tasks (`[]`). Local plugin details return
  `null`.
- Export the corresponding Rust, JSON Schema, and TypeScript protocol types.

## Testing

- Cover scheduled-task deserialization and propagation through `plugin/read`.
- Verify missing and empty remote metadata remain distinct.

GitOrigin-RevId: 7af223ed0a1bf6d8f054293084a73f34c6d0332d
2026-07-10 21:13:38 +00:00
Owen Lin
bca577d69a Include start times in terminal turn events (#32263)
## What changed

- Add an optional `started_at` Unix timestamp to `TurnCompleteEvent` and
  `TurnAbortedEvent`.
- Populate the timestamp from turn timing state when a turn completes or is
  aborted.
- Preserve the timestamp when synthesizing interrupted fork history and when
  importing external sessions.

## Testing

- Verify that interrupting a turn emits a `TurnAbortedEvent` with a start
  timestamp.

GitOrigin-RevId: 75b3911b95c060e5fc1843a5e293d8fe47377186
2026-07-10 20:25:03 +00:00
Dylan Hurd
b66c25c6a3 Preserve local path conventions in automatic approvals (#32261)
## Why

Drive-shaped POSIX paths such as `/C:/workspace` can be mistaken for Windows
paths when an automatic approval request converts them from `PathUri`.

## What changed

- Keep approval paths as `PathUri` values together with their environment ID
  until the automatic review request is built.
- Recover host-native paths for local working directories when strict
  conversion cannot determine the path convention.
- Continue rejecting incompatible paths from remote environments.

## Testing

Add coverage for drive-shaped local POSIX paths, foreign remote paths, and
preserving apply-patch path URIs while building approval actions.

GitOrigin-RevId: 3fd31cfb4e8b46f9968ff66d5e986ca777430185
2026-07-10 20:18:51 +00:00
Tom
9993fb838a Improve Responses WebSocket timing telemetry (#32256)
## What changed

- Emit `responsesapi.websocket_timing` payloads as opt-in trace events with request context, while excluding them from diagnostic uploads and persisted logs by default.
- Preserve fractional-millisecond TBT values in telemetry histograms and runtime summaries, rounding only when formatting the TUI label.

## Testing

- Cover timing-log filtering, fractional TBT collection and display, and existing whole-millisecond duration behavior.

GitOrigin-RevId: 5f0a1c60c237abed17cc8b2d569ca77fbbc6ec41
2026-07-10 20:01:47 +00:00
Owen Lin
a328f30172 Extract reverse JSONL scanning from session indexing (#32246)
## What changed

- Add a generic `ReverseJsonlScanner` that reads seekable JSONL data from the
  end in bounded chunks, skips blank records, and reports malformed records
  without stopping the scan.
- Use the scanner for reverse session-index lookups while preserving the
  existing behavior of ignoring invalid entries.

## Testing

- Add coverage for unterminated final records, malformed JSON, blank lines,
  chunk boundaries, and records spanning multiple chunks.
- Verify session-index lookup can skip an invalid record and still find valid
  entries on either side of it.

GitOrigin-RevId: 66255f48492f74726d4ac4831cdc82f748de17d6
2026-07-10 19:18:39 +00:00
Owen Lin
414217dc8a Add dedicated storage for paginated thread history (#32234)
## Why

Paginated thread history needs its own SQLite database to avoid adding lock
contention to the main state store.

## What changed

- Add the `thread_history_1.sqlite` path and migration scaffolding.
- Create tables and pagination indexes for projected turns and items, plus a
  per-thread projection checkpoint.
- Register the database with runtime diagnostics, Bazel inputs, and database
  telemetry.

GitOrigin-RevId: d194310835f1df2a2a29c7827d77ca37eabbd0a3
2026-07-10 18:27:19 +00:00
Dylan Hurd
2da1b12822 Let permission hooks resolve strict auto-review requests (#32232)
## What changed

- Run permission-request hooks before routing approvals to the automated reviewer or user, including when `strict_auto_review` is enabled.
- Centralize approval resolution so hook, automated-reviewer, and user decisions share rejection handling and report the correct telemetry source.

## Testing

- Add an integration test showing that an allow hook can approve a shell command during strict auto-review without invoking the automated reviewer.

GitOrigin-RevId: 18e9d76baee6cbae9d35ae517250f2f82270a9d2
2026-07-10 18:12:27 +00:00
pakrym-oai
4472698728 Support pending remote environment registration (#32231)
## Why

Remote environment provisioning can finish after a thread starts, before an
exec-server WebSocket URL is available.

## What changed

- Add `EnvironmentManager::register_pending_environment` and a one-shot
  `PendingEnvironmentRegistration` handle that resolves to either a validated
  WebSocket URL or a terminal provisioning error.
- Let lazy remote exec-server clients wait for that result, while preserving
  reconnection behavior after a successful registration.
- Keep replacement registrations isolated so completing an older handle does
  not resolve the current environment with the same ID.

## Testing

Add coverage for successful connection and reconnection, provisioning and
dropped-registration failures, invalid URLs, replacement isolation, and the
deferred-executor startup flow.

GitOrigin-RevId: 5c05be2b72291b77a1f71176d7075b1ad63332a5
2026-07-10 18:08:35 +00:00
stevenlee-oai
6962a2ecae Serialize MCP OAuth credential refreshes (#32229)
## Why

Concurrent Codex processes can otherwise refresh the same rotating token, and a
cancelled or partially persisted refresh can leave durable and in-memory MCP
credentials out of sync.

## What changed

- Serialize each credential's read-refresh-write transaction across processes,
  reread the authoritative store after locking, and adopt credentials refreshed
  by another process.
- Keep refresh persistence running after caller cancellation, bound lock and
  provider waits independently, and preserve omitted refresh tokens and scopes.
- Fail MCP startup and operations when refresh or persistence fails instead of
  continuing with stale credentials, while requiring reauthorization for
  missing, unusable, or rejected refresh tokens.
- Exclude OAuth refresh time from the MCP initialization timeout.

## Testing

Add coverage for lock contention, concurrent refreshes, rejected and missing
credentials, storage failures, caller cancellation, and provider timeouts.

GitOrigin-RevId: 4d29b879bec646d2ceb922b526dc793b1a1f5423
2026-07-10 17:59:41 +00:00
pakrym-oai
c8dc8e5fd5 Propagate workspace roots to exec-server sandboxes (#32214)
## What changed

- Pass configured workspace roots from core to the exec server so filesystem and process sandbox permissions are materialized against the intended roots.
- Preserve an explicitly empty workspace-root list instead of treating the sandbox working directory as an implicit root.
- Initialize filesystem sandbox contexts with their working directory as the default workspace root.

## Testing

- Add end-to-end coverage for patch and command writes inside and outside workspace roots.
- Verify remote filesystem and process sandboxes do not grant access through an empty workspace-root list.

GitOrigin-RevId: 6684c8f7de50970b45a29e2a6323df954c96f9f6
2026-07-10 16:55:01 +00:00
Owen Lin
6463ede7db Generate unique IDs for review rollout messages (#32213)
## What changed

Assign a fresh UUIDv7 to each synthesized user and assistant message recorded
when exiting review mode, instead of reusing fixed IDs across review runs.

GitOrigin-RevId: 8524176895e2d8c750760554f515f397728a8554
2026-07-10 16:51:23 +00:00
pakrym-oai
d2d00b6632 Always send reasoning parameters in Responses requests (#32206)
## What changed

- Build a reasoning payload for every Responses request and always include `reasoning.encrypted_content`.
- Remove `supports_reasoning_summaries` from model metadata and retire the `model_supports_reasoning_summaries` configuration override.
- Use configured or model-default reasoning effort without a capability gate, including for guardian reviews and tracing.

GitOrigin-RevId: 2c9f194a5d2d4d688a2235299e6358f82ab8e1ea
2026-07-10 16:11:58 +00:00
jif
2b9c050460 Add a skill invocation extension contributor (#32200)
## What changed

- Add `SkillInvocationContributor` and registration support to the extension API.
- Provide invocation callbacks with session-, thread-, and turn-scoped extension data, the turn ID, skill resource, and explicit or implicit invocation kind.
- Notify registered contributors when Codex observes a deduplicated implicit skill invocation.

## Testing

- Extend the extension registry round-trip test to cover skill invocation contributors.

GitOrigin-RevId: f428336728889d9bf4fba41a7dd8d3a6f9b9728c
2026-07-10 15:52:04 +00:00
jif
601b61a83f Rebind memory consolidation workspace roots (#32197)
## Why

The memory consolidation agent changes its working directory to the memory
root, but applying its sandbox policy directly to the permissions object can
leave workspace roots inherited from the parent configuration.

## What changed

Apply the consolidation sandbox policy through `Config` so its workspace roots
are synchronized with the memory root. Add a test covering the working
directory, workspace roots, and effective legacy sandbox policy.

GitOrigin-RevId: dc6e75aef1ffa84a2f66fec6ed3a6fedcf9aa672
2026-07-10 15:44:56 +00:00
jif
52c9605dc7 Validate memory consolidation artifacts before succeeding (#32193)
## Why

A completed Phase 2 agent run does not guarantee that its required outputs were
created correctly. Treating a clean workspace as success can also preserve a
state where those outputs are missing.

## What changed

- Require `MEMORY.md` to be a file and `memory_summary.md` to start with `v1`
  before marking consolidation successful.
- Fail completed runs with invalid artifacts without resetting the workspace
  baseline, allowing the job to be retried.
- Run consolidation for a clean workspace when its required artifacts are
  invalid instead of taking the no-change success path.

## Testing

Added coverage for rejecting an invalid summary and retrying a clean workspace
whose consolidation artifacts are missing.

GitOrigin-RevId: ac57b2ba9d062c5203ca51afd716795a91814bb3
2026-07-10 15:40:35 +00:00
jif
6138909d6e Keep unified exec output collection bounded (#32150)
## Why

Unified exec can drain process output multiple times while waiting for a command. Collecting those drains into an uncapped buffer allows large commands to exceed the output collection limit.

## What changed

- Accumulate drained output through the capped head/tail buffer so collection remains bounded while preserving the beginning and end of the stream.
- Include a `... N bytes omitted ...` marker when the collection cap drops output.
- Calculate the original token estimate from all observed bytes and preserve omission metadata through truncation and sandbox-denial responses.

## Testing

- Cover repeated drains, previously omitted output, omission markers, and large-output summaries.

GitOrigin-RevId: c6e2efeb875ed8f35914365eab7431f25fd3484c
2026-07-10 12:22:04 +00:00
jif
54c44b9ed4 Propagate tracing subscribers to exec start tasks (#32135)
## Why

The process-start background task can move to a Tokio worker thread, where the
caller's thread-local tracing subscriber is otherwise unavailable. This can
break propagation of the caller's trace context to the exec-server request.

## What changed

- Attach both the current span and current tracing subscriber to spawned
  process-start tasks.
- Run exec-server Bazel unit tests serially because their tracing setup uses
  process-global state.

## Testing

Run the trace-context regression test on a multi-thread Tokio runtime so it
exercises propagation across the background task.

GitOrigin-RevId: a586eefd6983916d670fc5a90f0decd0468d273b
2026-07-10 11:00:12 +00:00
jif
707bd3cc18 Test stdio JSON-RPC size limits with LF and CRLF (#32134)
## What changed

Update the exact-size-limit stdio connection test to exercise both `\n` and
`\r\n` line endings, sizing the duplex buffer for each delimiter.

GitOrigin-RevId: 949e28bef3f1a34d379f3623f6aa7d99c0ecea80
2026-07-10 10:52:13 +00:00
jif
0d1733b5e9 Test bounded concurrency in ancestor discovery (#32126)
## What changed

Add regression coverage that verifies ancestor metadata searches:

- keep at most 256 project-root marker or repository skill-root probes in flight;
- start the next probe as capacity becomes available; and
- preserve `AGENTS.md` and repository skill-root discovery order.

GitOrigin-RevId: e7ac90bbeb94573d01e67705001af85ce59165b6
2026-07-10 10:29:30 +00:00
jif
c4c21b68a8 Bound exec-server stdio JSON-RPC messages (#32123)
## Why

Newline-delimited stdio input could buffer an unterminated JSON-RPC message without a per-message limit. Apply the same 64 MiB ceiling used by the other exec-server transports.

## What changed

- Read stdio messages with bounded lookahead and disconnect when a message exceeds the limit.
- Preserve LF and CRLF framing, including messages whose payload is exactly at the limit.

## Testing

Added tests for accepting a limit-sized CRLF message and rejecting an unterminated overlong message.

GitOrigin-RevId: 73eaf883324a7777960725037cc5b9c34720084f
2026-07-10 10:21:26 +00:00