Commit Graph
11645 Commits
Author SHA1 Message Date
jif e6de6a2423 Move Guardian review evidence into the reviewer extension (#57702)
## What changed

Move review evidence storage, authorization snapshots, sender exchange selection,
and bounded Node REPL evidence into `codex-guardian-reviewer`. Update core to
call or re-export these APIs while retaining host-specific context rendering and
capture-mode selection.

Move the existing Node REPL evidence and text truncation tests alongside their
implementations in the reviewer crate.

GitOrigin-RevId: d851cd353cf9f31eb47ce13f43f6f935dc2f5d93
2026-10-28 11:25:13 +00:00
jif 13b0217567 Move Guardian context policy and prompts into the reviewer extension (#57698)
## What changed

Move `GuardianContextMode`, parent compaction checkpoint policy, and reviewer instruction assembly into `codex-guardian-reviewer`. Export the conversation-history prompt and follow-up reminder from the same crate, and update core to use these shared definitions.

Keep session-specific authorization version lookup in core while preserving existing context selection, checkpoint validation, and prompt behavior.

GitOrigin-RevId: a4cadb6c8ad95e756467316b7d8658e8cd527b24
2026-10-28 11:02:51 +00:00
jif d09a5cd8cf Move Guardian review state into the reviewer extension (#57697)
## What changed

Move review state, fork history, checkpoint recovery bookkeeping, and Node REPL evidence admission into `codex-guardian-reviewer`. Expose helpers for session initialization and snapshot publication, and update core to delegate to them while preserving the existing review logic.

GitOrigin-RevId: 56d6a0124301a3c70908614d4bc3bfe970ac1c85
2026-10-28 11:01:32 +00:00
ioanbudea-OAI f021168bde Wait for turn profiles before asserting sampling counts in trace tests (#57692)
## Why

`ShutdownComplete` can arrive before detached task cleanup records and exports `codex.turn_profile` events, causing the turn phase trace test to read incomplete profile counts.

## What changed

Poll exported spans until the expected number of profiles is available, with a 10-second timeout, before asserting sampling request and retry counts for reply and interrupt cases.

GitOrigin-RevId: 43cdcdde71bbcd16ed2e6c8b2accaa2a5de03001
2026-10-28 10:13:29 +00:00
yansenzhou-oai 26ad281fd1 Remove detached delivery from review/start (#57667)
## What changed

`review/start` now supports only inline reviews on the supplied thread and returns that thread's id as `reviewThreadId`. Clients can omit `delivery`, send `null`, or specify `"inline"`; `"detached"` is no longer supported.

For a separate review thread, call `thread/start` followed by `review/start`. To preserve conversation history with custom review instructions, use `thread/fork` followed by `turn/start`.

Remove detached review execution and its app-server dependency on `codex-agent-extension`, and update the protocol schemas and generated clients. Preserve `ReviewDelivery.inline` as a Python enum member.

## Testing

Add a Python regression test verifying that inline review delivery parses as `ReviewDelivery.inline` and round-trips to the original JSON.

GitOrigin-RevId: ed16c5271c3315ae3afcb3ee78883ed421394b4d
2026-10-28 07:12:32 +00:00
Abhinav 154e8736a5 Support managed OpenTelemetry metadata and PEM client identities (#57658)
## Why

Managed OpenTelemetry requirements could not specify span attributes or tracestate metadata.

## What changed

- Accept `otel.span_attributes` and `otel.tracestate` in requirements, merge them by attribute or member field, and expose them through app-server configuration and requirements reads.
- Protect required entries and their ancestors from configuration writes while preserving unmanaged sibling values and their origins. For example, requiring `otel.tracestate.vendor.tenant` leaves `vendor.region` writable. Empty metadata maps impose no requirements.
- Select Rustls when configuring an OTLP HTTP client certificate and private key so PEM client identities are accepted.

## Testing

Add coverage for metadata precedence, effective configuration, field-level write protection, and preservation of unmanaged values. Add blocking and asynchronous HTTP client construction tests using generated PEM certificates and keys.

GitOrigin-RevId: ada6000cc5e575b9a33451ec4aa58b6686dc20f7
2026-10-28 06:24:24 +00:00
arnavpatidar-OAI 0736b26422 Fix trace exporter activation after account switches (#57657)
## Why

When the app server started with tracing disabled, its subscriber lacked the trace bridge needed to export spans after an account switch enabled tracing. Disabling tracing also left the previous global tracer provider installed.

## What changed

- Always install the reloadable trace layer so account switches can enable trace export without restarting the app server.
- Replace the global tracer provider with a no-op provider when trace export is disabled, including when all telemetry exporters are disabled.

## Testing

Add an app-server regression test that starts with tracing disabled, enables a requirements-managed trace exporter on account switch, and verifies export with the parent trace ID preserved. Add a provider unit test verifying that disabling telemetry stops new spans from recording.

GitOrigin-RevId: 3561b748a06e6d7c819f82d9db5889dafd124ad8
2026-10-28 06:22:58 +00:00
arnavpatidar-OAI bea47c06df Redact OTEL exporter headers in app-server config responses (#57654)
## Why

OTEL exporter headers can contain credentials. Configuration responses exposed these values in effective config, source layers, managed requirements, and write-override metadata.

## What changed

Replace header values with `[redacted]` across these responses for log, trace, and metrics exporters while preserving header names. Keep the original values available to runtime exporters, and redact them in debug output. Update protocol schemas and generated client documentation to describe the redacted values.

## Testing

Add coverage for effective config and source-layer redaction, managed requirements, and single and batch write-override metadata, including header names containing dots. Extend telemetry integration coverage to verify that runtime requests still carry the configured header value.

GitOrigin-RevId: ad24e8b91e615bd36c03c4c0ca205ac64bbd8cbf
2026-10-28 05:46:04 +00:00
Abhinav 727283cea5 Support managed OpenTelemetry configuration requirements (#57649)
## What changed

- Allow `requirements.toml` to manage OpenTelemetry logging flags, tool-result byte limits, environment, and log, trace, and metrics exporters.
- Apply higher-priority managed values over user configuration, replacing exporters atomically and warning when configured values conflict. Preserve unmanaged settings, including `span_attributes` and `tracestate`.
- Expose managed `otel` settings through `configRequirements/read`, apply them in `config/read` without ordinary field origins, and reject configuration writes that overlap managed fields.
- Distinguish omitted tool-result limits from explicit values while preserving the runtime default.

## Testing

Add coverage for requirement precedence, relative TLS paths, override warnings, managed write protection, effective configuration reads, and exporter serialization through the app-server API.

GitOrigin-RevId: 6a3343563bd3acb53a366ea6723684e3d0a4a01d
2026-10-28 05:11:45 +00:00
Sean Huang d63fe536ee Generate Rust bindings that match Bazel-built V8 archives (#57644)
## Why

Pre-generated bindings can disagree with native V8 layouts, including CppGC member storage and the inline typed-array size. Source archives need bindings generated with the same headers, defines, and target configuration.

## What changed

- Generate bindings through Bazel using the archive's C++ compilation metadata, and include them in Darwin and Linux release pairs and source builds.
- Select native Windows MSVC archives and matching bindings together with `--//:rusty_v8_from_source=true`, and generate target-specific Windows GNU bindings.
- Pin a corrected `rusty_v8` revision for Cargo and Bazel, and track native Windows LLVM tools and resources as action inputs so pin changes invalidate cached actions.
- Run release and canary Cargo smoke tests with explicit target triples, required Linux linkers, and `--include-ignored`.

## Testing

Add `codex-v8-poc` coverage for CppGC member size, alignment, tracing, and weak references; typed-array contents and backing-store promotion; and microtask queues across garbage collection and context reassignment. Enable the otherwise ignored CppGC ABI checks for Bazel source builds and staged release smoke tests.

GitOrigin-RevId: 9edfa057a0ef2e323543bb8132c070d336ded1b2
2026-10-28 04:48:23 +00:00
arnavpatidar-OAI 424916ee94 Add OpenTelemetry requirement types to the app-server protocol (#57638)
## What changed

Add optional `otel` requirements to `ConfigRequirements`, with types for logging controls, tool-result byte limits, environment, and telemetry exporters, including OTLP HTTP/gRPC headers and TLS settings.

Update the JSON schemas, precomputed exports, and generated TypeScript and Python bindings. The app-server requirements mapper currently returns `otel: None`.

GitOrigin-RevId: f73edc22efe1ab7fddf51419267daa6cf9fd34c5
2026-10-28 04:29:58 +00:00
Eric Traut 6ba3a84680 Restore spawned descendants when unarchiving a thread (#57635)
## Why

Archiving a thread also archives its spawned descendants, but unarchiving it previously restored only the parent.

## What changed

- Restore archived spawned descendants when handling `thread/unarchive`, including descendants archived independently of the parent. Skip active descendants and continue past descendant restoration failures; fall back to restoring only the parent if descendant discovery fails.
- Emit `thread/unarchived` for each successfully restored thread. Hold the thread-list mutation permit through archive and unarchive responses and notifications to preserve ordering with other list mutations.
- Add `ThreadStore::unarchive_threads` and share rollout discovery across the subtree in the local store.

## Testing

Extend coverage for subtree restoration, independently archived children, descendant restoration failures, and failed descendant discovery. Store tests cover skipping active descendants and restoring archived descendants without hydrating their metadata.

GitOrigin-RevId: c54ca099c92bcb2df5e595fa252d7fad7c018760
2026-10-28 04:05:31 +00:00
Felipe Coury 7ac6081623 Stop shipping codex-exec-server in release artifacts (#57628)
## What changed

- Remove the standalone executor from CLI and app-server packages, release binary lists, and Bazel runtime archives.
- Remove the package builder's `--exec-server-bin` option and `execServer` metadata, along with executor-specific installer checks, signing configuration, and package smoke tests.
- Keep the standalone executor available to build from source.

GitOrigin-RevId: ada4c92c092e3c7a3067129913e99f4606f7adc8
2026-10-28 02:54:18 +00:00
alexsong-oai 4aa14ea373 Show Bedrock setup for explicitly configured OpenAI providers (#57626)
## Why

Setting `model_provider = "openai"` hid the Amazon Bedrock setup option during onboarding, even though leaving the provider implicit allowed it.

## What changed

Allow the Bedrock setup wizard when the effective provider is `openai`, whether selected explicitly or by default. Preserve the existing feature, authentication, login-method, and embedded app-server requirements.

## Testing

Update onboarding tests to cover explicit OpenAI configuration, continued exclusion of custom providers, and the Bedrock sign-in option with configuration loaded from `config.toml`.

GitOrigin-RevId: 73ca1b43c3be6b098a56ac72f7831e5547947a66
2026-10-28 02:40:06 +00:00
Brent Traut 04e365c698 Release sampling prompts after stream setup (#57618)
## Why

Legacy notifications only need user text, but retaining the full sampling input keeps image and audio payloads alive while the response streams.

## What changed

Extract notification text from the first request attempt only when `notify` is configured, and retain those strings across retries. Consume and drop the prompt after setting up the response stream, excluding attachments and media wrapper labels from notification text.

## Testing

Extend the notification integration test to verify that `input-messages` contains only user text while the model request still includes image and audio attachments.

GitOrigin-RevId: af4653c0e7ac2bf7006f5ae5a82a3e724c30c734
2026-10-28 02:00:30 +00:00
cassirer-openai 68b67f0ff4 Preserve rollout tracing across sub-agent reloads (#57615)
## Why

Reloading an evicted sub-agent disabled its rollout tracing, leaving later turns out of the trace. Replacement Code Mode sessions could also reuse cell IDs from earlier sessions.

## What changed

- Reattach reloaded children to the root rollout trace and emit `ThreadResumed` without duplicating `ThreadStarted`.
- Reopen existing threads during replay, preserving their identity and history while clearing stale runtime cell and terminal process mappings.
- Allocate Code Mode cell generations across sessions for both gRPC and stdio hosts to prevent ID reuse after reload.
- Record an aborted trace when session startup fails before the session loop begins.

## Testing

Add regression coverage for child eviction and reload, including a failed reload, continued inference tracing, distinct cell IDs, and preserved mail and follow-up context. Extend replay tests for history preservation and reused runtime handles, and host tests for cell IDs across session replacement and reconnection.

GitOrigin-RevId: 6c146c04b5cda9295afb7d973c0d5474b363a822
2026-10-28 01:29:34 +00:00
Felipe Coury c0e88f3c04 Disable terminal status sequences on older VTE backends (#57612)
## Why

VTE versions before 0.54 lack the parser that safely ignores unknown OSC sequences. Terminal status reporting needs to account for the VTE backend even when the terminal identifies itself as GNOME Terminal or another application.

## What changed

- Track VTE backend versions independently of terminal application identity.
- Disable `OSC 7501` and `OSC 21337` status reporting when the detected VTE version is below 0.54. Preserve existing behavior for newer or unknown versions.
- Prefer `VTE_VERSION` over the terminal application version, treating empty or malformed values as unknown.

## Testing

Add regression tests for GNOME identity with VTE metadata, version precedence, and status protocol selection around the VTE 0.54 boundary, including unknown versions.

GitOrigin-RevId: 1aa57901d1b1457f9971c07cb51ec4554915ae3b
2026-10-28 01:04:30 +00:00
cooper-oai 9cce575134 Share runtime authentication with model providers and catalogs (#57607)
## Why

Model catalog refreshes need to use the same registered actor and credential owner as model requests when runtime authentication is enabled.

## What changed

- Add `ProviderAuthContext` to carry credentials and optional runtime authentication into model providers and catalog clients.
- Select runtime authentication independently for inference and catalog destinations. Reject unsupported OpenAI origins while preserving provider authentication for other destinations.
- Include API organization and project selectors in runtime registration. Reuse registered runtimes across projects within an organization and replace them when the organization changes.
- Preserve transport restrictions and account bindings, and strip sensitive headers on cross-origin redirects.
- Apply the catalog timeout to authentication and fetching while allowing credential refresh and registration to finish safely.

## Testing

Add coverage for runtime-authenticated catalogs, provider isolation, resource selection, gateway authentication, cross-origin redirects, and timeout recovery that preserves registration and refreshed tokens.

GitOrigin-RevId: c14f1a02159031ea0af1f9b26ea890f8dca7d6ad
2026-10-28 00:51:29 +00:00
dob-oai 939f5decb2 Add codex doctor --network-only for focused network diagnostics (#57606)
## What changed

Limit `--network-only` reports to effective configuration, network environment, provider HTTP reachability, and Responses WebSocket checks, skipping unrelated diagnostics such as database and MCP scans. Preserve configuration warnings and report configuration load timing.

If configuration loading fails, report the redacted configuration error and stop without probing guessed network targets.

## Testing

Add integration tests for check selection, recoverable configuration warnings, and configuration failures that send no probe requests or expose configuration values. Add snapshots for human-readable success and failure reports.

GitOrigin-RevId: 997616b6802813df751725f9538541c65bad7d71
2026-10-28 00:37:15 +00:00
goodman-oai e8e6a922c0 Support catalog headings for saved command-prefix notices (#57599)
## What changed

- Add `permissions.approved_command_prefix_saved` to model messages and use valid plain-text headings in saved-prefix notices, with or without full permissions instructions. Reject empty, oversized, control-character, and markup-like headings.
- Keep `Approved command prefix saved:` as the leading marker for older clients and recognize saved-prefix content kinds when trimming rolled-back context.
- Shut down analytics test exporters asynchronously and serialize workspace-switching tests that share authentication environment state.

## Testing

Extend coverage for heading validation, sparse wire values, single-notice emission, rollback with and without metadata, and saved-prefix behavior across model switches.

GitOrigin-RevId: a70175deca64a6339abac2fa69af970f470e3f4f
2026-10-27 23:53:34 +00:00
adams-oai 28cade4f5a Cache empty remote skill discovery with filesystem watches (#57598)
## Why

Repeated repository skill discovery performs remote metadata requests even when no `.agents/skills` directories exist. Reuse verified empty results to avoid those round trips while watching for changes that require a new scan.

## What changed

- Add the Linux executor capability `fs_watch_missing`, the `fs/watchMissing` request, and `fs/missingChanged` notifications.
- Register watches in the background and reuse empty results only after the executor acknowledges coverage. Key reuse by filesystem, working directory, and project root markers.
- Invalidate observations on relevant filesystem or mount changes, watch supersession, or connection loss. Clear cached observations on forced reloads and cache resets.
- Retain live discovery while registration is pending or watching is unsupported, unavailable, or cannot verify the observation.

## Testing

Add tests for empty-result reuse and invalidation, skill directory creation before watch acknowledgement, unsupported executors, idle WebSocket notifications, reconnection, case aliases, and bind mounts and unmounts. Include an ignored manual latency comparison for repeated empty remote scans.

GitOrigin-RevId: 3ad499decefb184a99c068afa01d0dcdd8605c7f
2026-10-27 23:53:09 +00:00
dob-oai b538d2b340 Preserve WebSocket probe evidence and redact diagnostic details (#57597)
## Why

Handshake probes can lose upgrade evidence when a subsequent read fails, and diagnostic output can expose URLs, server error messages, and close reasons containing sensitive values.

## What changed

- Retain successful upgrade status and allowlisted tracking headers, including on post-upgrade read failures.
- Return structured probe errors that distinguish typed TLS failures from failures with an unknown stage while preserving the underlying API error.
- Recognize empty close frames as immediate closes with code `1005`.
- Redact wire values from probe debug output and doctor error details, and remove URLs and raw errors from connection logs.

## Testing

Add local TLS and WebSocket fixtures covering certificate rejection, ordinary I/O failures, successful and rejected upgrades, immediate closes, malformed frames, header retention, and redaction. Add doctor output snapshots and error-detail redaction assertions.

GitOrigin-RevId: 1ee53720a7a752043943170d8e4da205ec4e55f3
2026-10-27 23:51:43 +00:00
Felipe Coury c8091aeeee Remove empty local staging routing files (#57593)
GitOrigin-RevId: 1bcab52db8803f167be921be94b12e77aa9eece3
2026-10-27 23:27:28 +00:00
Dmitriy Kovalenko cf2c04b325 Ship codex-exec-server in CLI and app-server packages (#57590)
## What changed

- Build and bundle the standalone executor in `bin/` for both package variants, and advertise its path through `execServer` in `codex-package.json`.
- Include the executor in Cargo and Bazel release packaging, macOS signing and notarization, and Windows signing verification. Preserve prebuilt signed binaries during packaging.
- Make installers detect a missing advertised executor while continuing to accept older packages without it.

## Testing

Add coverage for executor archive contents and executable permissions, signed binary preservation, and macOS entitlement verification. Add package smoke tests for initialization, version reporting, filesystem and process sandbox enforcement, and startup error parity with `codex exec-server`.

GitOrigin-RevId: 5c0027fc19f16cf9c2a5bb52dbd065a9776bc2af
2026-10-27 23:14:18 +00:00
Dmitriy Kovalenko a9ea49e78b Add a standalone codex-exec-server executable (#57589)
## What changed

Extract executor startup into `codex-exec-server-cli`, shared by `codex exec-server` and the new standalone binary. Preserve executor arguments, authentication, configuration overrides, and sandbox helper dispatch across both entry points.

Build the standalone binary with `cargo build -p codex-exec-server-cli --bin codex-exec-server` and run it with `codex-exec-server --listen stdio`.

## Testing

Add standalone CLI parsing and help coverage, plus an integration test for version reporting, stdio initialization, filesystem reads, process execution, and sandbox helper re-execution when supported.

GitOrigin-RevId: ab3a81c6b91b6f45e4d72d8add2e01af8372e97f
2026-10-27 23:13:53 +00:00
rhan-oai 37f199dab1 Add host-reserved V2 child creation APIs (#57586)
## What changed

- Add `CodexThread::create_child` to create an idle child from a live tool invocation using a host-reserved thread ID and controller.
- Add `prepare_child` and `ThreadManager::create_prepared_child` to capture inherited settings and fresh or forked history, then start the child on another manager even after the parent shuts down. Reject detached preparation when live bindings cannot be transferred.
- Add opt-in `HostToolInvocationLookup` to track live calls and reject duplicate active call IDs within a turn. Revoke invocation access when dispatch ends and clean up provisional children when startup fails or is cancelled.

## Testing

Add tests for invocation lifetime and call ID reservation, inherited policy and live bindings, detached startup with fresh and full history, and cancellation cleanup.

GitOrigin-RevId: 71f17ecb4cd7636517e675df59289a8e8c7105b8
2026-10-27 23:02:27 +00:00
Krish Chainani cb66dbecf2 Replace unavailable image references in model requests (#57585)
## Why

Image files can become unavailable between turns. Model requests should reflect their current availability while preserving the original references in saved history.

## What changed

- Add opt-in availability checks through `AttachmentStore::is_resolvable`, retaining references by default and on backend or access errors.
- Check distinct file IDs concurrently for each prepared request and replace confirmed-missing images with `[image unavailable]` in messages and tool outputs.
- Apply the same handling to compaction requests, with background image checks running outside the session lock without delaying foreground turn completion.

## Testing

Add unit tests and multi-turn scenarios covering placeholders, preserved history and annotations, concurrent deduplicated checks, backend errors, and nonblocking background compaction.

GitOrigin-RevId: ec98c7014c6e6b5063d87b943d2cd66a9ce7c1e3
2026-10-27 22:59:22 +00:00
Sean Huang 5078420b01 Preserve output boundaries through token truncation (#57584)
## What changed

Add `OutputBoundary` and token-budget formatting APIs that map item indices and UTF-8 text offsets to their positions after truncation. Normalize input positions, remap boundaries within omitted text, and keep end boundaries before generated omission notices.

Unify code mode output formatting: merge text-only output for truncation with a warning, and budget mixed text and audio in input order while preserving images and encrypted content. Accept owned output items to reuse allocations and move retained media without cloning.

## Testing

Add coverage for boundary normalization and remapping, UTF-8 offsets, zero and nonzero budgets, owned and borrowed output equivalence, and allocation reuse.

GitOrigin-RevId: 598407caa88b5a1f84130c4bc2273b85ab02f7f2
2026-10-27 22:56:23 +00:00
goodman-oai 133c11db43 Allow model catalogs to customize approval instruction headings (#57581)
## What changed

Add optional `request_permissions` and `auto_review_suffix` fields to catalog approval messages. Use them to customize the permission tool heading and introduce automatic review guidance while preserving the bundled instruction bodies and existing policy gates. Accept `request_permissions_tool` as a deserialization alias.

Limit headings to 500 UTF-8 bytes on a single line and fall back to bundled text for missing or invalid values. Complete catalog approval messages retain precedence.

## Testing

Add coverage for heading validation, serialization aliases, policy gates, fallback behavior, and complete-message precedence. Integration tests verify that model switches append the selected model's headings without rewriting history or repeating unchanged instructions.

GitOrigin-RevId: 3311591a464cc086783fe25271a352dd5a229790
2026-10-27 22:26:12 +00:00
ben zhang e343a12d5c Refactor HTTP client construction and request execution (#57575)
## What changed

Construct the direct transport explicitly in `HttpClient::new` and reuse `without_request_logging` in `new_without_request_logging`.

Bind awaited request results before matching them in transport execution and the Windows proxy retry path.

GitOrigin-RevId: 58b2524491db80ff4d7a954868c1e030a1643a9d
2026-10-27 22:03:01 +00:00
swastik-oai 83747ccc71 Add filesystem-free classification of intercepted patch commands (#57573)
## What changed

Add `MaybeApplyPatch::intercepts_command` to identify commands intercepted by exec without reading patch target files. Recognize explicit patch invocations, malformed patch bodies in those invocations, and implicit raw patches. Share implicit-patch detection with verified parsing, preserving its rejection of implicit invocations.

## Testing

Add a unit test covering explicit, implicit, and malformed patches, plus an unrelated `echo apply_patch` command, without a filesystem.

GitOrigin-RevId: 0bc9f63ca049094a2b17689f4f5585798792fe02
2026-10-27 22:02:35 +00:00
bkotsopoulos d03a6e1a6a Support Apps tool catalogs without shared snapshots (#57572)
## What changed

- Add `ConnectorRuntimeManager::without_shared_snapshot()` to keep connector catalogs local to each client and disable disk caching.
- Use the thread's own Apps discovery when snapshot sharing is disabled, preserving its catalog across turns.
- Expose `apps_tools_from_mcp_client()` to read a ready, unshared Apps client's tools without starting or waiting for discovery.

## Testing

Extend coverage for shared-cache eligibility and verify that an unshared thread waits for its own Apps discovery and uses its own tools on successive model requests, even when a peer finishes discovery first.

GitOrigin-RevId: d57ddacaede047e67c09d378c86c1aa3577ca56f
2026-10-27 22:01:13 +00:00
ztanner-oai 6562117a81 Preserve process output and control replies under backpressure (#57569)
## Why

Slow consumers can lose process output or block control replies when the in-process event queue fills. Descendants can also keep output streams open after the child exits, leaving clients unable to tell whether captured output is complete.

## What changed

- Require delivery of `process/outputDelta` and `process/exited` notifications, while allowing process request replies to proceed when event delivery is blocked.
- Exclude time spent delivering output to slow clients from the post-exit drain budget, and drain queued bytes after the deadline closes a stream.
- Keep draining after an output byte cap is reached so the child can finish writing; abort each stream's reader when its drain deadline expires.
- Add optional `outputDrainTimedOut` to `process/exited` and generated bindings. Report incomplete output separately from the child's exit code, treating a fully captured requested byte cap as complete.
- Deliver the exit notification before moving Windows console cleanup to a blocking task.

## Testing

Add regression coverage for full event queues, stalled consumers issuing process control requests, slow output delivery, inherited pipes, output caps, Windows console descendants, and compatibility with exit notifications that omit `outputDrainTimedOut`.

GitOrigin-RevId: 04cfeea5daa7c2b833cdec3f1fff7efeb4d1a86e
2026-10-27 21:51:50 +00:00
mandal-OAI 02bc25c89f Configure memory consolidation service tiers independently (#57568)
## Why

Memory consolidation inherits the session's service tier. Give background consolidation its own setting, defaulting to Standard.

## What changed

Add `memories.consolidation_service_tier` with a default of `"default"` and apply it to the consolidation agent. Normalize recognized tier aliases, including `"fast"` to `"priority"`, and expose the setting in the configuration schema.

## Testing

Add coverage for configuration parsing and alias normalization, Standard consolidation despite an Ultrafast session tier, and an explicit `"flex"` consolidation override.

GitOrigin-RevId: 58031ad56196152d212531d56e7fe9813f83317e
2026-10-27 21:51:26 +00:00
jamy-OAI f00c70f5d0 Allow catalog URL overrides for the built-in OpenAI provider (#57567)
## What changed

Allow `model_catalog_url` under `[model_providers.openai]` while preserving the built-in provider's identity, authentication, and inference routing through `openai_base_url`. Reject other non-default overrides and require an HTTPS catalog URL on an allowed ChatGPT host, without embedded credentials.

Apply the same catalog override merging when checking managed provider requirements for existing threads, preserving each thread's inference endpoint even if user defaults change.

Document the required Codex catalog format, credential forwarding, and existing discovery and access restrictions.

## Testing

Add coverage for allowed and rejected catalog destinations, preservation of built-in provider settings, and managed requirement changes. Add integration coverage for API key and ChatGPT authentication that verifies separate catalog and inference routing.

GitOrigin-RevId: 4d91ada518ebd2a09cbf6ded0ddf4b11c92b77dd
2026-10-27 21:50:08 +00:00
Benjamin Carlsson fab1a57545 Preserve rich composer content in Vim registers (#57564)
## What changed

- Retain mention targets, image paths, and collapsed paste contents when copying or deleting into the register. Pasting creates fresh element identities and image/paste labels.
- Preserve rich register contents across draft clears and composer replacement.
- Capture `Ctrl+Y` register contents for dot-repeat, restore exact mention bindings through undo/redo, and keep pasted rich objects atomic in Replace mode.

## Testing

Add composer tests and snapshots for repeated rich pastes, register handoff, undo/redo, Replace-mode Backspace, and selection replacement. Add a test ensuring register contents are omitted from debug output.

GitOrigin-RevId: d543d21fd542492af49cce01c2a673e6d3d01664
2026-10-27 21:13:45 +00:00
Brent Traut d93071fae8 Avoid retaining unneeded output items in HTTP response streams (#57563)
## Why

HTTP response streams retained copies of completed output items even when inference tracing was disabled, keeping their payloads alive until the response completed.

## What changed

Collect completed output items only when inference tracing or WebSocket last-response bookkeeping needs them. Make the last-response sender optional and create its channel only for WebSocket requests.

## Testing

Add a regression test that verifies an untraced HTTP stream releases a completed item's shared payload after delivery, while the response remains open. Update existing tracing and WebSocket bookkeeping tests for the optional sender.

GitOrigin-RevId: 7695534c6d00f3002005324c43c23bf733f01804
2026-10-27 20:42:47 +00:00
Benjamin Carlsson 33d306d457 Keep submitted prompts shaded when terminal colors are unavailable (#57554)
## Why

Terminals that do not answer the default-color probe lose the background shading on submitted prompts.

## What changed

Use an ANSI `DarkGray` background as a fallback. Keep the default text foreground when the background's RGB value is unknown, and preserve the red voice marker in terminal history and transcript selections.

## Testing

Add regression coverage for prompt shading without a terminal palette, voice marker colors under both history wrapping policies, and spoken-prompt selection contrast in compact and detailed transcripts.

GitOrigin-RevId: b8217a2ee1d37a2ea4a011faa75427c881202b82
2026-10-27 19:55:40 +00:00
Steve Coffey f088e0c4ff Allow replacing dynamic tools between model steps (#57553)
## What changed

Add `CodexThread::replace_dynamic_tools` to replace the tool catalog without starting a turn. Updates apply to subsequent model steps and future turns while preserving in-flight calls; an empty list clears the catalog.

Require host opt-in through `allow_persistent_dynamic_tool_updates` for persistent threads. Persist replacements before publishing them, restore the latest catalog on resume, and preserve replacements and explicit clears through compaction. Keep explicit resume overrides separate from the persisted catalog.

## Testing

Add coverage for pending calls during replacement, replacement and clearing across restart, compaction recovery, resume overrides, submission ordering after caller cancellation, host opt-in, and persistence failures.

GitOrigin-RevId: fd2634906895a9b72ae7892ddd9435dced45eccb
2026-10-27 19:50:41 +00:00
jimxie-oai 0d6838318f Expose and persist image generation IDs (#57552)
## What changed

Expose the backend-provided `generationId` on image-generation items and preserve it through legacy completion events, thread history reconstruction, and rollout migration. Default missing IDs to `None` for older history.

Update the generated JSON schemas, TypeScript types, and Python models to include the nullable field.

## Testing

Extend coverage for ID serialization round trips, completed-item notifications, persisted and resumed history, and legacy rollout migration.

GitOrigin-RevId: a7f06faa7ac6833417b257a535d2901c03b79135
2026-10-27 19:43:27 +00:00
rhan-oai aa854dabf5 Add model-gated literature search to standalone web search (#57542)
## What changed

Expose `literature_search_query` in standalone `web.run` when the active model lists it in `experimental_supported_tools`. Support query text, domain filters, and recency filters, and reject literature search calls for models without the capability.

Pass the active model information to extensions for each step and report literature queries as search actions in web search events.

## Testing

Add coverage for capability rejection, model-dependent schema exposure, app-server round trips with a turn-level model override, and a scenario that searches for a paper and opens the returned reference.

GitOrigin-RevId: 87ef1fadd80ca7bfc2a7642c4e443f9b9f2e0e00
2026-10-27 19:11:56 +00:00
Zack Brunson e3149ddb11 Preserve host-assigned user input IDs in Responses messages (#57538)
## What changed

Add optional `TurnInputRequest.user_item_uuid` and carry it through turn starts and steering to the recorded user message. When supplied, use `msg_input_<uuid>` as the Responses item ID; inputs without a UUID retain generated IDs. Raw response items ignore this field.

Add `ResponseItemId` helpers to construct and recognize the reserved `msg_input_` namespace.

## Testing

Add regression coverage for steered inputs with identical text and client IDs, checking that each supplied UUID survives recording and UI item IDs remain distinct. Add a scenario test verifying that the assigned ID reaches Responses and persists in subsequent request history alongside an identical ordinary prompt.

GitOrigin-RevId: 440e306bfdaa7facb69b21930c5244a83db2fdae
2026-10-27 19:00:03 +00:00
jif 4d3ed3f3b4 Release empty PID probe locks explicitly on Unix (#57533)
## Why

A concurrent fork can inherit a PID reservation probe's file descriptor and keep its lock held after the probe closes it, making a stale reservation appear active.

## What changed

Add a drop guard that explicitly unlocks empty PID reservation probes on Unix, including when inspection fails or is cancelled.

## Testing

Extend the duplicated-handle regression test to cover empty PID files, read errors, and cancellation alongside missing PID files. Verify that cancellation occurs while the lock is held and that subsequent status checks do not report an active reservation.

GitOrigin-RevId: 793569c9bcaca02900662a66c33aa48f2bebfd5e
2026-10-27 18:35:19 +00:00
swastik-oai 19d730175f Add isolated reviews to the guardian reviewer pool (#57522)
## What changed

Add `ReviewerPool::review_isolated` to run a review in a temporary session without reading or changing the reusable reviewer. Build the request context without a previous session and spawn without a cached snapshot.

## Testing

Add a test verifying that an isolated review receives no snapshot, uses a separate session, and preserves the prewarmed session for the next regular review.

GitOrigin-RevId: 6cceff0c399f30f3c3303b0bf5232c274c902e3a
2026-10-27 17:29:03 +00:00
ioanbudea-OAI 6574bcdba8 Defer synchronous Guardian heartbeat compression to preparation (#57519)
## What changed

Keep original scheduled messages and heartbeat provenance during synchronous transcript collection. Add `prepare_sync_context` to compress repeated heartbeat instructions across the complete collected transcript before selecting the requested suffix, preserving reference numbering in full and delta prompts.

Route synchronous reviewer prompts through this preparation step and reject composition of unprepared scheduled messages. Move transcript profiles and REPL evidence rendering into the preparation module. Asynchronous heartbeat compression remains in collection.

## Testing

Extend heartbeat transcript coverage to compare prepared full and delta prompts with the existing rendering and verify that direct composition rejects unprepared scheduled messages.

GitOrigin-RevId: c9824b8862021301a1f537a74f83bc7eb20aa0ad
2026-10-27 17:19:51 +00:00
Eric Traut 4c54667b40 Add profile and provider status line items (#57516)
## What changed

Add selectable `profile` and `provider` items to the TUI status line, including setup previews and theme colors. Render them as `profile: <name>` and `provider: <id>`, omitting the profile when unset and the provider until a thread is active. Accept `model-provider` as an alias for `provider`.

## Testing

Extend status line tests to cover omitted values, the active thread's provider, provider updates, and a selected profile. Update the setup popup snapshot to include both items.

GitOrigin-RevId: e7cbb7fb1e7017cfbd6ee71e1df7d0ddb1836ed4
2026-10-27 17:08:08 +00:00
iceweasel-oai 77f0cbfdd5 Limit MXC volume expansion probes to symbolic links (#57515)
## What changed

Use directory-entry file types when expanding volume-root grants, and resolve metadata only for symbolic links. Skip links whose targets cannot be resolved, while preserving grants for ordinary children and valid links.

## Testing

Extend the volume-expansion test to cover dangling and self-referential links alongside an ordinary file, a valid symbolic link, and an explicit deny grant.

GitOrigin-RevId: 8acb4072a1f5edd4351738b5780ac659fdf94f01
2026-10-27 17:07:43 +00:00
dhruvgupta-oai d257beb16a Add experimental ChatGPT workspace switching to app-server (#57514)
## What changed

- Add `accountSession/list` and `accountSession/switch` for the active managed ChatGPT login, with optional workspace membership refresh.
- Validate membership and workspace policy, pause new turns, and unload running threads before switching credentials. Notify clients with `thread/closed` and `account/updated`; selecting the current workspace leaves threads running.
- Support browser sign-in for SSO through `allowBrowserLogin`, binding the callback to the requesting login and workspace. Require a separate sign-in for government workspaces.
- Preserve the selected workspace across token refresh and conditionally restore the previous workspace if routing validation fails. Guard credential writes against concurrent login or logout changes.

## Testing

Add app-server and auth tests covering workspace switching, credential preservation, policy and identity rejection, conditional rollback, stale sessions, and SSO callback validation.

GitOrigin-RevId: 1234abc33b71e69b66318da3e201fccc08867906
2026-10-27 17:04:16 +00:00
jif 5a361b5596 Explicitly unlock daemon PID reservation probes on Unix (#57512)
## Why

A concurrent fork can inherit a PID reservation probe's file descriptor and keep its lock alive after the probe closes it. This can make the app-server daemon appear to be starting even when no live startup reservation exists.

## What changed

Explicitly release the probe's lock on Unix before returning that no reservation is active, and propagate unlock failures.

## Testing

Add a regression test using a duplicated file handle to simulate fork inheritance and verify that the probe leaves the daemon inactive. Extend coverage to confirm that a held reservation still reports `Starting` when the PID file is missing, and include pruning results in release-retirement assertion failures.

GitOrigin-RevId: ecc58df1fe5cadecb6ed658352f1300c39237358
2026-10-27 16:50:34 +00:00
jif 73bdd06fed Extract Guardian planned-action assembly into the reviewer crate (#57509)
## What changed

Move planned-action construction from the core Guardian prompt builder into the exported `codex_guardian_reviewer::build_guardian_planned_action` helper. Keep the existing action kinds, MCP tool and connector descriptions, and reason selection unchanged.

GitOrigin-RevId: 119323523ed2e199c998c1139fb8e6255bc730d9
2026-10-27 16:37:01 +00:00