Commit Graph

10919 Commits

Author SHA1 Message Date
Charlie Marsh
55db7e8c88 Avoid cloning turn items for app-server active turn lookups (#46305)
## Why

App-server callers that only need the active turn ID or its presence currently create a full turn snapshot, unnecessarily cloning its items.

## What changed

Expose `ThreadState::active_turn_id()` and use it for interrupt validation, elicitation turn ID fallback, and teardown and shutdown logging, preserving the existing turn selection behavior.

## Testing

Update the interrupt integration test to wait for `turn/started` instead of a fixed delay and verify that an incorrect turn ID is rejected before successfully interrupting the active turn.

GitOrigin-RevId: 4a030655fbc4d229809cf13f80c3d7f788f19c13
2026-09-17 21:25:34 +00:00
Ian MacLeod
7a3c5a83e4 Serialize release asset uploads to avoid secondary rate limits (#46303)
Upgrade `softprops/action-gh-release` from `v2.6.1` to `v3.0.3` and enable
`preserve_order` in the Rust release workflow to upload assets serially,
following GitHub's recommendation to avoid concurrent REST API requests.

GitOrigin-RevId: d1fbbbb01e191967be303040cfa2949146a2292d
2026-09-17 21:15:36 +00:00
Sean Huang
ea218f5cd8 Validate network socket policies using the executor OS (#46302)
## Why

A controller and its executor can run different operating systems. Validating socket paths against the controller's OS can reject absolute paths that are valid on the executor, such as Windows paths on a Linux controller.

## What changed

- Thread `NetworkProxyExecutorOs` through network policy validation, proxy construction, and policy updates.
- Require allowed socket paths to be NUL-free and absolute for the executor OS, while preserving deny entries unchanged.
- Accept either Unix or Windows absolute syntax when executor metadata omits the OS, then validate against the executor's own OS at launch.
- Keep native path normalization and socket support checks at execution time.

## Testing

Add coverage for cross-platform absolute path syntax, invalid allow entries, preserved deny entries, and remote policy round trips that retain executor semantics through domain edits and proxy construction.

GitOrigin-RevId: 1ebc09cbce7138f60ec5fd62875591a3df52d067
2026-09-17 20:59:55 +00:00
alexsong-oai
8f73cdee45 Centralize OAuth login and refresh handling with safer diagnostics (#46300)
## Why

Login and token refresh have separate OAuth request and error handling. Token endpoint errors can echo credentials, and JSON decoding errors can expose token values in diagnostics.

## What changed

- Extract authorization URL construction, callback validation, PKCE, token grants, and error handling into a shared `oauth` module in `codex-rs/login`.
- Route authorization-code exchange and ChatGPT refresh through `OAuthClient`, retaining form and JSON encoding respectively and caller-owned HTTP and credential recovery policies.
- Redact echoed request secrets from rejection details and request IDs, redact sensitive transport URL fields, and replace token decoding errors with a generic error. Preserve original error codes for refresh failure classification.
- Keep callback state validation ahead of codes and provider errors, with the existing onboarding suffix handled by the login server.

## Testing

Add coverage for PKCE binding, request encoding and headers, callback state rejection, credential redaction, oversized or unreadable error bodies, and preservation of stored and cached credentials after transient refresh failures.

GitOrigin-RevId: d0a9583b99e24f5aafb751acd1e7200e2261a0e4
2026-09-17 20:17:06 +00:00
rhan-oai
3e581ebca8 Support catalog descriptions for all multi-agent V2 tools (#46297)
## Why

Model catalog description overrides only covered `spawn_agent`, leaving the other multi-agent V2 tools with fixed descriptions.

## What changed

Extend `model_messages.tools.multi_agent` description overrides to `send_message`, `followup_task`, `wait_agent`, `interrupt_agent`, and `list_agents`. Resolve each override by tool name across namespaced, plain, and Code Mode exposure.

Missing or null descriptions retain bundled text; empty strings suppress static text without disabling tools. Preserve `spawn_agent` runtime guidance, tool schemas, and execution behavior. Descriptions follow mid-turn model changes.

## Testing

Expand integration coverage to all six tools, including missing, null, empty, and sparse overrides; plain, namespaced, and Code Mode exposure; unchanged V1 behavior; and mid-turn model changes.

GitOrigin-RevId: a2c47eb8efb28c3eeebcc6482e36c188c38a6dd1
2026-09-17 20:05:47 +00:00
Charlie Marsh
17baabd01b Separate thread startup metadata from replay history (#46294)
## Why

`CodexThread` retained the full `SessionConfiguredEvent`, including initial replay messages, and cloned it even for callers that only needed thread or session IDs.

## What changed

Store `ThreadStartupMetadata` without replay history and expose it by reference through `startup_metadata()`. Update callers to read IDs from this metadata. When rejoining a running thread, rebuild the startup response using the supplied resume history for `initial_messages`.

## Testing

Extend the resume test to verify that rejoining reuses the loaded thread, preserves startup metadata, and still returns the original replay messages as a prefix.

GitOrigin-RevId: 9d656063088c28f091d29e5862e4b9d894b7642c
2026-09-17 19:55:20 +00:00
Adam Perry @ OpenAI
47fc8d661e Route skill discovery and loading through EnvironmentAccess (#46293)
## What changed

Use `EnvironmentAccess` for skill discovery, environment skill loading, and plugin namespace resolution, replacing direct `ExecutorFileSystem` calls with explicit `None` sandbox arguments.

Wrap existing host and executor filesystems with `FileSystemEnvironmentAccessor::unrestricted` to preserve their current access behavior. Update discovery, loading, and namespace tests to use the same adapter.

GitOrigin-RevId: d68168cc0ee19dc303ef4ee726cf1de1a8db81e0
2026-09-17 19:52:03 +00:00
felixxia-oai
93321c88d8 Preserve selected reasoning effort for synchronous Guardian reviews (#46292)
## Why

Synchronous Guardian reviewers need to use their selected request-level reasoning effort even when managed requirements enable `reasoning_effort_override` and the parent history contains effort updates.

## What changed

Disable reasoning-effort overrides for synchronous Guardian sessions and use the same decision for request filtering, effort pinning, and update injection. Reviewers omit inherited configuration updates from requests without changing saved history or appending new effort updates.

## Testing

Add regression coverage for both current and legacy Guardian session sources with managed overrides enabled. Verify that the parent retains its pinned effort, reviewer requests follow selected `low` and `high` efforts, and inherited updates remain in saved history.

GitOrigin-RevId: 3a635dbdc613ea72f7a96fc96bb386e4ac7994c3
2026-09-17 19:44:08 +00:00
felixxia-oai
47915cee7a Filter saved reasoning overrides from requests when disabled (#46291)
## Why

Resuming a thread after disabling reasoning effort overrides still sent saved `configuration_update` items until compaction. Disabling the feature should also apply to requests built from existing history.

## What changed

Pass the `ReasoningEffortOverride` feature state into `ModelClient` and filter `configuration_update` items from request input when disabled. Preserve persisted history and other input items while using the request-level reasoning effort.

## Testing

Add regression coverage for resumed threads, compaction, and WebSocket warmup and turn requests. Verify that saved updates remain in history and `agent_message` items remain in request input.

GitOrigin-RevId: aac3257da1ca38a0744807c4f7cb12565bd7fe53
2026-09-17 19:42:56 +00:00
cassirer-openai
0fd1cd8d99 Add opt-in overhead timing to code-mode responses (#46288)
## Why

Code-mode responses show host duration without exposing time spent outside the host, including app-server waiting.

## What changed

- Add `features.code_mode.experimental_show_cell_overhead`, disabled by default, to show handler duration, host duration, and their difference in `exec` and `wait` response headers.
- Reuse the completed handler measurement from tool-call logging, excluding dispatch waiting, and capture it even when logging is disabled.
- Preserve the existing timing format when the option is disabled or host timing is unavailable, and preserve boolean feature toggles when merging nested code-mode configuration.

## Testing

Add coverage for timing headers, zero and missing host measurements, negative rounding differences, content preservation, and configuration merging. Extend app-server tests across gRPC and stdio to verify timing includes post-host elicitation waiting, and add a response snapshot for successful execution and a failed wait.

GitOrigin-RevId: 929b84784d9c6077cf2b5927a90bd2d5f3870078
2026-09-17 19:34:45 +00:00
acrognale-oai
0a5b999169 Connect app-server workspace discovery to model request routing (#46281)
## Why

Model requests need the selected workspace's routing constraints before sending content. A missing cached route cannot establish that a custom ChatGPT-auth destination is independent of the workspace.

## What changed

- Register the account processor as the workspace routing resolver for Responses HTTP, compaction, and WebSockets, enabling origin selection and routing headers while preserving API paths and rejecting routed HTTP redirects.
- Share concurrent discovery by auth generation, workspace, and backend configuration. Recover from discovery-time `401` responses while allowing token refreshes for the same auth owner.
- Require successful discovery before classifying custom destinations as independent, and require a new thread when a workspace-bound session's bootstrap origin changes.
- Refresh managed requirements using retained session configuration without fetching thread configuration again. Return typed routing errors without account or backend details.

## Testing

Extend coverage for discovery-time token refresh, retained provider definitions under managed requirements, and specific invalid-routing error categories.

GitOrigin-RevId: 090cda70daa91ee8acfbc973699d028111e54125
2026-09-17 19:12:42 +00:00
jif
d7f8e48d7d Preserve Guardian's reusable history prefix across approval requests (#46279)
## Why

Changing previous review decisions or trusted tool and skill evidence should not invalidate the reusable conversation history prefix.

## What changed

Move previous reviews, trusted tool metadata, and trusted skills after the transcript and permission context in Guardian context composition. Keep them before the current action, with history remaining user-role evidence.

## Testing

Add a regression test that varies reviews, tools, skills, and actions while asserting an identical history prefix, both with and without retained context. Update the Guardian v2 integration test to verify the separate transcript and action messages.

GitOrigin-RevId: 8f5b570b17b6715beac526afff7d52139d13a3ad
2026-09-17 18:56:26 +00:00
Adam Perry @ OpenAI
3ed49879c8 Reduce R2 release upload concurrency and enable standard retries (#46278)
## Why

The release publisher uploads objects in parallel. Serializing transfers within each object avoids additional concurrency that can trigger R2 throttling.

## What changed

Configure the AWS CLI to use the `classic` S3 transfer client with `max_concurrent_requests` set to `1`. Enable `standard` retry mode with a maximum of six attempts for R2 release publishing.

GitOrigin-RevId: a029341e37ea36cfd077d13ff929963e3f697542
2026-09-17 18:49:47 +00:00
iceweasel-oai
8b78600dc8 Enable MXC selection through Windows sandbox configuration (#46271)
## What changed

- Accept `windows.sandbox = "mxc"` and preserve the selected backend through environment configuration, command execution, patch writes, and sandbox metadata.
- Treat MXC as enabled in the TUI and report Windows sandbox readiness as `ready`, avoiding legacy setup prompts.
- Keep `allowed_sandbox_implementations` scoped to the legacy elevated and unelevated backends without restricting MXC.
- Default `windows.sandbox_private_desktop` to `false` for MXC while retaining `true` for legacy sandboxes.

## Testing

Add coverage for MXC configuration precedence, legacy requirement handling, sandbox selection, and TUI state. Add a Wine integration test that verifies command and patch routing fails when native MXC is unavailable and reports `windows_mxc` in turn metadata.

GitOrigin-RevId: e2162447d0750f60753864c92a20e02a7f297bca
2026-09-17 18:20:28 +00:00
Adam Perry @ OpenAI
3d3ae4965a Add filesystem accessors bound to environment permissions (#46268)
## What changed

Add `EnvironmentAccess` and `FileSystemEnvironmentAccessor` to expose filesystem operations with a captured sandbox configuration, without allowing consumers to extract the filesystem or select another sandbox. Include a text-reading helper and an explicit unrestricted constructor.

Provide opaque cache keys that compare filesystem identity and captured permissions without keeping the filesystem alive. Allow opened read streams to outlive the accessor. Export the new APIs through `codex-exec-server` and add `Environment::filesystem_ref()` for borrowing the shared filesystem.

## Testing

Add local and remote coverage for text reads through `EnvironmentAccess`, streams surviving accessor disposal, and cache keys distinguishing changed permissions or a replacement filesystem.

GitOrigin-RevId: 4f6787ed9ba0fb94adea2f31716c4d3132fed07d
2026-09-17 17:59:19 +00:00
Eric Traut
608825d511 Expand Unicode math rendering with accents, symbols, and delimiters (#46266)
## What changed

- Render `\hat`, `\bar`, `\tilde`, `\vec`, `\dot`, and `\ddot` on single visible graphemes, preserving support for following subscripts and superscripts.
- Add symbols for physics, relations, sets, logic, arrows, and integrals, including `\hbar`.
- Support named delimiters, including with `\left` and `\right`, plus angle brackets written as `\left<` and `\right>`.
- Preserve raw math when accent arguments are empty, invisible, or span multiple graphemes or layout rows.

## Testing

Add snapshots for accents, symbols, named delimiters, and the Schrödinger equation, plus rejection tests for ambiguous accent arguments and unsupported delimiters.

GitOrigin-RevId: 9dd4883cdf187835a4b4e873886c4299de488705
2026-09-17 17:49:10 +00:00
surajs-oai
16f49ccd7f Relax delegation guidance in the v2 spawn_agent description (#46264)
Remove the default description's instruction to spawn agents only for concrete,
bounded subtasks that can run independently alongside useful local work.

GitOrigin-RevId: cbceed13c738b0f84fb90c053fa9285f541d578b
2026-09-17 17:36:51 +00:00
Krish Chainani
96aca987f7 Preserve uploaded image file IDs in user message display history (#46258)
## Why

Image preparation replaces uploaded images with file references in model history, but user message events still retain the original local paths or inline image URLs. Live and persisted display history should carry the prepared file IDs as well.

## What changed

- Prepare images before emitting user message events, and copy uploaded file IDs into the corresponding user inputs.
- Track original input positions through content expansion so failed image reads, omitted inputs, and duplicate URLs do not misassociate images.
- Preserve text spans, image detail settings, and inputs without a prepared file reference.

## Testing

Add a protocol test for image position mapping and an integration test covering file IDs in model requests, live user message events, and persisted display history, including failed images and duplicate URLs.

GitOrigin-RevId: 55e7ab97925b5db049c5c2403d90349635eee740
2026-09-17 17:17:10 +00:00
felixxia-oai
fcf05456bb Publish Guardian cached scores and coverage atomically (#46245)
## Why

Asynchronous score publication updated the risk score, authorization, and tool-call coverage separately. Approval checks could therefore read inconsistent evidence when deciding whether to reuse a cached score.

## What changed

Keep Guardian's cached score and observation state under one lock, and use consistent snapshots for approval checks. Publish successful scores together with their authorization and classified tool-call index. Preserve timestamp ordering, fail-closed precedence on timestamp ties, and per-call oversized-action tracking.

## Testing

Add regression coverage for rejected delayed results and timestamp ties. Add a gated integration test showing that a delayed score becomes stale after intervening tool calls, while a sufficiently fresh score permits cached approval.

GitOrigin-RevId: 8df6fafd5e0ee59aa0f78f541eac562efce3d4d0
2026-09-17 16:06:11 +00:00
chess
2833985d88 Repair Windows sandbox access to existing runtime children (#46241)
## Why

A runtime directory can have read/execute access while existing files and subdirectories lack inherited permissions. Checking only the runtime roots leaves those children inaccessible to sandbox users.

## What changed

- Walk the Codex app runtime tree and add missing read/execute grants for the sandbox group, validating access after changes.
- Use `GRANT_ACCESS` to preserve existing grants and skip additions that could override deny entries, including inherited denials for other trustees.
- Skip reparse points and trees with reparse-point ancestors, tolerate disappearing paths, and report repair failures through setup logging and refresh errors.

## Testing

Add Windows regression tests for repairing children beneath an already-readable root, repeated repairs, preserving read/write denials and other trustees' inherited file denials, avoiding write or ACL-management grants, and leaving junction targets untouched.

GitOrigin-RevId: 93d55dd9fca2b24eac157ae9be505982d07dd9b9
2026-09-17 15:44:11 +00:00
zm-oai
32b54cffdd Prefer the provisioning service for automatic Windows sandbox setup (#46239)
## What changed

- Use the installed provisioning service regardless of the onboarding feature gate. Fall back to the elevated helper only when the service is unavailable; propagate service errors.
- Pass the effective proxy settings and filter listener ports to match them, including when preserving saved settings.
- Remove stale credentials before repairing missing, disabled, or password-expired sandbox accounts so older services cannot mistake them for completed setup.
- Select helper fallback when workload-identity environment variables are present, since service requests do not carry that environment. Continue rejecting helper fallback for registered Core.

## Testing

Extend account-repair tests to cover stale credential removal, missing and disabled accounts, and repeated setup checks. Add subprocess tests for workload-identity routing with and without registered Core.

GitOrigin-RevId: 1041ae76e9b0893ad60f30a5cdc506748be52552
2026-09-17 15:35:39 +00:00
chess
c11fdc944f Improve Windows sandbox error details and registry cleanup (#46237)
## Why

Provisioning errors omitted underlying causes, and removing a legacy installation record could leave an empty registry key behind.

## What changed

- Include error chains in provisioning responses and failure logs, retaining control-character replacement and the response byte limit.
- Attempt to delete the legacy installation registry key after removing and flushing its record, preserving any remaining values or subkeys.

## Testing

Add a regression test for nested error causes, control-character replacement, and UTF-8 truncation within the response byte limit.

GitOrigin-RevId: 8fccfb49c708be5f5d5be7180289cb74a66498a2
2026-09-17 15:28:20 +00:00
Steve Coffey
7abf2a3b5c Preserve configured Flex tiers without catalog or fast-mode support (#46230)
## Why

An explicit `service_tier = "flex"` could be dropped when fast mode was disabled or the model catalog did not advertise Flex, even though Flex is an API request option.

## What changed

- Preserve configured `flex` through core session settings, TUI tier resolution, and request construction regardless of fast-mode or catalog support.
- Omit `service_tier` from Amazon Bedrock requests, including with custom catalogs, because Bedrock only supports the implicit default tier.

## Testing

Add regression coverage for Flex configured at startup or through thread settings, connected thread startup, and TUI turn submission. Update review coverage to expect Flex with fast mode disabled, and verify that both Bedrock providers omit `service_tier`.

GitOrigin-RevId: 98f2761bdd780603839ebfec75cb983a5d55e554
2026-09-17 14:47:42 +00:00
jif
e269f2164c Include sender user messages in Guardian delegation reviews (#46179)
## Why

A delegated task can omit restrictions from the sender's user messages. Guardian needs that context when reviewing actions in the receiving thread.

## What changed

- When thread-owned Guardian context is enabled, capture up to three recent local user messages when a `send_message_to_thread` delivery from `codex_app` or `codex_tui` is accepted.
- Provide a bounded snapshot to synchronous and asynchronous reviewers, with explicit notices for unavailable evidence and a reminder that historical context does not transfer permission. Keep the snapshot out of the worker prompt.
- Retain snapshots with their deliveries across replay, compaction, and rollback, and strip them from forked agent history.

## Testing

Add coverage for reviewer-only visibility, missing sender provenance, context-budget preservation, checkpoint replay and rollback, fork isolation, and input serialization that rejects harness metadata.

GitOrigin-RevId: 3870ba762aa81689713b56d4cb3b98566bffed88
2026-09-17 10:02:38 +00:00
Eric Traut
b0659c5386 Record daemon startup and update telemetry with consent handling (#46126)
## Why

TUI startup metrics report the selected app-server mode before a connection succeeds, which can misrepresent embedded fallback or failed startup. Daemon startup and update actions also need distinct outcome observations.

## What changed

- Record `codex.tui.start` once after the first connection attempt, using the actual mode or `unconfirmed`, and include daemon selection and auto-start tags.
- Add `codex.daemon.start` for TUI auto-start and `codex.daemon.update` for foreground CLI updates and TUI update handoffs, using existing analytics consent and identity handling.
- Report TUI handoffs as `handoff_requested` and suppress duplicate child reporting. Remove the suppression flag when spawning long-lived daemon processes.
- Tag daemon settings by enabled state and explicit presence, without exporting setting values or contents; report invalid or unreadable settings as `unknown`.

## Testing

Add coverage for analytics defaults and explicit consent overrides, unconfirmed CLI updates, settings presence, and exactly-once launch observations. Extend the worktree TUI test to check startup tags and a single update handoff observation.

GitOrigin-RevId: 176d2ee594f930033fa1ece55d4c1c9603dbbc16
2026-09-17 05:26:45 +00:00
open-matt
1bd1bfa7ca Fix daemon socket isolation checks for private tmp mounts (#46125)
## Why

Private `/tmp` bind mounts can leave hidden entries in `/proc/self/mountinfo`, causing the Linux sandbox to reject layouts that safely isolate daemon sockets. The proc-mount preflight also needs the main sandbox's WSL masks when checking aliases.

## What changed

- Identify the opened socket directory's mount using `fdinfo`, with a `statx` fallback, and follow its mount ancestry to distinguish hidden paths from exposed aliases.
- Accept safe private and stacked mounts while rejecting covered mounts, exposed aliases, and nested mounts. Retain conservative checks when no mount ID is available.
- Preserve WSL interop and WSLg masks in the proc-mount preflight.
- Heap-allocate large lifecycle futures in the TUI approval-gated MCP tool test to reduce Windows test-thread stack usage.

## Testing

Add mount-layout regression cases and a namespace integration test that verifies daemon sockets remain inaccessible under private `/tmp`, unrelated sockets remain reachable, and an exposed alias prevents startup. Add a preflight test for preserving WSL masks.

GitOrigin-RevId: 289b4446ba7776a7dd57ef5ff09e87bda19b069c
2026-09-17 05:23:55 +00:00
rhan-oai
c5d079470e Allow model catalogs to override the V2 spawn_agent description (#46123)
## What changed

Read the static V2 `spawn_agent` description from `model_messages.tools.multi_agent.spawn_agent.description`, independently of the runtime tool namespace. Missing or null values retain the bundled description; an empty string suppresses it.

Preserve generated model guidance, local usage hints, and tool parameters when applying an override. Resolve the description from the active model so it follows mid-turn model changes.

## Testing

Add coverage for sparse and empty catalog values, preservation of generated context and outbound tool schemas, and description updates after mid-turn model changes.

GitOrigin-RevId: 96cfa180f8f374dc868e4fabc337e49380e405da
2026-09-17 05:17:31 +00:00
Adam Perry @ OpenAI
a4ee536f01 Route filesystem reads and writes by their own sandbox permissions (#46122)
## Why

Filesystem reads previously required a sandbox whenever writes were restricted, even with full-disk read permission. This made permitted reads depend on sandbox availability.

## What changed

- Select sandboxing independently for reads and writes, allowing full-disk reads directly while keeping restricted operations sandboxed.
- Use the executor's path convention when evaluating full-disk access, including `:slash_tmp` denials.
- Apply read-specific checks to capability discovery and skill resource reads, allowing unrestricted reads on executors without sandboxed discovery support.

## Testing

Add regression tests for direct read APIs, restricted writes and reads, executor-specific permission rules, and capability discovery without sandbox support. Update Windows tests to verify sandbox enforcement through writes.

GitOrigin-RevId: a03844bd1f0ea583bb54326683cddbfdd050119f
2026-09-17 05:09:03 +00:00
Eric Traut
70e8fe1be3 Add opt-in automatic background server startup (#46117)
## What changed

- Add `features.daemon_auto_start`, disabled by default and available through `/experimental`, to start the shared local server for eligible new, resumed, and forked sessions. Changes take effect on the next launch, and disabling the feature persists an explicit `false`.
- Require successful daemon startup and connection when auto-start applies. On failure, show guidance to rerun the same command with `--no-daemon` instead of silently falling back to an embedded server.
- Preserve embedded mode for excluded launches, including Bedrock sign-in, and carry exclusion warnings through resume and fork pickers. Honor `--no-daemon` without an exclusion warning.
- Update `/import` guidance to recommend restarting with `codex --no-daemon`.

## Testing

Add CLI and TUI coverage for automatic daemon attachment, startup and connection failures, `--no-daemon`, picker warning persistence, and Bedrock onboarding with and without a running daemon. Add snapshots and configuration-write assertions for the experimental toggle.

GitOrigin-RevId: 2e8eb163bc7ddd268a86c7546c05a85356c1e9ee
2026-09-17 04:53:51 +00:00
Eric Traut
4b0f19d6f9 Make TUI web and image activity summaries compact and descriptive (#46116)
## What changed

- Render web activity on one line with width-aware truncation and labels for searches, opened pages, and in-page searches. Preserve all batched queries in full details.
- Show viewed images by filename in chat while retaining their original paths in expanded transcripts and raw output. Use these activity renderers for persisted transcripts and exports.
- Display code-mode tool titles without the `Calling` or `Called` prefix and truncate headers to the available width while preserving full transcript titles and failure details.
- Keep `Returned image` markers inside the originating MCP call, alongside result text, and use the same wording in transcript exports.

## Testing

Add regression tests and snapshots for narrow displays, missing web action details, batched queries, image paths, MCP image results, matching live and replay rendering, and complete web and image details in persisted exports.

GitOrigin-RevId: 5d3f0a0031818c985378ad3ee4b24084d3868c98
2026-09-17 04:48:11 +00:00
Adam Perry @ OpenAI
841b5490b2 Preserve filesystem sandbox policy context when the cwd disappears (#46112)
## Why

Removing the selected working directory can prevent filesystem sandbox helpers from launching, even when the requested absolute paths remain accessible. Permission rules must stay anchored to the selected directory while those operations continue.

## What changed

- Require a policy `cwd` in `FileSystemSandboxContext` and launch filesystem helpers from the filesystem root while preserving the policy directory and workspace roots.
- Carry explicit `policyContext` in filesystem RPCs, preserving legacy wire fields and resolving omitted directories from older clients at executor ingress.
- Keep permission paths as executor file URIs and validate host compatibility where they are enforced.
- Bind Windows relative denial globs to the policy directory before changing the helper's launch directory, preserving home-relative patterns.

## Testing

Add regression coverage for `apply_patch` after working-directory removal, legacy RPC directory fallbacks, cross-platform permission URI transport, and Windows relative read denials. The patch regression verifies that an allowed file is updated while an explicitly denied file remains unreadable and unchanged.

GitOrigin-RevId: b0f4db722b27cb72ec129fc297c85732afac11f7
2026-09-17 04:37:54 +00:00
Jiwon Kim
108e6a6dbe Replace Sites migration state with a runtime compatibility guard (#46108)
## Why

Older Desktop clients can still provide bundled Sites to an independently updated SSH app-server. A cached remote Sites install must take precedence, even when disabled, while a missing remote bundle must preserve the bundled fallback.

## What changed

- Remove persisted bundled-plugin exclusions, Sites migration checks, and the migration wait when loading local plugin configuration.
- Suppress `sites@openai-bundled` during plugin loading when the remote global catalog is active and a cached remote Sites install is available.
- Remove exclusion-based catalog filtering and read/install guards, and simplify `install_plugin` to accept `ConfigLayerStack`.

## Testing

Expand the agent-turn Sites test to cover enabled remote precedence, disabled remote suppression of bundled Sites, and fallback when the remote bundle is missing.

GitOrigin-RevId: e2758596e5493ccee051cdfbf6b4afbe4f98948c
2026-09-17 04:23:45 +00:00
Eric Traut
77c1feb00e Box app-server request handler futures to reduce stack usage (#46107)
Use `Box::pin` when awaiting `handle_initialized_client_request` to keep
queued requests small and avoid large stack temporaries during construction.

GitOrigin-RevId: f3d1a6f9129f8b3a612cf054dbbb315ca61601dc
2026-09-17 04:13:04 +00:00
Eric Traut
16f59db96e Pause TUI events in the agents overview regression test (#46104)
GitOrigin-RevId: d2ac8e172d4ee375e81c85c4fd11f764e9cfcc5d
2026-09-17 04:01:21 +00:00
Ian MacLeod
f3da3861c5 Add a one-time composer starfield for new Astra tasks (#46096)
## What changed

Show a brief starfield in the empty composer when a new task starts with Astra or the user selects Astra through `/model` before entering ordinary prompt content.

- Respect `tui.animations`, `tui.whimsy`, and true-color support; protect the placeholder and cursor and fade out by 15 seconds.
- Preserve eligibility through recognized slash commands, but permanently dismiss it after ordinary draft content, attachments, or work. Carry draft eligibility through startup and disconnected editing.
- Exclude resumed and forked tasks, and verify model-picker changes against the originating task and effective model when applied.
- Hide the effect during overlays or focus loss without restarting its deadline or scheduling hidden animation frames.

## Testing

Add regression tests and snapshots for task eligibility, model-picker transitions, draft and paste handling, history search, overlays, submissions, rendering protection, and animation expiry.

GitOrigin-RevId: 832705543e9cae1d561125ece853a16c4eefe627
2026-09-17 03:27:21 +00:00
Eric Traut
787823cf95 Add --no-daemon to bypass the shared background server (#46088)
## What changed

- Run with `--no-daemon` without starting or probing the shared server, even when it is already running. Preserve the flag through `resume` and `fork`, and honor it for session archive commands.
- Reject combinations with `--remote`, `codex agents`, and `codex queue`, which require a server connection. Point users to `codex --no-daemon` when the agents overview cannot start its shared server.
- Centralize daemon eligibility checks and exclude launches using `--profile` or `CODEX_EXEC_SERVER_URL` from implicit daemon reuse.

## Testing

Add coverage for flag propagation, incompatible command combinations, and daemon eligibility. Add a PTY test verifying that `--no-daemon` starts the TUI without creating daemon state or connecting to an existing control socket.

GitOrigin-RevId: acc6a7cb339df6433bb8273c796194cdceda37c1
2026-09-17 02:46:49 +00:00
Nick Felt
8452164c76 Mark finished empty Code Mode tool inventories as complete (#46081)
## Why

Code Mode cells that finish without invoking tools omit completeness metadata, leaving a verified empty inventory indistinguishable from an unverified one.

## What changed

- Retain completed, losslessly recorded cells even when they contain no tool calls.
- Always include `executed_tool_calls` when setting `tool_calls_complete`, using `[]` for empty inventories or terminal waits with no new calls.
- Preserve completeness across request retries while revalidating history and rejecting late calls or ambiguous output mappings.

## Testing

Add regression coverage for empty tool discovery, errors, termination, feature gating, retries, and fresh-session requirements for waits. Update protocol assertions to require an explicit empty call list with completeness metadata.

GitOrigin-RevId: 24affe47f46068b6559d04a0103958ae83a00b92
2026-09-17 02:18:05 +00:00
Eric Traut
1e9564fb85 Keep the composer responsive during Command Center session creation (#46077)
## Why

Creating a session from Command Center waits for configuration and server requests before displaying the composer. Scanning loaded agents also adds unnecessary round trips for a new session with no descendants.

## What changed

- Show an editable startup composer while loading settings, starting the thread, and attaching the new session.
- Transfer the draft into the new session, including pending paste state, and retain edits for a retry if setup fails.
- Keep session creation running when cancellation keys are pressed in the provisional composer.
- Skip descendant backfill and paused-goal resume prompts for new sessions.

GitOrigin-RevId: 8371a6c3edc09de6366253021eae99f7b60d78ef
2026-09-17 02:00:43 +00:00
rhan-oai
800d183e2d Use captured step settings when spawning subagents (#46075)
## Why

After a settings update during an active turn, spawned agents could inherit the turn's initial model and reasoning settings. Effort-only overrides could also be validated against the wrong model.

## What changed

Build child configuration from the invoking step's captured model, effective reasoning effort, and reasoning summary in both multi-agent versions. Validate effort-only overrides against that captured model's supported reasoning levels.

## Testing

Add regression coverage for spawning after an active-turn settings update in both multi-agent versions, including effort-only overrides. Update configuration tests to check captured settings and the model's default reasoning effort.

GitOrigin-RevId: 068bdb744149048829cdaa68d254b62e96e6e6af
2026-09-17 01:51:14 +00:00
Eric Traut
6749535c8f Bound code-mode output previews across result blocks (#46073)
## Why

Multiple result blocks and wrapped text can exceed the compact preview's row budget. Truncation must also preserve trailing failure diagnostics.

## What changed

Apply a shared rendered-row limit to code-mode output previews after wrapping, including overlong URLs. Keep the first and last rows around an `… more · ctrl+t` indicator, while retaining the full text in the expanded transcript.

## Testing

Add coverage for multiple result blocks, trailing failure diagnostics, Unicode wrapping, long URLs, and error results at several terminal widths, including transcript preservation.

GitOrigin-RevId: ad9cf0fafb909e4df9a132f83722d6cd4e669687
2026-09-17 01:47:45 +00:00
Krish Chainani
b974893c90 Account for file images in context budgets and Guardian reviews (#46072)
## Why

File images contributed zero to history and compaction token estimates and were dropped from Guardian context. This undercounted context usage and omitted image evidence from reviews.

## What changed

- Estimate file images using the fixed resized-image cost, or 10,000 patch tokens for `original` detail because file references do not expose dimensions.
- Charge file images against remote compaction and Guardian request budgets.
- Preserve file images from user messages and tool outputs through Guardian selection and delivery, and deduplicate review images by file ID.
- Apply transcript image count and byte limits to both reference types, counting file ID bytes rather than referenced file contents.

## Testing

Add coverage for file-image estimates, selection limits, delivery, and compaction retention. Extend Guardian tests to verify file-image evidence reaches reviews and uploaded original-detail images trigger reviewer-history compaction.

GitOrigin-RevId: ee024204dcbe16e277fea9347c6a4d7fc120e18d
2026-09-17 01:38:13 +00:00
Eric Traut
ce03f22af6 Add a configurable F8 shortcut for voice conversations (#46071)
## What changed

- Bind `F8` to start or stop a voice conversation through the existing voice toggle handler, preserving its start guards and the composer draft.
- Expose `tui.keymap.chat.toggle_voice` in the configuration schema and keymap picker, with support for remapping, unbinding, and key chords.
- Let the default yield to existing `F8` bindings and overlapping chord prefixes, and validate explicit bindings against shortcut conflicts and reserved text input.
- Handle the shortcut only on key presses when no modal or popup is active.

## Testing

Add tests for default and custom bindings, conflicts, chord dispatch, live remapping and unbinding, draft preservation, start guards, and popup and key-event handling. Add a snapshot for the voice shortcut editor.

GitOrigin-RevId: e5e373e8eefa89bec4d5cbdca801616e312134b5
2026-09-17 01:31:14 +00:00
Eric Traut
36b84c81ec Suppress warnings when skill descriptions are shortened (#46070)
## What changed

Stop emitting a warning when skill descriptions are shortened to fit the skills context budget. Continue warning when skills are omitted from the model-visible list.

Update the app-server warning test to set `skills.max_context_tokens` to `1_000` and expect the omitted-skills warning. Remove assertions and tests for the description-shortening warning.

GitOrigin-RevId: feac10b3d159d73648a786120d477b7fe4e082d7
2026-09-17 01:28:24 +00:00
Eric Traut
172f8a2901 Use syntax theme colors for inline code and file paths (#46069)
## Why

Inline code and local file paths in the TUI used a fixed cyan foreground regardless of the active syntax theme.

## What changed

Use the active theme's Markdown raw-text foreground for inline code and local file paths, with cyan as the fallback when no matching color is available. Isolate the active theme and its revision per test thread to prevent parallel tests from affecting each other's rendering.

## Testing

Add rendering snapshots for dark, light, ANSI, and fallback themes, plus a regression test for theme and revision isolation between test threads.

GitOrigin-RevId: 40d84131d0abc9f177019d9b0b3e19536d5cd553
2026-09-17 01:28:01 +00:00
Eric Traut
e22e6523eb Remove the done prefix from TUI completion timestamps (#46067)
## What changed

Render completion footers as `2:32 PM` or `Worked for 2m 5s · 2:32 PM`, with the existing date formatting for older completions.

Update test helpers to identify completion footer cells by type when normalizing or excluding timestamps, preserving message text that resembles a completion footer.

## Testing

Update completion label and transcript snapshots, and add assertions that timestamp normalization preserves ordinary message text while normalizing completion footer cells.

GitOrigin-RevId: 35f1658db02f8527212c006fd7492b574a105304
2026-09-17 01:19:38 +00:00
Rennie
40584fad87 Keep MCP user interaction on the root thread (#46066)
## Why

MCP requests that need human input, including browser sign-in, must be handled by the root thread. Subagents need guidance to hand these blockers to their parent without prompting the user or automatically accepting requests that require input.

## What changed

- Reject interactive MCP elicitations and tool approval prompts in subagents with guidance to ask the parent and wait before retrying.
- Recognize browser authentication and `codex_requires_user_input` metadata even when the form schema is empty, while preserving automatic permission approvals and review decisions.
- Carry user-interaction eligibility through MCP runtime creation and connection reuse, and guard prompt registration.
- Preserve connector authentication diagnostics alongside handoff guidance, subject to normal tool-output limits.

## Testing

Add unit and integration coverage for blocked subagent prompts, root browser authentication, automatic approval and review, connection reuse, and authentication diagnostic preservation and truncation. Add a request-history snapshot for browser-auth handoff guidance.

GitOrigin-RevId: 83e146b6e5c1a2a22a34681ad45615f504b3c96c
2026-09-17 01:18:37 +00:00
Krish Chainani
5e636ea760 Route prepared images through the attachment store (#46065)
## What changed

Upload prepared images from messages and tool outputs through the session's `AttachmentStore` before recording history. Use the returned inline bytes or file reference, and fall back to the prepared inline image if upload fails.

Keep history replay on `InlineAttachmentStore` so it does not upload recorded images, and preserve existing file references. Reuse image resizing directly for guardian review comparisons without uploading.

## Testing

Add coverage for upload failure preserving resized inline images. Extend rollout coverage to verify that only new images are uploaded, uploaded bytes have the expected dimensions, and file references and resize notices survive replay.

GitOrigin-RevId: e9966297c3579ef1e52376f0235fe3a7e3ec7ecc
2026-09-17 00:49:12 +00:00
felixxia-oai
08663cc91b Consolidate Guardian tests at shared policy and context boundaries (#46064)
## What changed

- Move approval routing tests into `guardian-reviewer`, covering both reviewer choices across `UnlessTrusted`, `OnRequest`, `Granular`, and `Never` without host session setup.
- Combine reviewer configuration checks into one test for isolation from parent customizations.
- Cover filtering of ordinary developer messages while preserving manual approvals in `guardian-context`, removing the duplicate async scorer test.

GitOrigin-RevId: b39ef21475e2f5d99d758f2d27615449b252dc65
2026-09-17 00:39:08 +00:00
felixxia-oai
e412b93d08 Trim Guardian tests and tighten request layout assertions (#46063)
## What changed

Remove standalone tests across Guardian review sessions, configuration, assessment schemas, transcripts, and trusted skill paths.

Strengthen the existing request layout snapshot test to check exact transcript separators, the action header, and parent session ID placement before snapshot whitespace normalization. Concatenate user input text without inserting newlines so the assertions validate the actual request formatting.

GitOrigin-RevId: 06d262a1a85b1a8401796958f300c894146d2e1b
2026-09-17 00:37:47 +00:00
Chris Dong
8ace915ace Attribute analytics events to realtime voice sessions (#46058)
## What changed

Add `voice_session_id` to turn, app-use, skill-invocation, and MCP tool-call analytics events. Track realtime session lifecycle and handoff markers to preserve attribution when a handoff starts a turn after the voice session closes, or steers an active turn. Keep that attribution from carrying over to subsequent text turns.

Record handoff markers using only the thread ID, without retaining transcript content in analytics facts.

## Testing

Add coverage for attribution after realtime closure, active-turn steering without tagging the next text turn, and handoff markers that exclude transcripts. Extend event serialization and MCP tool-call tests for `voice_session_id`.

GitOrigin-RevId: 024b0e7e4c6fbaf8325574de6c24c048bb4ca032
2026-09-16 23:33:00 +00:00