Commit Graph

10443 Commits

Author SHA1 Message Date
rka-oai
f6494dc8f5 Enable clock tools from model metadata (#41210)
## What changed

- Register both `clock.curr_time` and `clock.sleep` when a model lists `clock` in `experimental_supported_tools`.
- Keep current-time reminder injection controlled separately by the `current_time_reminder` feature.

## Testing

- Cover a model-advertised clock with reminders disabled, verifying that both tools are available and no reminder is added.

GitOrigin-RevId: c39b5cb6e2da397daaaa4e0ad81f0763b8dd91e9
2026-08-27 21:46:20 +00:00
iceweasel-oai
34e74fda0e Align deny-read matching with executor path semantics (#41209)
## Why

Read-deny policies must use the target executor's path convention so URI-based
policy checks and native filesystem enumeration enforce the same rules.

## What changed

- Prepare deny roots and glob matchers from `PathUri` policy context, including
  executor-relative working directories and home-relative patterns.
- Match Windows globs case-insensitively with normalized separators, while
  preserving byte-oriented POSIX matching for non-UTF-8 paths.
- Fail closed for malformed paths, incompatible path conventions, unresolved
  home-relative patterns, and invalid globs.
- Make Windows deny-read discovery use case-insensitive ripgrep glob matching.

## Testing

Added coverage for Windows URI conventions, executor home expansion,
case-insensitive `.env` discovery, malformed paths, non-UTF-8 names, and
canonical directory-link targets.

GitOrigin-RevId: 36001219a2e9b36acfce8972dc1d3bbc304271c5
2026-08-27 21:15:37 +00:00
willwang-openai
c4c51c56e4 Honor per-repository plugin configuration in catalog requests (#41208)
## What changed

- Load the effective plugin configuration for every requested `cwd` in
  `plugin/list` and `plugin/installed`.
- Combine local marketplaces in request order, keeping the first source for
  duplicates while merging installed and enabled state across repositories.
- Report invalid project configurations through `marketplaceLoadErrors` without
  dropping valid local catalogs or globally enabled remote catalogs.
- Use the combined marketplace context for forced and background cache refreshes,
  while keeping remote plugin feature gating request-wide.

## Testing

- Cover distinct and duplicate marketplaces, cross-repository enabled state,
  invalid project configuration, local cache refresh, and global versus
  project-local feature flags.

GitOrigin-RevId: 53c8e0e9c760dc2b969ab10d0e63fb439673c230
2026-08-27 21:10:10 +00:00
iceweasel-oai
19321435b1 Propagate executor OS into turn environments (#41207)
## What changed

- Add the optional `platformOs` field to exec-server environment metadata, with
  local exec servers reporting `std::env::consts::OS` and legacy servers
  remaining compatible when the field is absent.
- Preserve the reported OS in each selected turn environment, including the
  local environment.

## Testing

- Extend protocol serialization and environment-selection coverage for remote
  and local platform values.

GitOrigin-RevId: 0f325f6cb83cd8f8c7ec1ce2a4041f45a29e8f38
2026-08-27 21:05:40 +00:00
Shijie Rao
7f135e1314 Make Ultra reasoning fallback model-aware (#41206)
## What changed

- Add an optional `multi_agent_reasoning_effort` field to model metadata.
- When `Ultra` is selected, use a supported catalog override when present. Otherwise, prefer `max`, then the highest supported non-`ultra` effort, and finally `medium` when the model has no reasoning levels.
- Preserve existing request behavior for other reasoning efforts, including mapping `persistent` to `disabled`.

## Testing

- Cover configured, missing, unsupported, and empty-catalog fallbacks for both parent and spawned-agent requests.

GitOrigin-RevId: b7ef576f32e0ea95ef38bf95c25789ed16aae94e
2026-08-27 21:03:09 +00:00
florence-oai
e931d07b88 Track executor MCP discovery telemetry (#41205)
## What changed

- Count remote executor MCP discovery attempts, including refreshes, with `success` and `error` outcomes.
- Count each discovered server by name and report whether it was found or unavailable before policy and startup filtering.

GitOrigin-RevId: b912aa64b606e6243cce79df0fe85d485a2c3547
2026-08-27 20:55:12 +00:00
iceweasel-oai
d4d2b293b4 Propagate executor home directories into sandbox contexts (#41204)
## What changed

- Report the executor's user home in environment metadata.
- Cache the reported home on selected turn environments and include it in
  filesystem sandbox contexts, including `apply_patch` requests.
- Preserve compatibility with executors that do not report a home directory.

## Testing

- Cover local, remote, inherited, serialized, and `apply_patch` sandbox
  contexts.

GitOrigin-RevId: ea65e68e33a80bc9bcfc7c53b1486ab944699470
2026-08-27 20:44:47 +00:00
Evan Fannin
5bf0ba3dd6 Let extensions process MCP tool results (#41202)
## What changed

- Add `ToolLifecycleContributor::on_mcp_tool_result` with access to the
  executed MCP tool context, rewritten arguments, extension data stores, and
  mutable server result.
- Run contributors before publishing MCP completion and before preparing the
  result for the model, so extensions can inspect or replace successful and
  error results.

## Testing

- Cover unchanged, replaced, and error results for direct MCP calls, plus
  replaced and error results through Code Mode.
- Verify completion waits for result processing and the processed result flows
  to both completion events and subsequent model input.

GitOrigin-RevId: ece7acfe9c5eed4778cb78a29c3ffd06a74e1bcf
2026-08-27 20:39:39 +00:00
trolle-oai
124e560b93 Make the optional MCP startup grace configurable (#41199)
## What changed

- Add `mcp_optional_startup_grace_ms` with a default of 1,000 ms to control how long tool catalog capture waits for optional MCP servers.
- Treat a value of `0` as disabling the shared grace, so optional servers use their configured `startup_timeout_sec` instead.
- Apply updated grace values during runtime and MCP configuration refreshes, and reset cached startup deadlines when the configured duration changes.

## Testing

- Cover custom, disabled, refreshed, and shared startup grace behavior in MCP connection and core integration tests.

GitOrigin-RevId: 936196215ed6e0a29c9ec72cfee17663978df8ef
2026-08-27 20:31:40 +00:00
rka-oai
035295b46e Improve sandboxing, MCP errors, and cached approvals (#41196)
Expand Windows deny-read globs robustly across protected directories while preserving filesystem enforcement. Preserve structured MCP tool and resource errors through app-server responses. Bind cached Guardian classifications to current local and root authorization state so stale scores cannot approve actions.

Add regression coverage for the sandbox resolver, structured protocol errors, and authorization changes.

GitOrigin-RevId: 4b80ed724d869afeca79204222d8465fa99d3a24
2026-08-27 20:05:08 +00:00
Abhinav
0182ff3480 Finalize model-specific tool plans in ToolRouter (#41195)
## Why

Planning tools for a candidate model must not change the selected model or its
Responses Lite tool inventory. Otherwise, preparing a fallback can overwrite
metadata before the current model's request is sent.

## What changed

- Build tool registries and visible specs from an explicit `ModelInfo`.
- Store the finalized tool mode, code-mode names, namespace inventory, and
  terminal and child-management capabilities on `ToolRouter`.
- Publish namespace inventory only after selecting the step's router, and use
  that router's mode when dispatching and recording tool calls.

## Testing

Added coverage for candidate-model isolation, fallback compaction metadata,
code-mode worker selection, normalized tool names, and router capabilities.

GitOrigin-RevId: 56df2de8f42c7e93a4c4dcd117720e40a0cca3db
2026-08-27 20:01:39 +00:00
Tamir Duberstein
8aea62b2d8 Harden core test fixture startup assertions (#41194)
## Why

Test fixture setup can take more than five seconds on loaded CI workers, and
failures returned from setup can be obscured when downstream mocks verify their
expectations during teardown.

## What changed

- Add a shared `expect_startup` helper with a 30-second timeout that panics on
  either timeout or setup failure before mock teardown runs.
- Use the helper for remote-environment and unified-exec fixture setup, and
  allow the same startup window for the initial exec-server requests.

## Testing

Add paused-time tests covering successful startup after five seconds, timeout
reporting, and propagation of setup errors in the presence of unmet mocks.

GitOrigin-RevId: 39db69bde2983acd023a1911a6fad106674e169a
2026-08-27 19:58:09 +00:00
Matthew Zeng
56239d7a61 Report affected capabilities from remote plugin syncs (#41193)
## Why

Remote plugin sync results need to identify which runtime categories may require
invalidation when a cached bundle changes.

## What changed

- Add `RemotePluginCapabilities` hints for MCP servers, Apps, hooks, and skills.
- Attach capability hints to materialized and removed plugins. Updates union the
  declarations from the old and new bundles, while removals inspect the active
  bundle before deleting its cache.
- Discover declarations without applying runtime policy or creating runtime
  data directories.

## Testing

- Cover Agent Plugin capability discovery with an unavailable runtime data
  directory.
- Cover capability accumulation across bundle versions and removal reporting.

GitOrigin-RevId: 338075d22d86f30f52be5785a2d87c77b33609c6
2026-08-27 19:54:40 +00:00
Eric Traut
c29bc99949 Preserve restored permission profiles in TUI sessions (#41192)
## Why

Restored app-server threads can carry permission profiles that cannot be
represented without loss as legacy sandbox-mode overrides. Sending those
profiles as per-turn overrides can discard their original permission details.

## What changed

- Distinguish restored permission profiles from legacy per-turn sandbox
  overrides.
- Preserve restored profiles while routing turns and changing to compatible
  working directories.
- Reject `/cd` when a restored profile cannot be represented safely by a
  legacy sandbox mode.

## Testing

- Cover retaining a restored read-only profile across `/cd` without a turn
  override.
- Verify that lossy sandbox-mode projections are detected.

GitOrigin-RevId: 6143dca4b83ab4f59bab05f6a59b4fe841c56192
2026-08-27 19:51:10 +00:00
jif
8935ff19db Stabilize Guardian WebSocket tests (#41191)
## Why

Guardian tests could continue after a WebSocket handshake but before the
connection entered the idle pool. The shared request waiter could also miss a
notification delivered between checking the request log and registering its
wait.

## What changed

- Wait for Guardian prewarming to populate the idle connection pool instead of
  treating completed handshakes as sufficient.
- Use two initial Guardian connections in tests while retaining eight in
  non-test builds.
- Register for request-log notifications before inspecting the log to avoid a
  lost wakeup.

GitOrigin-RevId: 88f6a22c5401e03c24e6e114f2563fc641bfef80
2026-08-27 19:47:41 +00:00
jif
efc020d224 Instrument stdin review size checks (#41189)
## What changed

Emit a `codex.unified_exec.stdin_review.size_check` counter when reviewing
input for an escalated terminal. Tag each check with:

- the result: `formatter_truncated`, `over_limit`, or `within_limit`;
- whether the submitted input is control-only or text.

Preserve the existing rejection behavior for truncated or oversized reviews.

GitOrigin-RevId: 6556beb2121cfaf91d572a26822b50442391c95f
2026-08-27 19:44:11 +00:00
Eric Traut
4761851ff3 Account subagent token usage toward root goals (#41183)
## What changed

- Roll token usage from spawned descendants, including nested subagents, into the root goal's usage.
- Apply descendant usage during active and idle progress accounting so it contributes to token budgets.
- Reset descendant accounting baselines when the active goal changes and preserve usage recorded concurrently with a checkpoint.

## Testing

- Cover child and grandchild usage, budget exhaustion, unloaded parent runtimes, goal replacement, idle accounting, and concurrent checkpoints.

GitOrigin-RevId: 8f97ec6778c55b9adf94b887b5fd03999ed0eb94
2026-08-27 19:42:18 +00:00
jif
5f49aba876 Require explicit requests for spawn model overrides (#41165)
## What changed

- Tell the `spawn_agent` tool to set `model` only when the user explicitly
  requests a different model.
- Update the tool-description test to enforce the stricter guidance.

GitOrigin-RevId: ed46bcb544876e408896e0d8c54292192369951c
2026-08-27 15:18:57 +00:00
Abhinav
8228e9b867 Resolve token budgets from each step's active model (#41162)
## Why

Model settings can change between steps in the same turn. Token-budget defaults,
context-window limits, and model-visible guidance need to stay aligned with the
model captured for each step.

## What changed

- Preserve the turn's original token-budget preferences and resolve model-owned
  defaults when each `StepContext` is created.
- Use the step's model to determine context-window availability and token-budget
  guidance, while keeping explicit user settings unchanged.
- Emit one-time replacement or removal notices when context-window guidance
  changes, including compatibility with previously persisted world-state
  snapshots.
- Add `ModelInfo::usable_context_window()` to distinguish reserved-headroom
  capacity from the resolved context window and auto-compaction limit.

## Testing

- Cover mid-turn model switches with model defaults, explicit settings, config
  reloads, missing context windows, and missing destination guidance.
- Cover unchanged, replaced, removed, blank, and legacy guidance transitions.

GitOrigin-RevId: 91100a9f3625bef8a79ecd158eb028051c309eee
2026-08-27 15:01:22 +00:00
jif
bce96bcb43 Reject oversized reviewed terminal input (#41159)
## Why

Reviewing a shortened `write_stdin` action while sending the complete input could allow unreviewed bytes to reach an escalated terminal.

## What changed

- Require the fully formatted action and approval reason to fit within 8,000 bytes.
- Reject truncated or oversized actions before requesting approval or writing any bytes to the terminal.
- Document the reviewed stdin size limit in the app-server protocol.

## Testing

Add an integration test that uses JSON escaping to push a formatted action over the limit and verifies that it is neither offered for approval nor executed, while a subsequent valid write still succeeds.

GitOrigin-RevId: f6c96a78a65a136366c8119a7d242dfc2ec05fe6
2026-08-27 14:54:13 +00:00
jif
453a9bcc69 Reduce Guardian V2's default tool-call lag (#41158)
## What changed

- Lower the default `max_tool_call_lag` from three tool calls to two, causing
  older async risk scores to fall back to strict review sooner.
- Update the async scorer integration test to verify score expiration using the
  default lag instead of a test-specific override.

GitOrigin-RevId: a07cae3634428a1e64745674eced92fb770f441a
2026-08-27 14:49:32 +00:00
jif
4f2a1d8666 Fail closed on unbounded Guardian parent compactions (#41152)
## Why

Guardian classification must not proceed after silently dropping a parent
compaction that cannot fit within its configured size limit.

## What changed

- Distinguish an absent or unusable parent compaction from serialization and
  size-limit failures.
- Record a fail-closed score and failed classification when the latest encrypted
  parent compaction cannot be serialized or exceeds the complete-item byte
  budget.
- Preserve omission of compactions with missing or empty encrypted content
  without falling back to older context.

## Testing

Cover compactions at the exact byte limit, one byte over it, and oversized
passthrough metadata.

GitOrigin-RevId: 8e607c88f10003cdfab273963bc73c848b09c821
2026-08-27 14:31:57 +00:00
jif
5ed334a29f Extract Guardian action rendering into its own module (#41151)
## What changed

- Move bounded planned-action JSON rendering from the Guardian V2 extension implementation into a dedicated `async_scorer::action` module.
- Keep the structural size-limit tests alongside the extracted implementation.

GitOrigin-RevId: 9292b164588ba0119b4c5ff81056bf7416352d69
2026-08-27 14:24:09 +00:00
jif
df9f537a6e Remove locking from trusted skill collection (#41150)
## What changed

- Store per-turn trusted skill paths directly in a `BTreeSet` instead of a
  mutex-protected set.
- Mutably record paths and consume the collection when producing the final
  ordered path list.
- Strengthen the bounded-deduplication test to verify the exact collected paths.

GitOrigin-RevId: 69e87fc7783738d85ed204f18a3968d0837c3693
2026-08-27 14:20:01 +00:00
jif
e8b938b02e Use typed outcomes for Guardian V2 classification (#41146)
## What changed

Represent completed and superseded Guardian V2 classifications with a dedicated
`ClassificationOutcome` enum. Map the typed outcome to the existing metrics
status and emit truncation metrics only for scored classifications.

GitOrigin-RevId: b00d345cb0162ed3fc7f53632630b631f18820e7
2026-08-27 14:14:12 +00:00
Benjamin Carlsson
a847c71a15 Limit inline diff previews in the TUI (#41143)
## Why

Large or minified diffs can require substantial work to allocate wrapped rows and syntax-highlighted spans in the inline patch view.

## What changed

- Limit inline patch previews to 12 rendered rows across all changed files, while retaining file summaries and directing users to the transcript when content is omitted.
- Preserve complete diff content in transcript and raw views.
- Bound preview source scanning to 64 KiB so zero-width content cannot bypass the row budget.

## Testing

Add coverage for added, deleted, updated, renamed, minified, narrow-width, wide-character, combining-character, and multi-file diffs, including preservation of complete transcript and raw output.

GitOrigin-RevId: 1899129ab548771c29d226ff624549573fb2f688
2026-08-27 14:09:15 +00:00
felixxia-oai
694edc23b2 Propagate trusted root skills to delegated workers (#41118)
## Why

Guardian reviews for delegated workers need to recognize skills explicitly
invoked by the user on the root turn.

## What changed

- Record verified user-owned skill paths as bounded, turn-matched Guardian
  evidence.
- Include trusted paths from the current worker and its root snapshot when
  building review context.
- Exclude skill trust from later root turns so stale authorization is not
  inherited.

## Testing

- Add an app-server lifecycle test covering inheritance of a root-invoked
  skill by a delegated worker and its removal on the next root turn.

GitOrigin-RevId: aa28f485edb7a447e51d51de8dc89b959fd63d40
2026-08-27 11:31:40 +00:00
felixxia-oai
aa89cf62bb Freeze plugin roots in MCP tool attribution (#41117)
## Why

Plugin MCP trust decisions must describe the exact host-discovered server
registration. Looking up a plugin again by ID can resolve a different root.

## What changed

- Retain the host plugin root in MCP catalog attribution and connection identity.
- Reconnect an MCP server when its attributed plugin root changes.
- Pass the retained root through tool lifecycle attribution and use it directly
  when building trusted tool context.

## Testing

Add coverage for catalog identity, connection reconciliation, lifecycle
attribution, and rejecting a different root associated with the same plugin ID.

GitOrigin-RevId: bc92743dd40ab44065a07c3ea972b4956ef8351f
2026-08-27 11:27:50 +00:00
jif
6c59264b14 Increase Guardian V2 async test timeouts (#41108)
## What changed

Define a shared 30-second timeout for Guardian V2 async tests and use it
for classifier requests, score updates, and authentication refresh waits.

GitOrigin-RevId: fa0e63e5e4c2b9ba0e3a09f0c8758886a867e546
2026-08-27 10:19:43 +00:00
jif
e9a446d79d Add Guardian V2 decision metrics (#41100)
## What changed

- Record classified risk levels in `codex.guardian_v2.classification.risk`.
- Record fast approval outcomes and their reasons in
  `codex.guardian_v2.fast_decision`, including low-risk approvals and deferred
  decisions caused by missing, stale, failed, out-of-scope, or elevated-risk
  scores.
- Cover the new metric labels across approval and failure paths.

GitOrigin-RevId: e180054e0b3796e479a706157dd9ea7c9f03c001
2026-08-27 10:05:21 +00:00
Ankush Gupta
89650c66f2 Require synchronous review for sensitive MCP actions (#41094)
## What changed

- Recognize `codex_sensitive_action: true` on MCP approval elicitations.
- Route marked actions to the synchronous Guardian reviewer instead of extension fast approval. Absent or false values preserve the existing path.
- Cover ordinary and strict auto-review configurations, including marked, unmarked, and explicitly false metadata.

GitOrigin-RevId: dce13d1696568ca81c8d2b08a7ef0d5f13e155bf
2026-08-27 08:44:54 +00:00
Dylan Hurd
2c4a95736b Expose response usage metadata in completion events (#41087)
## What changed

- Parse optional `usage_metadata.amount` values from Responses API completion events without converting their string representation.
- Propagate the metadata through SSE and WebSocket streams, regular turns, and remote compaction.
- Add `usageMetadata` to the app-server `rawResponse/completed` notification and its generated schemas.

## Testing

- Cover missing, null, zero, and high-precision amounts, including completion events emitted during compaction.

GitOrigin-RevId: b16d81e8350eab0dc7ff613d0dc9dbed73041713
2026-08-27 07:50:05 +00:00
Ankush Gupta
b592a0bfed Forward model confirmation policies to actor MCP tools (#41072)
## What changed

- Add optional Browser Use and Computer Use confirmation-policy Markdown to model catalog messages.
- Send the configured documents verbatim in `openai/confirmation_policies` metadata for `node_repl` and `cua_repl` tool calls. Send an empty object when the issuing model has no policies so runtime defaults are cleared.
- Use the issuing step's model snapshot across approval waits, and omit the metadata for other MCP servers and Guardian sessions.

## Testing

- Cover policy serialization, configuration overrides, model changes, approval waits, partial or empty policies, eligible server filtering, and Guardian exclusion.

GitOrigin-RevId: 038c4c262a31fc71986e4a2a947fe9bcbd407acc
2026-08-27 06:58:07 +00:00
rka-oai
218a3e50ae Clarify when to send asynchronous user messages (#41070)
## What changed

Expand the `send_user_message_async` tool description to:

- identify questions, blockers, significant findings, and in-progress replies as
  messages that may need immediate user attention;
- distinguish those messages from routine progress updates that belong in
  commentary;
- clarify that sending a message neither ends the turn nor waits for a reply;
  and
- encourage formatting questions so they are easy to notice and answer.

GitOrigin-RevId: 004ba7fd77b2e225a4baa2ab69d08660a2cf73d7
2026-08-27 06:54:38 +00:00
pmccrary-oai
4cb8d8679c Forward truncation policies to the history notes backend (#41062)
## What changed

- Serialize each history and notes request's output truncation policy into the
  `x-openai-tool-output-truncation-policy` header.
- Forward the invoking tool call's policy for tool requests and use the thread
  hint byte limit for context-contributor requests.

GitOrigin-RevId: 9d4e61480397b325efdb033861893e88c708de3b
2026-08-27 06:28:23 +00:00
ningyi-oai
d5caceccb1 Track Code Mode tool call metadata completeness (#41058)
## Why

Executed-tool metadata for a Code Mode cell can span its `exec` and `wait`
outputs. Consumers need to know whether that metadata contains the cell's full
tool call inventory or only a partial record.

## What changed

- Associate recorded tool calls with the originating Code Mode cell across
  `exec` and `wait` outputs.
- Add a host-owned `tool_calls_complete` marker when recording finishes without
  dropped or truncated calls. The marker describes inventory completeness, not
  tool success.
- Preserve the cell metadata through replay and pruning, and clear the
  completeness marker when prompt budgeting makes the record incomplete.

## Testing

Add coverage for multi-wait cells, retries, interruptions, recording limits,
argument truncation, prompt budgeting, and rejection of input-forged metadata.

GitOrigin-RevId: 377014edec06aab42aadab78b8b5dccc0a1c83ba
2026-08-27 06:03:29 +00:00
brianz-openai
f1433fc71f Add developer instructions for persistent mode (#41050)
## What changed

- Add bundled proactivity and follow-up guidance when `ReasoningEffort::Persistent` is selected.
- Allow model metadata to override or disable the guidance with `persistent_instructions`.
- Track the instructions as world state so effort and model changes replace or retire stale guidance without duplicating unchanged context.
- Tailor approval guidance to `send_user_message_async` availability, rebuild it for forked agents and rolled-back history, and exclude Guardian sessions.

## Testing

- Cover default, overridden, disabled, replaced, and retired instructions.
- Cover model changes, history transitions, agent forks, Guardian sessions, and asynchronous-message tool availability.

GitOrigin-RevId: 78e05d0335a70b385bd069b45edcd4ba570cef91
2026-08-27 04:58:21 +00:00
Eric Traut
72c96598c6 Preserve tool authority for TUI delegation prompts (#41046)
## Why

Delegated prompts should retain the authority of the TUI tool that sent them instead of being recorded as user input.

## What changed

- Start delegated `create_thread` and `send_message_to_thread` turns with a namespaced tool output and an empty user input list.
- Recognize delegated outputs from trusted Codex namespaces when building activity summaries.
- Render replayed delegation outputs in history and transcripts with their source task attribution, without adding them to composer history.

## Testing

- Cover turn request encoding, namespace filtering, activity summaries, and replayed history/transcript rendering.

GitOrigin-RevId: aeb2f5c8ad2f2a898c80e8fc791ed879a0ab655d
2026-08-27 04:51:46 +00:00
pmccrary-oai
57e2edc6e9 Encrypt sensitive history and notes tool arguments (#41041)
## What changed

- Mark history and notes search queries, appended note text, and replacement note text as encrypted in their tool schemas.
- Send `x-openai-encrypted-tool-arguments: true` for the corresponding backend routes without changing the JSON request body.

## Testing

- Cover encrypted schema fields and backend headers for history search, notes search, append, and write calls.
- Verify unrelated history and notes requests do not receive the encrypted-arguments header.

GitOrigin-RevId: 58263cff832c979b436ddb4013b5c27218aca678
2026-08-27 03:59:54 +00:00
rhan-oai
5af6979986 Update the stable exec-server test to Codex 0.150.1 (#41030)
GitOrigin-RevId: 84d5d01fb021a7b86625a57982e5486e84f3ff3f
2026-08-27 02:23:03 +00:00
marksteinbrick-oai
307ce6cda9 Track Guardian reviewer turn and tool analytics (#41023)
## Why

Trusted Guardian reviewer sessions can emit events without an app-server listener, leaving their turns and tool usage absent from analytics.

## What changed

- Translate Guardian session lifecycle and canonical tool item events into analytics notifications while excluding messages, reasoning, and review content.
- Preserve Guardian lineage during prewarming even when inherited client metadata is not yet available, without emitting an incomplete thread initialization event.
- Limit direct session tracking to trusted Guardian children so resumed threads that have an app-server listener do not report duplicate events.

## Testing

- Cover completed, failed, and interrupted Guardian turns, tool counts and timing, lineage, content exclusion, prewarmed lineage, and resumed-thread deduplication.

GitOrigin-RevId: 70ace5f7ed30a7e3b6a9d6097c8b2a6a326dc4f7
2026-08-27 02:19:10 +00:00
Adam Perry @ OpenAI
81e180044d Scope extension capabilities to invocation lifetimes (#41020)
## What changed

- Add callback lifetimes to extension `ToolCall`, `ToolEnvironment`, turn-input context, and skill-read request types.
- Require extension tool executors to handle calls for any invocation lifetime and tie their returned futures to that lifetime.
- Update built-in extensions, adapters, and tests to use the lifetime-scoped APIs without retaining host-owned environment capabilities.

GitOrigin-RevId: aca9ce3a1b6870df550bc84ec9308cc65533f161
2026-08-27 02:00:31 +00:00
yqz-openai
eed1dee69e Propagate trace context through gRPC code mode (#41017)
## What changed

- Inject W3C `traceparent` metadata into code-mode session and execution requests.
- Carry each execution's trace context on streamed tool callbacks so callback and nested-tool spans remain connected across the gRPC boundary.
- Preserve the relevant spans when execution, callback, and dispatch work moves into spawned tasks.

GitOrigin-RevId: 6482963cb9b2e2f0ea27f1345bba208b70a80d0b
2026-08-27 01:55:53 +00:00
xl-openai
7c3747941a Reduce skill catalog prompts with path aliases (#41011)
## Why

Repeated skill locator roots can make catalog prompts larger even when the
catalog fits within its metadata budget.

## What changed

Evaluate aliased catalogs regardless of budget pressure and select them when
they preserve skill inclusion and description content while reducing prompt
size. Apply the same selection to combined host, executor, and orchestrator
catalogs.

## Testing

Add coverage for alias selection in full host-only catalogs and update skill,
symlink, and orchestrator resource tests to expect shortened locators and their
root mappings.

GitOrigin-RevId: ccedd3f3f6c7efaa1e5177a2d8c3d81d59239f52
2026-08-27 01:22:23 +00:00
felixxia-oai
b68acc4d4b Trust invoked user skills in Guardian reviews (#41006)
## Why

Guardian treated all skill instructions as untrusted, so it could not use the
invocation of a user-owned skill as authorization evidence.

## What changed

- Record explicit and implicit skill invocations through extension contributors.
- Send Guardian a bounded, deduplicated list of canonical skill paths only when
  they resolve under the user's Codex or `.agents` skill directories.
- Keep repository skills and symlinks that escape trusted roots untrusted, and
  send only verified paths rather than skill contents to the classifier.
- Avoid recording host skill prompts that were superseded by core skill
  injection.

## Testing

- Added unit coverage for trusted roots, symlink escapes, deduplication, and
  size limits.
- Added integration coverage showing that Guardian trusts invoked user skills
  while rejecting a forged repository skill.

GitOrigin-RevId: 1cc0be230f7e6649110201c23c3de8f26447ff36
2026-08-27 00:07:26 +00:00
soyeon-oai
ae357e7250 Attach verified access context to eligible plugin MCP calls (#41005)
## What changed

- Fetch ChatGPT account access and attach `cyber_trusted_access` under
  `openai/entitlementContext` when an installed or selected plugin explicitly
  requests it from a local, read-only stdio tool with no arguments.
- Reject caller-supplied entitlement context on direct MCP calls, and fall back
  to an `unknown` status when access cannot be verified or the account changes
  during the lookup.
- Count entitlement lookup time against the MCP tool-call timeout.

## Testing

- Cover eligible calls plus unowned, remote, HTTP, mutable, argument-bearing,
  API-key, undeclared, direct, and account-switch cases in core and app-server
  integration tests.

GitOrigin-RevId: 303b61585ef4530276c373d914a2d0ccef1f4ac2
2026-08-27 00:02:26 +00:00
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