Commit Graph

9897 Commits

Author SHA1 Message Date
rka-oai
e56e4922eb Support standalone tool outputs in turn/start (#41002)
## What changed

- Add an optional `toolOutput` to `turn/start` for starting or steering a turn with a named function-call output instead of user input.
- Emit standalone outputs as `functionCallOutput` thread items, persist them in durable history, and include them in resumed threads.
- Validate that tool outputs have a name, are not combined with nonempty `input`, satisfy the text-size limit, and use supported image URLs.

## Testing

- Cover standalone tool-output notifications, model input, and resumed history in both legacy and paginated history modes.
- Cover the text-size limit for structured tool output.

GitOrigin-RevId: a1eeec7b9b7de67b1a1c5e829a54552b85ec118b
2026-08-26 23:58:10 +00:00
iceweasel-oai
2926014075 Make filesystem policy matching URI-native (#41001)
## Why

Filesystem policies can describe paths using a convention that differs from the
host running Codex. Native path comparisons can therefore mis-handle cases such
as case-variant Windows paths or ambiguous encoded components.

## What changed

- Resolve policy entries and special roots as `PathUri` values using the
  executor's path convention.
- Use validated URI components for containment, overlap, and precedence, and
  fail closed when component boundaries are ambiguous.
- Restrict relative joins to descendants and apply the same matching rules to
  protected metadata paths and permission-profile intersections.

## Testing

Added coverage for Windows case variants, encoded and opaque paths, repeated
separators, descendant joins, special roots, metadata protection, and preserved
deny entries.

GitOrigin-RevId: fb09d44d11df25faaac806fe00457e6f6b0d8596
2026-08-26 23:49:05 +00:00
andrewgu-oai
f3741880f6 Harden managed proxy listener handoff (#40999)
## Why

Linux managed networking routed proxy connections through filesystem-backed Unix sockets, requiring an extra readable sandbox path and stale socket cleanup.

## What changed

- Transfer loopback TCP listeners from the sandbox namespace to host bridge processes over anonymous Unix socket pairs.
- Validate transferred descriptors, keep bootstrap channels private to each sandbox launch, and close them before running untrusted commands.
- Tie proxy bridge lifetime to the sandbox so cancellation closes active upstream connections.

## Testing

- Cover descriptor validation and interrupted handoffs.
- Verify concurrent sandboxes keep proxy endpoints isolated and do not inherit privileged sockets.
- Exercise managed networking end to end through `app-server`, confirming proxied access succeeds while direct host access remains blocked.

GitOrigin-RevId: 6561e09c83b927c604951bf2aa00ff532d179da5
2026-08-26 23:41:18 +00:00
pakrym-oai
528fd7ace5 Enable retained-image budgeting by default (#40994)
## What changed

- Promote `compaction_image_budget` to stable and enable it by default.
- Charge retained images against the remote compaction context budget unless the feature is explicitly disabled, trimming older images as needed.

## Testing

- Update remote compaction coverage for the default, explicitly enabled, and explicitly disabled behavior.

GitOrigin-RevId: 0f715347cefc33b814bdcfd9b430ef453d3bd6df
2026-08-26 23:05:08 +00:00
Krish Chainani
0340e12f5d Allow bundled browser plugins to run executor cleanup hooks (#40993)
## Why

Executor plugin manifests are unsigned, so cleanup hooks must remain limited to
explicitly trusted plugin identities and MCP targets.

## What changed

- Allow the bundled Browser, Chrome, Chrome Dev, and Chrome Internal plugins to
  run the existing `Stop` hook for `node_repl.turn_ended`.
- Continue allowing the bundled Computer Use plugin and rejecting unlisted or
  lookalike marketplace identities.

## Testing

- Extend manifest-filtering coverage for unlisted bundled plugins and marketplace
  name variants.

GitOrigin-RevId: 1ad5d679a1530994df5a9628c2117ce509fec9ad
2026-08-26 22:58:54 +00:00
soyeon-oai
a98b94625e Add trusted access context for MCP metadata (#40992)
## What changed

- Add `TrustedAccessContext` to fetch account-bound cyber verified-access grants and attach them as host-owned `openai/entitlementContext` metadata.
- Replace caller-supplied entitlement metadata and return an `unknown` status when authentication, identity consistency, response validation, size limits, or the lookup deadline cannot be verified.
- Add `HttpResponseBodyStream::from_chunks` for lightweight in-memory streaming clients.

## Testing

- Cover grant mapping, unsupported authentication, account and workspace changes, malformed or oversized responses, duplicate programs, and lookup timeouts.

GitOrigin-RevId: 343b6a6608c98c45a34939ef507c2183516a11c1
2026-08-26 22:54:10 +00:00
rka-oai
b9c4b9a0cf Support standalone function outputs in turn routing (#40991)
## What changed

- Allow `start_or_steer_turn` to accept named `function_call_output` items without a `call_id`, starting a turn when idle or steering the active turn.
- Preserve standalone outputs as pending input, assign response item IDs, and record them in conversation history without treating them as user prompts.

## Testing

- Cover starting a turn with a standalone output and steering an active turn with one.
- Verify passive response items do not signal pending steering activity.

GitOrigin-RevId: e32b292106b3c5a5f03577b8ebf67d2d7dee4e5d
2026-08-26 22:48:37 +00:00
Sean Huang
6e008417bb Expose permission profile resolution in the core API (#40989)
GitOrigin-RevId: 80229fcfd3a91715c361b1ba57d1c63eb0728529
2026-08-26 22:42:35 +00:00
Brandon Zhang
0d654e6536 Track window and fork positions in turn metadata (#40987)
## What changed

- Add the zero-based `window_number` to Responses turn metadata and include it in prewarm requests.
- Persist `forked_from_ordinal_exclusive` separately from the physical history base so fork lineage remains accurate after reverts and cold resumes.
- Report context-inheriting subagents through `parent_thread_id` without also emitting fork lineage.
- Reserve the new metadata keys while accepting and filtering previously valid configured values so Codex-owned values take precedence.

## Testing

- Cover window numbering across compaction, resume, and fork operations.
- Cover fork cutoff persistence across direct forks, legacy rollouts, reverts into inherited history, and cold resumes.

GitOrigin-RevId: 288f6cd632254814c1f166668b33828082d799a1
2026-08-26 22:37:59 +00:00
jif
102ae5e2e6 Prewarm Guardian WebSockets without blocking thread startup (#40985)
## Why

Opening Guardian's initial WebSocket connections can be delayed, but thread startup and resume do not need to wait for those connections.

## What changed

- Install the Guardian sampler and related thread state before opening its initial connections.
- Prewarm the sampler's WebSocket pool in a background task while retaining the existing on-demand connection behavior.

## Testing

- Verify extension startup returns before a delayed WebSocket handshake completes, then warms the full initial connection pool.
- Verify resuming a thread likewise returns before Guardian's delayed handshake completes.

GitOrigin-RevId: 58c91cf045b223f917c67d7e8dc82eac529db4ce
2026-08-26 22:10:47 +00:00
iceweasel-oai
37a5149822 Record Windows world-writable scan telemetry (#40983)
## What changed

- Return the number of directories flagged by successful Windows sandbox world-writable scans.
- Record that count in the `codex.windows_sandbox.world_writable_scan_flagged_directories` histogram for startup and warning-triggered scans.
- Tag each measurement with a `success` or `error` result, using a count of zero when the scan fails.

GitOrigin-RevId: 076160f36b1d62fa737f4b2d0318774e6c44a4b1
2026-08-26 21:52:56 +00:00
felixxia-oai
d61ba72f2f Give Guardian trusted context for configured MCP tools (#40982)
## What changed

- Add a bounded developer context fragment identifying the MCP server or connector and the user-owned configuration that declared it.
- Emit the fragment only when the effective entry matches the user configuration or an active plugin declaration resolves inside the Codex home directory.
- Keep tool descriptions, outputs, and unrelated tools untrusted, and reject unsupported sources or paths that escape through symlinks.

## Testing

- Cover user-configured servers and connectors, plugin-provided capabilities, token truncation, symlink escapes, and app-server request integration.

GitOrigin-RevId: 0bfe2a2f3a48334d1d5faad692b5d36452febb68
2026-08-26 21:48:05 +00:00
rhan-oai
07d260c623 Update the stable exec-server test to Codex 0.150.0 (#40979)
## What changed

Point the stable exec-server compatibility test at the pinned Codex 0.150.0
Linux x86_64 release and update the release archive checksum.

GitOrigin-RevId: 6178a1170faffe3dc70c9cfbfcbe3439b201096f
2026-08-26 21:44:10 +00:00
Dylan Hurd
a57b398351 Require approval for input to escalated terminals (#40978)
## What changed

- Add the `write_stdin_approval` feature flag, disabled by default, to require a fresh approval before sending non-empty input to an escalated unified-exec terminal.
- Route these reviews through hooks, Guardian, app-server, and the TUI as `writeStdin` approvals while keeping the parent command item unchanged.
- Preserve the terminal environment, launch directory, and escalation state across turns, and revalidate the process identity after approval before writing input.

## Testing

- Cover approval routing, policy decisions, process reuse, terminal identity preservation, app-server events, analytics, and TUI rendering.

GitOrigin-RevId: 4ba29eaae6208e934737ba078c96e589c7c2164d
2026-08-26 21:39:05 +00:00
felixxia-oai
21ff2e802c Expose MCP provenance to tool lifecycle extensions (#40976)
## What changed

- Add optional `McpToolContext` metadata to `ToolStartInput`, exposing the
  model-visible MCP tool details and its source classification without exposing
  the executable client.
- Classify MCP calls as connectors, configured servers, plugin servers,
  executor-selected plugins, or other registrations based on the prepared call.
- Prepare each MCP call before notifying tool lifecycle contributors and reuse
  that same call for execution so the callback describes the call that runs.

## Testing

- Cover host-owned connector calls and extension-owned Apps server calls,
  including their distinct provenance and executed tool names.

GitOrigin-RevId: efd23f511b1045ffdd96349d621ad62365569b2b
2026-08-26 21:30:23 +00:00
jif
daa3eaf10f Allow Guardian scoring for required computer-use models (#40967)
## Why

Models that require automatic review previously skipped Guardian v2 risk scoring
entirely, even when Guardian was limited to computer-use tools. That scope cannot
use a low-risk result to approve unrelated tools, so the blanket skip is
unnecessary.

## What changed

- Retain Guardian v2 risk scoring for required-review models in
  `ComputerUseOnly` scope while continuing to skip it in standard scope.
- Preserve strict automatic approval review for Node REPL-backed tools, including
  when classification fails.

## Testing

Added coverage for low-risk, high-risk, and invalid classifications across the
Node REPL and computer-use REPL paths, plus an unrelated MCP tool.

GitOrigin-RevId: ee38fabf82e196df0ae13b4216b5892be9b799cf
2026-08-26 20:07:39 +00:00
Channing Conger
ac644ed112 Stop preserving bounds in tool input schemas (#40966)
## What changed

Remove `minimum`, `maximum`, and `maxLength` from the supported tool input
schema representation. Schema parsing now drops these bounds instead of
including them in generated tool declarations, including declarations for
reserved history and notes tools.

GitOrigin-RevId: b7c7733651e65d38cc3d0cef2efa127ab3f8a32f
2026-08-26 19:59:08 +00:00
Won Park
f74bcd2811 Build Guardian V2 synchronous review prompts (#40964)
## What changed

- Add a synchronous reviewer prompt builder that combines root authorization,
  trusted user answers, bounded conversation history, parent environment and
  permission context, retained REPL evidence, and the proposed action.
- Select text or image REPL evidence from Guardian feature and transcript
  settings while respecting the reviewer model's supported modalities and
  shared image limits.
- Render network access requests with trigger-specific guidance and bound
  approval reasons and nested action strings before including them.

## Testing

- Add a prompt test covering root authorization, untrusted transcript framing,
  retry reasons, denied-read restrictions, and action serialization.

GitOrigin-RevId: d1cf886c2e30f7abbf94cce977cef14439ef3f2e
2026-08-26 19:53:32 +00:00
pakrym-oai
e77773085c Give Responses Lite prefix items stable IDs (#40962)
## Why

Responses Lite rebuilds its tools and base-instruction prefix for each request. Stable item identities let follow-up WebSocket requests recognize that unchanged prefix and send only incremental input.

## What changed

- Derive deterministic IDs for additional-tools and base-instruction items from the thread ID and each item's serialized payload.
- Preserve IDs when rebuilding an unchanged request or resuming a session, while changing them when the thread or payload changes.

## Testing

- Cover ID stability and payload/thread sensitivity in request construction.
- Verify resumed Responses Lite sessions reuse prefix IDs and WebSocket follow-ups use `previous_response_id` with only new input items.

GitOrigin-RevId: 3c8548b96979d7578865b0ccc51c147926823478
2026-08-26 19:44:12 +00:00
dank-openai
7f82397363 Restrict macOS scratch access to process sandboxes (#40961)
## Why

Filesystem helpers should not inherit access to system scratch directories beyond the paths granted by their filesystem policy, while ordinary processes still need scratch access for compatibility.

## What changed

- Move the `/tmp` and `/var/tmp` read/write grants, including their `/private` aliases, from the shared platform defaults into the process-only Seatbelt defaults.
- Keep process access to `/Applications` alongside the scratch-directory grants.

## Testing

Add a macOS Seatbelt test that verifies the generated policies and, when nested Seatbelt execution is available, confirms process scratch access, helper denial, and helper access to an approved project path.

GitOrigin-RevId: 26d83f09c131c1f1d000163b2f8929f601749719
2026-08-26 19:38:42 +00:00
Benjamin Carlsson
d47e5cc0e2 Add Vim buffer jump motions (#40958)
## What changed

- Add `gg` and `G` motions to jump to the first and last buffer lines.
- Support the motions with delete, change, and yank operators, including dot-repeat for edits.
- Expose normal-mode and operator-motion bindings in the configurable keymap while preserving conflicting user bindings.

## Testing

- Cover buffer jumps, operator combinations, repeat behavior, chord routing, and custom remapping.

GitOrigin-RevId: 24a9178cf7964053aaf9a8cd268c5434dda0778e
2026-08-26 19:31:52 +00:00
willwang-openai
6ac012a0d4 Honor layered configuration when loading plugins (#40954)
## What changed

- Resolve plugin activation, MCP server policy, and marketplace definitions from the effective configuration stack, including system settings and trusted project overrides.
- Load plugin skills independently for each working directory passed to `skills/list`.
- Exclude project configuration from catalog requests whose `cwds` are omitted or empty.
- Cache up to eight loaded plugin configurations with least-recently-used eviction so requests for different working directories can reuse their results.

## Testing

- Cover layered plugin and MCP policy across trusted and untrusted projects.
- Cover per-directory skill and plugin catalog results, cache reuse and eviction, and system-defined marketplaces.

GitOrigin-RevId: cb68b2b1bdab1da48e05ca7562bc05014431fc71
2026-08-26 19:02:02 +00:00
Francis Chalissery
7276d67081 Expose resumable misalignment details through app server (#40952)
## Why

App-server clients need the explanation and steering instruction returned with a
misalignment policy violation to offer a user-confirmed continuation. Missing or
incomplete details must continue to behave as a terminal block.

## What changed

- Parse optional misalignment classification, explanation, and steering details
  from streamed and HTTP Responses errors and propagate them through core errors.
- Include the details in live app-server `error` and `turn/completed` payloads and
  export the corresponding protocol schemas and TypeScript types.
- Keep explanations and steering messages out of serialized rollout events and
  redact them from debug output.
- Document how clients can resume with `turn/start` after user confirmation.

## Testing

- Cover streamed, HTTP, and WebSocket-wrapped errors, including malformed and
  classification-only details.
- Verify live app-server notifications expose resumable details without writing
  the explanation or steering message to the rollout.

GitOrigin-RevId: 329258a444c2cd91d0c57ab1720830b33ddcfac5
2026-08-26 18:42:44 +00:00
rka-oai
0e9a2bae52 Enable clock tools for persistent reasoning turns (#40942)
## What changed

- Default the current-time reminder and interruptible `clock.sleep` tool on for
  turns using persistent reasoning effort.
- Preserve explicit `features.current_time_reminder` settings and managed
  requirements, and gate reminder recording on the resolved feature state.

## Testing

- Cover configured, persistent, ordinary-effort, explicitly disabled, and
  managed-disabled clock setups.
- Verify review turns do not expose clock tools or current-time reminders.

GitOrigin-RevId: 4ff8805807ceeef374abd962b1d9e7c37f1fbd83
2026-08-26 18:06:12 +00:00
Steve Coffey
e0c727de04 Classify streaming rate-limit errors (#40931)
## What changed

- Classify `response.failed` events with the `rate_limit_exceeded` code as a distinct retryable error while preserving any parsed retry delay.
- Expose the error as `rateLimitExceeded` through the core protocol and app-server schemas after stream retries are exhausted.
- Preserve the upstream message for TUI display while keeping it out of telemetry summaries.

## Testing

- Cover SSE classification, retry metadata, protocol conversion and serialization, exhausted stream retries, telemetry redaction, and TUI rendering.

GitOrigin-RevId: 02dab4d3477dcd7653a58c49c4bd38687a616579
2026-08-26 17:45:42 +00:00
sayan-oai
7625bd5665 Honor environment-resolved workspace roots (#40912)
## What changed

- Add effective workspace roots to `EnvironmentConfig` and use them when
  materializing permission profiles and filesystem context.
- Preserve selection roots for thread-owned configurations while allowing a
  ready environment attachment to supply its resolved roots.
- Propagate resolved roots to child environments and validate both command and
  `apply_patch` writes in owner-provided secondary workspaces.

GitOrigin-RevId: 1832c168ce1fc37fa67efc2a472998ab4f448c70
2026-08-26 16:28:35 +00:00
jif
5b92c2d2f5 Make Guardian risk score persistence opt-in (#40911)
## What changed

- Add the `features.guardianv2.persist_scores` configuration option for debugging.
- Default the option to `false`, so Guardian V2 reviewed actions and risk scores are only written to rollout files when explicitly enabled and the session is not ephemeral.

## Testing

- Cover configuration deserialization, default non-persistence, and opt-in persistence for nested code-mode actions.

GitOrigin-RevId: 452af99ef14553d45140340ececc2913389124d0
2026-08-26 16:23:34 +00:00
jif
bde9db1375 Record actual Responses endpoints in tracing spans (#40906)
## Why

Responses-compatible requests can use routes other than `/responses`, but their
tracing spans reported the default route regardless of the selected endpoint.

## What changed

- Populate `api.path` from the selected `ResponsesEndpoint` for HTTP and
  WebSocket requests.
- Retain the endpoint on WebSocket connections so stream-request spans report
  the same route as connection spans.

GitOrigin-RevId: 349eca94b27d4cc3a1adde8b257313506bdaf0f4
2026-08-26 15:31:30 +00:00
jif
d4998d611a Record reviewed actions with security risk scores (#40901)
## What changed

- Add optional `call_id` and `action` fields to `SecurityRiskScore` so a persisted score identifies the tool call and bounded action that produced it.
- Populate the fields after Guardian V2 classifies an action while leaving fail-closed and legacy scores without provenance.

## Testing

- Verify scores preserve action details for direct tool calls and nested code-mode calls.
- Verify rollout serialization retains the new fields.

GitOrigin-RevId: fce69af37f368cecf1d9bce42bfc38a969e969b7
2026-08-26 15:02:21 +00:00
jif
62fb56ee56 Route Guardian inference through dedicated endpoints (#40892)
## What changed

- Add the opt-in `features.guardianv2.free_guardian` setting to route eligible
  Guardian reviews to `/guardian` and asynchronous classifications to
  `/guardian-classifier`.
- Support endpoint selection for both HTTP and WebSocket Responses clients,
  including endpoint-aware connection reuse.
- Keep `/responses` for API-key authentication, custom provider URLs,
  non-Guardian models, and configurations where the option is disabled.
- Omit routing hints and `service_tier` from requests sent to the dedicated
  Guardian endpoints.

## Testing

- Cover route selection across authentication modes, provider URLs, HTTP
  fallback, WebSocket review sessions, and classifier sampling.

GitOrigin-RevId: 9c88673c710d009e0239559b9245a4e6c4f4befc
2026-08-26 14:36:48 +00:00
jif
10d5a603ae Persist Guardian V2 risk scores without restoring them (#40884)
## What changed

- Append accepted Guardian V2 classification results to rollout history for non-ephemeral threads.
- Keep resumed and forked threads from restoring a persisted score into active Guardian state.

## Testing

- Verify that asynchronous scoring records the resulting `SecurityRiskScore` rollout item.
- Seed resume and fork tests with a persisted score and verify that approvals ignore it.

GitOrigin-RevId: 40d63a2ea7e7cf6398402c6aed7d5e5727dc9d68
2026-08-26 13:54:36 +00:00
jif
f5420174da Include originating item IDs in MCP request metadata (#40866)
## What changed

- Add the originating Responses item ID to MCP tool request metadata as
  `_meta.itemId`.
- Preserve the initiating `exec` item ID across code-mode cells so nested MCP
  calls carry the same origin.

## Testing

- Cover metadata generation for direct and code-mode MCP tool calls.

GitOrigin-RevId: 1161cac64f1cc3a6d4dac4368e63804bd9d2c417
2026-08-26 10:39:05 +00:00
zsol-openai
74772623db Stop overriding Rust debuginfo in Bazel CI (#40864)
## What changed

Remove the CI-specific `-Cdebuginfo=0` flags for both target and execution
Rust actions, allowing the Bazel Rust toolchain and compilation mode to select
the debug-info level.

GitOrigin-RevId: f785347cde2b3ad0b7814ece2ba44fd89aa823b3
2026-08-26 10:32:57 +00:00
jif
039eb58a0b Give Guardian reviewers read-only access to parent history (#40848)
## Why

Guardian approval reviews may need the original user instructions to decide
whether a command is authorized.

## What changed

- Forward the parent thread's `history.list_windows`, `history.list_items`,
  `history.read_item`, and `history.search_contents` executors to Guardian
  reviewer sessions.
- Keep other parent extension tools, including the `notes` namespace, isolated
  from Guardian reviewers.

## Testing

Add an app-server integration test that reads parent history during a Guardian
review and verifies that `notes` tools are not exposed.

GitOrigin-RevId: 65a90036577050adfa23b1d98f862233c994d9d7
2026-08-26 09:23:41 +00:00
olliem-oai
9dea1f709f Default Guardian v2 to computer-use reviews with images (#40846)
## What changed

- Default Guardian v2's review scope to computer-use tools. Set
  `features.guardianv2.review_scope.computer_use_only = false` to retain the
  broader tool review scope.
- Include images in Guardian transcripts by default. Set
  `features.guardianv2.transcript.include_images = false` to disable them.

## Testing

- Update configuration and app-server coverage for the new defaults and
  explicit broader-scope overrides.

GitOrigin-RevId: 88c3cfe6dd2a96df052111794ad59c5c9ea39b78
2026-08-26 09:13:33 +00:00
olliem-oai
a9ed4f154a Refine Guardian predictive risk classification (#40844)
## What changed

- Evaluate recent unknown-authorization or critical-risk actions over the last five actions instead of ten.
- Flag predicted high- or critical-risk actions when they are credibly expected within the next two actions, rather than treating any potential risk within ten actions as high.
- Remove privileged or broad access as a standalone high-risk condition and classify a trajectory as low when none of the explicit high-risk conditions apply.
- Clarify the user-authorization and reviewer terminology in the classifier instructions.

GitOrigin-RevId: 1eaf63c3327f57a9c8560df085e1fe0afad99cd4
2026-08-26 09:02:09 +00:00
Abhinav
a26f1806a4 Use issuing step settings for approval decisions (#40821)
## Why

Tool actions and approval retries can outlive the step that issued them. If approval handling reads newer turn settings, a delayed action can use the wrong approval policy or reviewer.

## What changed

- Capture the approval policy and reviewer in `GuardianReviewContext` from the issuing step.
- Use step settings for command, patch, permission, sandbox-retry, and remote-network approval decisions.
- Use the active task's published settings for background network approvals and long-lived Unix shell interception.
- Preserve explicit MCP reviewer overrides.

## Testing

Added regression coverage for permission requests, same-turn network policy changes, delayed commands after a new turn starts, sandbox retries, patch policy selection, and MCP reviewer overrides.

GitOrigin-RevId: b7e84a2e1e79a71502272b15b5ef5b0e5643f8b0
2026-08-26 06:51:58 +00:00
zm-oai
21c58c90f2 Harden Windows sandbox helper cleanup (#40808)
## Why

Windows filesystem operations can complete while their helper process remains
alive, and elevated sandbox processes must not survive a disconnected control
pipe.

## What changed

- Read newline-delimited filesystem helper responses without imposing an
  operation deadline, then bound the time spent reaping the helper.
- Drain helper stderr concurrently, retain a bounded diagnostic on failure, and
  kill helpers that do not exit after responding.
- Terminate the elevated runner's job or process when its input pipe closes or
  fails.

## Testing

Added coverage for delayed responses, noisy stderr, stuck helpers, duplicated
file handles, and termination of elevated descendants after a control-pipe
disconnect.

GitOrigin-RevId: c0d3d5d76e13318de17638df4db71fcfb9a7397f
2026-08-26 06:02:56 +00:00
Abhinav
04907ab95a Use step settings for MCP request metadata (#40807)
## Why

MCP tool calls can be issued by a model step whose settings differ from the
turn's initial settings. Request metadata must describe the issuing step.

## What changed

- Build MCP tool-call metadata from the captured `StepContext` model and its
  effective reasoning effort.
- Populate `node_repl_disabled` from the issuing step while leaving turn-owned
  Responses metadata unchanged.
- Apply the same step-scoped values to MCP requests emitted by stop hooks.

## Testing

Add coverage for configured and model-default reasoning effort, model changes,
Node REPL restrictions, and preservation of the original step and turn
metadata.

GitOrigin-RevId: f9cce52fbe559f15437bd19d699b657229c0d145
2026-08-26 05:58:04 +00:00
rka-oai
3e4707b34b Support persistent reasoning effort (#40799)
## What changed

- Add `persistent` to the reasoning-effort protocol and TypeScript SDK types.
- Show model-advertised persistent reasoning in the TUI as “Persistent”.
- Preserve `persistent` in local configuration while sending the Responses API's `disabled` wire value.

## Testing

- Cover parsing and serialization, request translation, remote model requests, the TUI reasoning selector, and TypeScript CLI argument forwarding.

GitOrigin-RevId: 22fc2fba1975db345c12d555ec12803d8dc0abca
2026-08-26 05:00:23 +00:00
Owen Lin
37f4bb94c9 Respect paginated history when stopping background tasks (#40787)
## Why

Stopping a task from the agents overview may need to look up its active turn. Paginated threads should use the turn history endpoint instead of requesting embedded full history.

## What changed

- Read the thread without turns first to determine its history mode.
- Fetch the first turn page for paginated threads when the app server supports it.
- Fall back to embedded turn history for legacy threads and legacy server negotiation.

## Testing

Added coverage for paginated and legacy threads, including fallback after legacy capability negotiation.

GitOrigin-RevId: 44d506b19e32c6b3c27fac11fb748c23b8e47b5e
2026-08-26 04:23:06 +00:00
Benjamin Carlsson
98ee29c7cd Add Vim character find and till motions (#40785)
## What changed

- Add line-local `f`, `F`, `t`, and `T` motions to Vim normal mode.
- Support the motions with `c`, `d`, and `y`, including dot-repeat for changes.
- Expose separate configurable normal-mode and operator-motion bindings, while preserving existing custom keymaps that use the new defaults.
- Keep character targeting aligned to extended grapheme boundaries and skip embedded composer elements.

## Testing

- Cover forward and backward motion and operator ranges, missing and adjacent targets, cancellation, dot-repeat, custom bindings, shifted terminal key events, grapheme clusters, and embedded elements.

GitOrigin-RevId: 2610cf9a13538d9ae9b890c01417ca25316c1d60
2026-08-26 04:18:49 +00:00
Brandon Zhang
25a6e316c8 Make history and notes tools Bridge-compatible (#40775)
## What changed

- Express nullable history and notes arguments with `anyOf` and remove unsupported schema constraints.
- Forward valid JSON object arguments to the backend without enforcing client-side limits.
- Clarify history ID, ordering, cross-agent path, and consistency semantics in the tool descriptions.

## Testing

- Cover forwarding previously restricted argument values for every history and notes tool.
- Verify app-server requests expose the Bridge-compatible schemas and still reject non-object arguments locally.

GitOrigin-RevId: 28809fe9da5099944fd04962b5e71ffda4163eea
2026-08-26 03:46:23 +00:00
sayan-oai
e24190caa9 Use turn environment settings for sandbox execution (#40771)
## Why

Tool execution can use an environment whose sandbox configuration differs from the turn-wide configuration. Sandbox selection and process setup need to follow the environment that owns the tool request.

## What changed

- Source Windows sandbox level, legacy Landlock mode, and Windows private desktop settings from the selected turn environment across tool orchestration, unified exec, patch application, and zsh fork escalation.
- Preserve Windows sandbox level overrides in restorable thread settings and invalidate MCP configuration when that level changes.

## Testing

- Add a resume test that verifies an elevated Windows sandbox override survives thread restoration.

GitOrigin-RevId: 9d8fc46404919f5ae97c9ed712c0932a1f095e36
2026-08-26 03:28:57 +00:00
yqz-openai
3ba7b6941d Add OpenTelemetry tracing to the code-mode host (#40760)
## What changed

- Add `--otel-trace-exporter` for sending OTLP/HTTP JSON traces directly to an exporter.
- Add the mutually exclusive `--otel-trace-listen` option for streaming raw OTLP trace batches over a trace-only WebSocket, backed by a loopback OTLP receiver.
- Instrument host startup, transport requests, and gRPC operations with request, session, execution, cell, wait, and tool-call identifiers where available.
- Flush the trace provider with a bounded timeout during shutdown.

GitOrigin-RevId: 4dcdb2bc3b15166dccd5041fb875caea74f3f6fe
2026-08-26 02:49:51 +00:00
Benjamin Carlsson
2764e83626 Preserve transcript overlay state across updates (#40751)
## What changed

- Detach and restore the live tail when rebuilding transcript renderables after history replacement, consolidation, removal, or highlighting.
- Keep an overlay that is following the bottom pinned to the tail when the composer height changes.
- Update cached content height after prepending history so subsequent scroll calculations use the rebuilt content.

## Testing

- Cover history rebuilds with absent, empty, and active live tails.
- Cover bottom-following across terminal height changes and subsequent committed output.

GitOrigin-RevId: be4bf4d0676261cc52864da9acb567573e34a799
2026-08-26 01:20:40 +00:00
andrewgu-oai
00b7152a60 Fix MCP denial assertion for structured output (#40748)
## What changed

Update the attachment-owned permissions test to read the denial message from
the text content item in the restricted MCP tool's structured output.

GitOrigin-RevId: a4b219b6f14f1b40e8c586147f535748b1770b13
2026-08-26 01:02:52 +00:00
Won Park
dc08ace782 Prepare isolated Guardian reviewer sessions (#40742)
## What changed

- Add a policy prompt and output contract for synchronous Guardian reviews.
- Build reviewer thread options with a preferred review model, low reasoning effort when supported, and a fallback to the parent model and effective effort.
- Isolate reviewer sessions from parent instructions, MCP servers, optional features, and write access while preserving read restrictions, resolved environments, managed network constraints, and rollout persistence.
- Mark prepared threads as internal Guardian review sessions for later host-managed startup.

## Testing

- Cover reviewer isolation, read-only environment inheritance, review-model overrides, and parent-model fallback behavior.

GitOrigin-RevId: 5133be99674b64e06e19e7f2dbc86439e1678790
2026-08-26 00:19:33 +00:00
Nick Steele
9b4a0f8a0a Add enterprise IdP identity resolution for MCP OAuth (#40739)
## What changed

- Resolve stored enterprise IdP sessions against discovered authorization
  metadata, requiring the configured issuer, public-client authentication, and
  supported ID-JAG token exchange capabilities.
- Bind OIDC identity claims and MCP resource indicators to their configured
  issuer, client, and server, and require reauthentication when pinned keyring
  credentials are removed or replaced.
- Hold the credential lock while rereading refresh tokens, and isolate
  enterprise credentials by reserved namespace and Codex home.

## Testing

- Cover metadata and claim validation, resource binding, credential replacement
  and keyring failures, refresh locking, expired ID tokens, and credential
  namespace isolation.

GitOrigin-RevId: edce3c6159f7d6831edf72e9608b3fc3f5823c83
2026-08-25 23:51:57 +00:00
pakrym-oai
75cb7c903d Preserve MCP tool output as content items (#40737)
## What changed

- Convert unstructured MCP results into typed function-call output items instead of serializing the entire content array as a text string.
- Keep structured MCP results as serialized text and preserve media, encrypted content, and unknown content through their existing item conversions.
- Drop empty text items during output truncation so they do not consume API array slots.

## Testing

- Cover text-only, mixed unstructured, structured, and image-sanitized MCP results.
- Verify empty text items are discarded under byte- and token-based truncation policies.

GitOrigin-RevId: fa1c5b7dee6f003a094265379dcabdd060386a48
2026-08-25 23:42:50 +00:00