Commit Graph

8618 Commits

Author SHA1 Message Date
rka-oai
fbe65995bb Support model-owned token budget defaults (#35608)
## What changed

- Add token-budget settings to model catalog messages and apply them when the
  feature is enabled without explicit token-budget configuration.
- Keep explicit user settings authoritative, reject invalid catalog defaults,
  and preserve resolved defaults in exported config locks.
- Manage context-window guidance through world state so it updates once when
  the active model changes while retaining prior conversation history.

## Testing

- Cover catalog defaults, explicit overrides, disabled features, invalid
  values, config-lock replay, and model switching.

GitOrigin-RevId: 54544fefaa14b09f5ef5bad9967a13c52b87b0fe
2026-07-27 12:52:37 +00:00
felixxia-oai
16d7daad7c Record metrics for empty skill catalogs (#35607)
## Why

Empty rendered skill catalogs skipped catalog telemetry instead of reporting
zero-valued counts.

## What changed

- Record a default render report when thread, turn-input, or executor catalog
  rendering produces no fragment.
- Record zero-valued host world-state metrics when skill instructions are
  enabled but no host skills are available.
- Preserve the `catalog_surface` tag so empty host and executor catalogs remain
  distinguishable.

## Testing

Add coverage for empty catalog rendering and mixed nonempty-executor,
empty-host world state.

GitOrigin-RevId: f68d65806703c0ded1ece1e5ae1ffaf6d6045126
2026-07-27 12:32:32 +00:00
felixxia-oai
d6ea5991e7 Add metrics for extension-rendered skill catalogs (#35597)
## What changed

- Add an optional `ExtensionMetrics` capability to thread, turn-input, and world-state contributors, backed by session telemetry in the host.
- Record skill counts, omissions, and truncated description characters for extension-rendered catalogs, tagged by the catalog surface.
- Preserve host session attribution on extension metrics, including the effective model for each turn, and prevent extension tags from overriding host metadata.
- Avoid duplicate host-catalog samples by recording world-state metrics only when the section is published or changes.

## Testing

- Cover metric values and surface tags, session metadata preservation, turn-level model changes, and host world-state publication behavior.

GitOrigin-RevId: 9059e521943a8f81df25a38b03692eddbc1d990d
2026-07-27 11:04:02 +00:00
zsol-openai
3d519bf63a Allow alpha hotfix versions in R2 releases (#35595)
## Why

The Rust release workflow accepts alpha versions with a second numeric suffix,
such as `1.2.3-alpha.4.1`, but the R2 publisher rejects them as invalid.

## What changed

- Allow up to two numeric suffix components for alpha versions in
  `publish_r2_release.py`.
- Document that its version pattern must remain aligned with release tag
  validation in `rust-release.yml`.

GitOrigin-RevId: 8df68ce4f4d3e652367f7394a642827f21979d70
2026-07-27 10:54:58 +00:00
jif
8a1c941439 Recommend longer waits in the v2 wait_agent schema (#35594)
## What changed

Update the v2 `wait_agent` timeout description to recommend minute-scale waits
that avoid busy polling, matching the existing v1 guidance. Extend the tool-spec
test to cover the updated description.

GitOrigin-RevId: 615dfbd7cb5038013131ae8cb959d35e07c6f48a
2026-07-27 10:50:59 +00:00
jif
3bbf1fe757 Expose cached MCP tools before server startup (#35590)
## Why

Cached MCP definitions can be supplied to inference without waiting for the
server to finish initializing.

## What changed

- Publish cached tools while startup is still in progress, clearing their
  potentially stale read-only hint.
- Wait for the selected server to start before executing a tool call, then
  prepare the call against the refreshed live binding.
- Keep cached tools visible in a binding even when no live client is available,
  while rejecting attempts to prepare those calls.

## Testing

- Cover cached-tool visibility before startup and replacement with live tool
  metadata afterward.
- Verify cached definitions reach inference before MCP initialization and that
  calls unavailable in the live catalog return the expected model-visible
  error.

GitOrigin-RevId: 3aae8f474c344ccdc5e08fe321bbad21d85bffd1
2026-07-27 10:25:32 +00:00
zm-oai
95637f7056 Add managed policy for in-app updates (#35537)
## What changed

- Add the stable, default-enabled `in_app_updates` requirements-only feature.
- Allow administrators to disable in-app updates through `[features]` in `requirements.toml`.
- Expose the policy through `configRequirements/read` and include it in the config schema.

## Testing

- Verify that in-app updates are enabled by default and disabled by the managed requirement.
- Verify that `configRequirements/read` returns the configured policy.

GitOrigin-RevId: e9c7074b516fe58385fdf7dc8420c0109c0c3df6
2026-07-27 02:16:11 +00:00
sayan-oai
18f50c9e62 Track model and personality in world state (#35530)
## What changed

- Add model and personality sections to the persisted world-state snapshot.
- Generate model-switch and personality instructions through world-state diffs, including when prior state must be inferred during replay.
- Keep those instruction fragments in standalone developer messages instead of merging them with adjacent context updates.

## Testing

- Cover initial, unchanged, and changed model and personality states.
- Verify that model changes are recorded in rollout world-state items.

GitOrigin-RevId: 497e29cf38cac08e992e546df900f6f8b01120f9
2026-07-26 23:36:33 +00:00
Tamir Duberstein
0896bf6fc0 Skip inactive TUI threads without pending user interaction (#35525)
## What changed

Only collect buffered requests from inactive threads whose event store reports
pending user input or approval. This keeps unrelated requests from being
considered when pending interactions are surfaced after leaving a side
conversation.

## Testing

Extend the side-conversation routing test with an unrelated dynamic tool request
and verify that only the pending subagent approval is selected.

GitOrigin-RevId: 388968277bde34bedc43187c1d1746d76166131e
2026-07-26 22:19:45 +00:00
Felipe Coury
9ca6df68da Preserve terminal turn errors in replayed history (#35524)
## Why

When rebuilding a thread from rollout events, errors embedded in turn completion
events were ignored. Failed retries could therefore be restored as completed
turns, causing warnings such as model-overload errors to disappear from the TUI
transcript.

## What changed

- Mark turns with terminal completion errors as failed and retain their message
  and structured error information.
- Apply late completion errors to their matching historical turn without
  interrupting the active turn.

## Testing

Added history-builder coverage for current and late completion errors, plus a
TUI replay snapshot covering repeated overload failures.

GitOrigin-RevId: 5c474baa0fd5c73368b444d79fb850cbd4c8023a
2026-07-26 22:15:29 +00:00
Felipe Coury
5a3808b77d Shut down the in-process outbound router explicitly (#35523)
## Why

Detached processor work can retain outgoing message senders, so waiting for
channel closure can keep the in-process app-server's outbound router alive
during shutdown.

## What changed

Add an explicit shutdown signal for the outbound router and prioritize it over
pending outgoing messages. Send that signal after processor tasks are stopped
so runtime shutdown no longer depends on every sender being dropped.

## Testing

Add a paused-time test that verifies the router exits and closes its channel
even when an outgoing sender is still retained.

GitOrigin-RevId: a8f88d88a0950f50339b1c56909fedb781f178d4
2026-07-26 22:11:26 +00:00
rka-oai
61a44880a8 Raise the MCP server recursion limit (#35414)
## What changed

- Set the Rust recursion limit to 256 for both the MCP server library and binary crates.
- Populate `started_at_ms` in the thread-fork test's completed-item fixture.

GitOrigin-RevId: b25eeaeecaf94265fe3be8f23cb3c395595afc2a
2026-07-26 01:23:38 +00:00
victor-openai
62fd410384 Ignore generated system skills in the skills watcher (#35408)
## What changed

- Exclude `SkillScope::System` roots from watcher registration because generated
  system skills are installed before the watcher starts.
- Ignore events under the system skill cache that arrive through the recursively
  watched legacy user-skills root, avoiding unnecessary cache clears and
  `SkillsChanged` notifications.

GitOrigin-RevId: ce8ba28ba873372b638950b676e4d09172a5c688
2026-07-25 23:54:08 +00:00
Felipe Coury
20dafe201d Make the keymap action menu responsive (#35375)
## What changed

- Stack action descriptions below their labels when the keymap action menu is too narrow for a readable description column.
- Keep descriptions column-aligned at wider terminal widths.
- Show a dash instead of a number beside the disabled remove-binding action.

## Testing

- Add snapshot coverage for the action menu at 48, 64, and 96 columns.

GitOrigin-RevId: 25b97fd2d8764563e0a0c36d436711f2429093c4
2026-07-25 19:28:57 +00:00
Charlie Marsh
322d5b96cf Keep unified mention results fresh (#35365)
## What changed

- Restart file search whenever a unified mention popup opens so restored or repeated queries receive results instead of inheriting stale search state.
- Cache the popup's filtered rows and refresh them when the query, file matches, search mode, skills, or plugins change.

## Testing

- Add regression tests for bare, reopened, and restored unified mention searches.

GitOrigin-RevId: 9d38438fade01a0552e03cb05e023ee64af60a4c
2026-07-25 16:22:44 +00:00
tongzhou wang
5c36e869c1 Bound Code Mode metadata compatibility headers (#35364)
## Why

The Code Mode tool-name mapping is unbounded and can make HTTP and WebSocket
headers grow without limit.

## What changed

Omit `code_mode_tool_names` from the direct `x-codex-turn-metadata`
compatibility header while retaining it in the canonical
`client_metadata["x-codex-turn-metadata"]` payload.

GitOrigin-RevId: 494a30b6846e32ab44eb79b08dfec63360f563a7
2026-07-25 16:12:42 +00:00
Owen Lin
af7f6f4d34 Include item start times in completion events (#35363)
## What changed

- Add an optional `started_at_ms` field to `ItemCompletedEvent`, retaining
  compatibility with older persisted events that lack it.
- Track the first start timestamp for each in-flight item and attach it when
  emitting and persisting the completion event. If no start was recorded, use
  the completion timestamp as a fallback.
- Emit a complete start/completion lifecycle for subagent activity items.

## Testing

- Cover concurrent item timing, repeated starts, turn-boundary cleanup, the
  missing-start fallback, subagent activity, and persisted web-search events.

GitOrigin-RevId: e7cec9c4f1ef6ba67f287e81fb4d7d856fcf87a7
2026-07-25 16:06:54 +00:00
viyatb-oai
3a08af44b2 Handle exec-server network policy requests in the client (#35359)
## What changed

- Add client-side handling for exec-server network policy requests, including request validation, per-process decision routing, and allow, deny, or ask responses.
- Bound concurrent callbacks and fail closed when requests are invalid, exceed capacity, time out, or outlive their process session.
- Replace the callback opt-in flag with a launch-level `policyDecisionTimeoutMs` value and include transport overhead in the executor timeout.
- Preserve callback admission limits across connection recovery and clean up policy state when process startup is abandoned or a session ends.

## Testing

- Cover decision forwarding, invalid and excess requests, cancellation during process cleanup, abandoned starts, timeout propagation, and launch-config serialization.

GitOrigin-RevId: 6ee2a0139e0f8170cf1a5cdd646bd811b7d3c1f6
2026-07-25 16:03:00 +00:00
xli-oai
4c43465133 Skip plugin MCP filtering when no allowlists are configured (#35280)
## What changed

- Leave plugin MCP servers unchanged when every plugin requirement omits
  `mcp_servers`.
- Continue treating an explicitly empty `mcp_servers` allowlist as deny-all.

## Testing

Added coverage for both absent and explicitly empty plugin MCP allowlists.

GitOrigin-RevId: 80bb9aa6bbd779d669c573f63681dc46019b668c
2026-07-25 02:09:11 +00:00
rphilizaire-openai
c3e926e61c Trace remote exec-server connection setup (#35275)
## What changed

- Preserve the current tracing span and subscriber when lazy remote environment
  startup runs in a background task.
- Add spans for the remote connection, environment registry, Noise, and
  rendezvous WebSocket stages, including relevant environment and registration
  identifiers.
- Propagate the current trace context to environment registry connection and
  harness-key validation requests.

GitOrigin-RevId: 0044c3eb94d59c6a6b92752d3d372195be4adb81
2026-07-25 01:39:17 +00:00
rka-oai
25b6fc9bbc Include code-mode tool names in Responses Lite metadata (#35271)
## What changed

- Add `code_mode_tool_names` to Responses Lite turn metadata, mapping each normalized code-mode identifier to its structured `ToolName`.
- Reserve the metadata key against client overrides and omit it from metadata exposed to external MCP servers.
- Keep non-Lite requests and the legacy top-level client metadata unchanged.

## Testing

- Cover HTTP and WebSocket Responses Lite requests, including switching from a non-Lite model.
- Verify reserved-key handling and external MCP metadata filtering.

GitOrigin-RevId: b678afba13d57a91e26f5895aa37238fbb4cb276
2026-07-25 01:05:33 +00:00
viyatb-oai
63fe5a6b71 Harden network approval cancellation and concurrency (#35267)
## What changed

- Scope pending network approvals to a turn and execution while still coalescing duplicate requests within one execution.
- Fail abandoned approval owners closed, cancel denied executions, resolve any waiting requests, and cancel in-flight Guardian reviews when their owner is dropped.
- Serialize session policy updates with approval caches so concurrent allow and deny decisions cannot leave enforcement and cached decisions inconsistent.
- Give user approval requests and permission hooks unique per-execution identifiers.

## Testing

- Cover approval deduplication boundaries, abandoned-owner cleanup, cancellation outcomes, replacement requests, and Guardian cancellation events.

GitOrigin-RevId: 11e184dd1c70294a99581b6ff0d4b6607d9ea1d9
2026-07-25 00:10:48 +00:00
Channing Conger
cba0e2701c Allow disabling the in-process code-mode host fallback (#35266)
## What changed

- Allow `features.code_mode_host` to use a configuration table with
  `disable_in_process_fallback`. When enabled, failure to start the standalone
  host is returned as tool output instead of falling back to embedded V8.
- Preserve the existing fallback behavior by default and continue accepting the
  boolean feature toggle.
- Limit displayed host paths in spawn errors to 512 bytes while retaining the
  executable-bearing suffix and valid UTF-8 boundaries.

## Testing

- Cover boolean and table-based feature configuration, fallback-disabled host
  failures, and bounded ASCII and UTF-8 error paths.

GitOrigin-RevId: ab3d014e79054c2f8beef9a658915f01cca197b2
2026-07-25 00:01:43 +00:00
Channing Conger
a453588416 Sign bundled macOS helper binaries (#35264)
## Why

The macOS release workflow fetched `rg` and zsh while assembling package
archives, after the signing stage. This left the bundled helper executables
outside the workflow's signing and notarization checks.

## What changed

- Fetch, sign, notarize, and upload the pinned macOS `rg` and zsh binaries with
  the other release artifacts.
- Build package archives from those signed helpers via `--rg-bin` and the new
  `--zsh-bin` override.
- Verify the helpers' architecture, signatures, and absence of entitlements in
  the final package.

## Testing

- Cover the prebuilt zsh override and verify that package assembly preserves
  the supplied helper binaries.

GitOrigin-RevId: a3865c04fa2f0f4df32e627ee7202bc87bdc3241
2026-07-24 23:44:55 +00:00
jameswt-oai
0d2a0aa76b Track remote plugin IDs in skill invocation analytics (#35262)
## What changed

- Add `remote_plugin_id` to skill invocation facts and analytics event parameters.
- Propagate the ID for both explicit and implicit plugin skill invocations.

## Testing

- Cover explicit and implicit remote plugin skill invocations with analytics integration tests.

GitOrigin-RevId: 3e1d25b5ff88dcff9c2b6c9fe44bca97e8778221
2026-07-24 23:40:14 +00:00
jameswt-oai
07fd04abb1 Propagate remote plugin IDs to skill metadata (#35261)
## What changed

- Carry a plugin's local and remote identities together from plugin loading into
  `SkillMetadata`.
- Resolve remote IDs from the installed-plugin snapshot when available, falling
  back to persisted install metadata only when no snapshot exists.
- Include plugin identity in skill cache keys so identity changes refresh cached
  skill metadata.

## Testing

- Cover snapshot and persisted identity resolution, local marketplace isolation,
  cached skill refreshes, and propagation through plugin skill snapshots.

GitOrigin-RevId: aabeeb631a43361fe817358ace7f1ea8ba5db708
2026-07-24 23:36:11 +00:00
thomas
32329b289d Expose workspace plugin publish capability (#35254)
## What changed

- Add nullable `canPublishToWorkspace` metadata to plugin share contexts and `plugin/share/save` responses.
- Preserve the remote capability through catalog parsing and app-server responses so clients can decide whether to offer workspace-directory publishing.
- Document that clients should fail closed when the capability is unavailable.

## Testing

- Cover remote catalog parsing, share-save response propagation, and protocol serialization.

GitOrigin-RevId: b0346b3b330169838f800dfdf21dfa5db1a47f4d
2026-07-24 22:14:12 +00:00
Owen Lin
1811b67a84 Support ephemeral forks of paginated threads (#35251)
## What changed

- Allow `thread/fork` to create an ephemeral fork from paginated history when
  `excludeTurns: true` is set, and return an invalid-request error otherwise.
- Preserve the selected history and fork preview without creating a rollout
  path or exposing the ephemeral thread through `thread/list`.

## Testing

- Cover full-history and bounded ephemeral forks, active-turn boundaries,
  preview selection, model input, and thread listing behavior.

GitOrigin-RevId: 4c0d9739b3310d7d0d7389bec127045ac4f55b44
2026-07-24 21:58:52 +00:00
Celia Chen
89a3b89c4c Route MCP auth discovery through runtime HTTP clients (#35239)
## Why

MCP authentication checks need to use the same HTTP routing as the MCP
transport so servers reached through configured proxies can be discovered
reliably.

## What changed

- Resolve OAuth discovery and authentication status through each server's
  runtime HTTP client for both local and managed environments.
- Keep local discovery capped at five seconds while allowing explicit login
  requests to retain their requested timeout.
- Resolve refreshed MCP configuration and its runtime context from the same
  snapshot.

## Testing

- Cover OAuth discovery through an environment proxy and macOS system proxy
  resolution.
- Cover proxied MCP startup and runtime refresh with updated authorization
  headers.
- Verify capped and preserved OAuth discovery timeout policies.

GitOrigin-RevId: 461fb1d4786e547df8b1e6b2215a8ac40438a3aa
2026-07-24 20:04:23 +00:00
bwanner-oai
544007d006 Support the ent26 enterprise plan (#35238)
## What changed

- Recognize `ent26` in authentication, account protocol, backend rate-limit
  payloads, and generated app-server schemas.
- Treat it as an enterprise workspace plan for cloud-config eligibility and
  business-style usage-limit guidance.
- Cover token parsing, serialization, backend mapping, plan classification,
  cloud-config access, and usage-limit formatting with tests.

GitOrigin-RevId: 537d897c8b1d80bcdb66d0fd402563fbb8c5a277
2026-07-24 20:00:59 +00:00
Rasmus Rygaard
99744cfe04 Avoid persisting non-local threads for hook transcripts (#35221)
## Why

Hooks can only consume a transcript path when the thread has a local rollout.

## What changed

- Resolve the local rollout path before materializing the transcript.
- Return no transcript path for non-local thread stores without persisting them.
- Continue materializing lazy local rollouts before passing their path to hooks.

## Testing

Added session and hook tests covering both non-local thread stores and lazy local rollouts.

GitOrigin-RevId: c742984d146f7a3e1048b848198198fc7a64f4de
2026-07-24 17:41:39 +00:00
Owen Lin
05f000263b Support paginated thread forks (#35220)
## Why

`thread/fork` rejected threads using paginated history, so they could not use the same fork workflow as legacy threads.

## What changed

- Create paginated forks by referencing a frozen source-history prefix while persisting only child-owned records in the new rollout.
- Support latest, `lastTurnId`, and `beforeTurnId` boundaries, including inherited lineage, model-context reconstruction, interruption markers, and approval-reviewer inheritance.
- Make paginated reads and occurrence search traverse referenced history while excluding source records added after the fork.
- Coordinate fork preparation with archive and delete operations, and materialize compressed rollouts before they become fork references.

## Testing

Added app-server and thread-store coverage for boundary selection, active turns, inherited reads and search, compressed lineage, and concurrent source lifecycle operations.

GitOrigin-RevId: 66052d69517d7fb97a3b7817ab77a39c5ad995fd
2026-07-24 17:31:55 +00:00
jif
58b4277228 Refresh MCP config independently across threads (#35216)
## What changed

- Add a best-effort MCP configuration refresh that logs per-thread load errors and continues refreshing the remaining threads.
- Use the best-effort path after account or plugin changes before invalidating MCP runtimes.

## Testing

- Add a test confirming that a thread with a configuration load failure does not prevent healthy threads from receiving updated configuration.

GitOrigin-RevId: 34708d46f63fbe8617567ced16b4c199456ab078
2026-07-24 16:53:11 +00:00
jif
a177013eb0 Refresh managed MCP requirements for active threads (#35213)
## Why

MCP config reloads updated resolved server and authentication values, but did not
carry managed server constraints or plugin requirements into active threads.

## What changed

- Refresh MCP state from the typed thread config, including its managed
  requirements, while retaining the thread's user layer and unrelated settings.
- Apply the refreshed config directly through `CodexThread` instead of encoding it
  as a protocol operation.
- Re-evaluate effective plugins immediately after account changes so their MCP
  requirements reach existing threads.

## Testing

- Cover replacement and enforcement of managed server and plugin requirements.
- Verify refreshed MCP settings are installed without changing the active model.

GitOrigin-RevId: 3cf0d69f51ef4893a4d722ee803fcbfdf1cd959e
2026-07-24 16:35:43 +00:00
jif
000d2540ad Use current MCP authority for elicitation reviews (#35205)
## Why

MCP elicitation reviewers are reused across runtime refreshes, while an active
turn can retain the approval settings it started with. Reviewing against that
turn could therefore apply stale authority after session settings changed.

## What changed

- Read the latest published MCP runtime configuration when reviewing an
  elicitation, including the approval policy, permission profile, configuration
  layers, and reviewer selection.
- Apply `never` and granular MCP-elicitation policy decisions before routing an
  eligible request to Guardian.
- Keep MCP runtime startup registered for refresh invalidation through session
  creation.

## Testing

Added coverage that refreshes a running session and verifies the same reviewer
uses the latest authority for Guardian routing, denial, and empty-form
auto-approval.

GitOrigin-RevId: 826a157aa70fc8e3a9e3a14ecb0261bf7b63f63a
2026-07-24 15:16:16 +00:00
jif
3645a4397c Refresh MCP runtimes across thread startup (#35204)
## Why

MCP configuration can change while a thread is still starting, before it appears in the thread manager's loaded-thread list. In that window, invalidation could miss the new thread and leave it with a stale MCP runtime.

## What changed

- Centralize MCP runtime invalidation in `ThreadManager` so it refreshes loaded threads and marks in-progress thread startups for refresh after publication.
- Use the centralized invalidation path for account and plugin changes.
- Invalidate MCP runtimes after successful server and plugin OAuth logins.

## Testing

- Add a regression test that pauses thread startup, invalidates MCP runtimes, and verifies that the newly published thread refreshes its MCP projection.

GitOrigin-RevId: 8944f5a21816a1405e038a0d4c08b66362ea9368
2026-07-24 15:06:02 +00:00
jif
fe8500c0a0 Enable resource reads for explicit executor skills (#35198)
## Why

Executor skills that disallow implicit invocation are omitted from `skills.list`, so an explicitly selected skill did not provide the authority and package identifiers needed to read its referenced resources.

## What changed

- Add `resource_access` metadata to injected instructions for explicit-only executor skills.
- Teach the `skills.read` description to accept that metadata as well as values returned by `skills.list`.
- Keep discoverable executor skill instructions unchanged.

## Testing

Add an app-server integration scenario that selects an explicit-only executor skill, confirms it remains absent from `skills.list`, and reads a referenced file through `skills.read`.

GitOrigin-RevId: 97d3b93d1618c013363788452303c8a31e32cc56
2026-07-24 14:48:04 +00:00
jif
5f6a2c3adb Make the Apps recovery exposure test deterministic (#35196)
## Why

The Apps MCP background retry could complete before the test inspected the
initial sampling request, making the recovery timing nondeterministic.

## What changed

- Add a test-server gate that can hold and explicitly release the next
  successful Apps MCP initialization.
- Use a dedicated MCP mock server so the held initialization does not block
  model responses or app discovery.
- Assert that recovery uses exactly two initialization attempts and that Apps
  guidance and the deferred namespace appear only after the gate is released.

GitOrigin-RevId: deb21d4b41f353c3f84428616769af9faa1a0487
2026-07-24 14:41:21 +00:00
jif
634a998d8a Preserve output from hooks that exit before reading stdin (#35194)
## Why

A hook can exit successfully without consuming its JSON input. If it closes
stdin while Codex is still writing, the resulting broken pipe should not hide
the hook's exit status and output.

## What changed

Ignore broken-pipe errors when writing hook stdin and continue waiting for the
process result. Other stdin write errors remain failures.

## Testing

Add a cross-platform regression test that sends a large input to a
fast-exiting hook and verifies that its successful status and stdout are
preserved.

GitOrigin-RevId: e1b6e7c6ac5e39232e49b45245ea0df9d34d1fe6
2026-07-24 14:37:11 +00:00
jif
7c71783135 Expose executor skills through skill tools (#35184)
## What changed

- Add executor authority support to `skills.list` and `skills.read` for skills from selected capability roots.
- Allow `skills.read` to load package-relative resources referenced by an executor skill while keeping reads within the selected package.
- Paginate skill listings and resource contents with bounded response sizes and stale-cursor validation.
- Resolve executor filesystems per sampling step so skill tools use the active selected capability roots.

## Testing

- Extend the app-server executor skill test to list an executor skill, read its main `SKILL.md`, and read a paginated reference resource.
- Cover visibility filtering, metadata bounds, pagination, invalid cursors, package boundaries, and resource size limits.

GitOrigin-RevId: 1b5de95d5d1b9f79c34d2879d6e67f24401e9c29
2026-07-24 13:46:20 +00:00
jif
1a817bb95d Wait for reloaded worker completion in the resume test (#35175)
## Why

The follow-up request assertion can run before the lazily reloaded worker has
finished handling its task.

## What changed

Poll the reloaded worker's status with a two-second deadline, then inspect the
recorded request after the worker reports completion.

GitOrigin-RevId: 4d53cdc5e5ed53009b4445385f8e835e19be7b8b
2026-07-24 13:04:23 +00:00
felixxia-oai
5a1c54fc21 Compact host skill paths under metadata pressure (#35172)
## Why

Repeated absolute path prefixes consume the bounded skill catalog and can leave
less room for descriptions or later skills.

## What changed

- Track the discovery root for host skills and render shared roots as `r0`,
  `r1`, and similar aliases when doing so improves the bounded catalog.
- Include a skill-roots table and alias-aware usage instructions whenever
  compact paths are selected.
- Keep absolute, authority-aware locators when aliases provide no benefit or
  the catalog contains non-host skills.

## Testing

Added unit and extension coverage for unpressured catalogs, constrained shared
paths, mixed-source catalogs, and plugin-cache root selection.

GitOrigin-RevId: 4196df2c52be27338796065cb2e6434efcfac6d5
2026-07-24 12:58:41 +00:00
felixxia-oai
5dd992acd3 Route extension warnings to app-server threads (#35168)
## Why

Extension warnings need a stable thread target even when they are emitted outside an active turn.

## What changed

- Add `ExtensionWarning` and a dedicated `ExtensionEventSink::emit_warning` path with an explicit thread ID and optional turn ID.
- Deliver extension warnings as thread-scoped app-server `warning` notifications, preserving listener ordering and waiting briefly for a subscriber when no listener is active.
- Move skills warnings to the new path, limiting provider catalog warnings to four messages of 256 bytes each.

## Testing

- Cover warning routing, ordering, UTF-8-safe truncation, subscriber fallback, and invalid thread IDs.
- Verify skills warning bounds and app-server delivery of executor catalog budget warnings.

GitOrigin-RevId: 4dcb1ba7f17c0edb1a9d548f9568e0c734bffc15
2026-07-24 12:28:29 +00:00
jif
c8957bbf0f Encapsulate MCP refresh coordination (#35164)
## What changed

- Add `McpRefresh` to own the pending invalidation state and serialize MCP runtime refreshes.
- Keep cancellation recovery alongside the refresh state so a claimed refresh is marked pending again if publication does not complete.
- Update session initialization, shutdown, refresh paths, and tests to use the new abstraction.

GitOrigin-RevId: 915b28fa8b98a4f4c87ce8f2aa0d0ff99b57577d
2026-07-24 11:57:27 +00:00
jif
f201c30c52 Reconnect MCP servers on explicit refresh (#35151)
## Why

Runtime updates reuse unchanged MCP connections, so an explicit
`RefreshMcpServers` operation could leave existing server connections intact.

## What changed

- Mark explicit MCP refreshes to rebuild connections for every configured
  server on the next runtime replacement.
- Preserve the reconnect request if that replacement is cancelled before it
  finishes.
- Continue reusing connections for ordinary runtime updates.

## Testing

Update the transient Apps startup recovery test to wait for both turn
completion and the MCP server's ready event before checking the recovered tool.

GitOrigin-RevId: cb9fd978b3c07543058a2393a154fb70911531de
2026-07-24 10:22:58 +00:00
jif
6c729ef1c1 Refresh MCP runtimes when session auth changes (#35146)
## What changed

- Track the authentication state used by each published MCP runtime and mark the runtime dirty when the auth mode, account details, or token changes.
- Refresh plugin auth mode before evaluating pending MCP work, and rebuild the initial MCP projection if authentication changes during session startup.
- Carry one auth snapshot through runtime construction so plugin discovery and MCP connections use consistent credentials.

## Testing

- Add a regression test that replaces an API key, reloads authentication, and verifies that MCP refresh publishes a runtime using the new credentials.

GitOrigin-RevId: 219c2f7a157f53b5467116e18bfe70a8c3dca695
2026-07-24 09:50:41 +00:00
jif
ef2d3edb95 Prewarm MCP runtime updates in the background (#35144)
## Why

Changes to MCP inputs can require rebuilding the runtime before the next model
step. Start that work eagerly so the step is less likely to wait for it.

## What changed

- Add a per-session worker that prewarms dirty MCP state after configuration,
  authentication, or explicit refresh changes.
- Coalesce queued refreshes and always rebuild from the latest session state,
  while keeping exact model-step refreshes as the correctness path.
- Stop and join the worker during session shutdown.

## Testing

- Verify rapid refreshes skip superseded configuration and publish the latest
  state.
- Verify MCP-relevant policy changes mark the runtime for refresh.

GitOrigin-RevId: 045ed406caff97dcbb483bc183fd16eae0c7d7ad
2026-07-24 09:40:10 +00:00
TAFOYA-OAI
81da9deb06 Allow hosts to customize wait_for_environment descriptions (#35106)
## What changed

- Add `WaitForEnvironmentToolConfig` as thread extension data for overriding the
  model-visible tool and `environment_id` descriptions.
- Preserve the default descriptions when no override is provided or when the
  configured descriptions exceed the input or serialized tool-spec limits.
- Keep `wait_for_environment` availability gated by the deferred executor
  feature independently of whether a host override is present.

## Testing

- Cover default, custom, oversized, and feature-disabled tool configurations.
- Verify the custom descriptions in the deferred-environment integration flow.

GitOrigin-RevId: 6b49a73a434becd99ea5df911be53f3706a17c0a
2026-07-24 06:03:36 +00:00
jacobzhou-oai
a28374e0db Support Agent Plugins manifests (#35105)
## What changed

- Recognize root `plugin.json` files using the Agent Plugins 1.0 schema and map their portable metadata, `skills/`, and `mcp.json` into Codex plugin manifests.
- Apply Codex-specific apps, hooks, and interface settings from the inline `com.openai` extension, with `.codex-plugin/plugin.json` as a fallback overlay.
- Preserve legacy manifest precedence when a root `plugin.json` is unrelated, and reject unsupported Agent Plugins schema versions.
- Add a direct-child skill discovery mode that excludes nested skills and paths resolving outside the plugin root.

## Testing

- Cover manifest metadata, validation, extension precedence, legacy fallback, and direct-child skill path boundaries.

GitOrigin-RevId: eab24139f13a5cc5cb3ad3fb444d8e904511aca6
2026-07-24 05:59:16 +00:00
Channing Conger
f61b51ddd9 Support remote code-mode hosts in app-server (#35098)
## What changed

- Add `--code-mode-host ws://...` and `wss://...` support to `codex app-server`, gated by the `code_mode_host` feature. When omitted, app-server continues to start a local host.
- Share one remote WebSocket connection across the process's threads, using the configured HTTP client's proxy and TLS policy and preserving the existing framed host protocol.
- Reject invalid host URLs, bound WebSocket frame sizes, close connections cleanly, and return an error when a connection exceeds 1,024 pending delegate calls without disconnecting it.

## Testing

- Cover CLI validation, WebSocket protocol execution and shutdown, connection sharing across app-server threads, and delegate-call capacity recovery.

GitOrigin-RevId: 715e82d4d9db1e7e2f91b754a777dcab504e2ae4
2026-07-24 04:37:01 +00:00