Commit Graph
12713 Commits
Author SHA1 Message Date
Eric Traut 155dde7ff6 Show the selected ChatGPT workspace in /status (#57366)
## What changed

- Return the selected workspace's display name as `workspaceName` in ChatGPT account responses, caching it alongside workspace routing and updating generated schemas and bindings.
- Display a `ChatGPT workspace` row with the name and account ID, falling back to the ID when the name is unavailable or invalid. Refresh workspace details with account identity updates and hide the row for providers that do not use ChatGPT authentication.

## Testing

Update account-response tests to cover workspace names and null values, add workspace details to the status snapshot, and verify that switching to a custom API-key provider hides the workspace row.

GitOrigin-RevId: 4b30ab8a39e1fa7ad1ba7367c5295544be8f6001
2026-10-27 05:22:23 +00:00
Eric Traut 6c0db39b94 Offer safer rewrites after safety blocks in the TUI (#57365)
## What changed

- Show selectable safer follow-ups alongside safety-block explanations, with an option to enable Daybreak when disabled.
- Submit the selected rewrite in a verified fork before the blocked turn, preserving the original chat's draft and current model settings. Mark the new turn with `safety_recourse_follow_up`.
- Filter suggestions that could invoke commands, skills, apps, or plugins, and suppress recourse for unsupported servers and non-primary threads.

## Testing

Extend coverage for fork history, draft preservation, model selection, turn metadata, suggestion filtering, and the Daybreak picker.

GitOrigin-RevId: 49052df6301b6bfbba07262d40b007dcf97bb7c9
2026-10-27 05:17:43 +00:00
Eric Traut 118aae2a5f Explain safety policy blocks with turn-scoped recourse in the TUI (#57363)
## What changed

- Handle `TurnModerationMetadata` for the active turn, showing a temporary block notice while an explanation is pending.
- Validate safety recourse metadata and render topic-specific explanations with safer ways to continue for biological and cybersecurity policy blocks. Apply the explanation only when the terminal policy error matches its domain; otherwise retain the existing error handling.
- Queue input while recourse is pending and preserve prepared images when queued messages are submitted.

## Testing

Add an integration test covering biological and cybersecurity blocks, the loading notice, and fallback for a mismatched policy error, plus a snapshot of the cybersecurity explanation. Extend queued-image coverage to verify submission succeeds after the original image file is removed.

GitOrigin-RevId: dd9ca57cf3b2d842e3deb8aff5d7c3c73a92e14d
2026-10-27 05:15:31 +00:00
Dmitriy Kovalenko ff2346f33f Bound waits for the thread writer coordination lock (#57360)
## Why

Contention on the writer coordination lock can block writer cleanup indefinitely, preventing idle threads from unloading.

## What changed

Retry coordination lock acquisition every 50 ms and return `io::ErrorKind::TimedOut` after 30 seconds of contention. This lets cleanup release writer ownership and idle unloading finish even while another process holds coordination.

## Testing

Extend writer lock coverage to check the timeout error. Update the idle unload regression test to verify that the thread closes while coordination remains locked and can resume with its persisted turn after the lock is released.

GitOrigin-RevId: 513117fdaf3890283e7acdd149ce9abb66075b63
2026-10-27 04:52:09 +00:00
Dmitriy Kovalenko adfcac1a42 Serialize session index mutations across processes (#57358)
## Why

The process-local mutex cannot coordinate session name appends and removals from multiple Codex processes sharing the same home directory.

## What changed

- Guard index mutations with a persistent `session_index.jsonl.lock` file, retaining the lock until the blocking worker finishes even if its caller is cancelled.
- Return a timeout error after 30 seconds of lock contention without modifying the index.
- Rewrite removals through a unique temporary file while preserving index permissions, and skip removal when the index is absent.

## Testing

Update regression tests to check lock retention after cancellation, timeout without writing, successful writes after contention clears, and removal with a missing home directory. Retain coverage for cancelled queued updates preserving the next write.

GitOrigin-RevId: 5231c9ff85c6b34de5ee92931d119b6f46bd583b
2026-10-27 04:47:37 +00:00
Dmitriy Kovalenko f69b8d203d Report when NFS database migration finds no databases (#57357)
## Why

`codex migrate-nfs-db` reported a successful migration when the database directory existed but contained no databases.

## What changed

Count databases that were migrated or already use DELETE journal mode. If none are found, print `No databases found.` instead of the migration success message.

## Testing

Extend the CLI integration test to cover an empty directory, a failure on a corrupt logs database after an earlier conversion, and a successful rerun that recognizes the converted database as already in DELETE mode.

GitOrigin-RevId: 16b109645925164f3af5d35a909417872cfa004f
2026-10-27 04:46:24 +00:00
iceweasel-oai 3f74ff28fa Avoid object-identity preflight for MXC path grants (#57353)
## Why

MXC's `normalize_object_conflicts` can reject otherwise usable Windows policies when a network share does not support `FileIdInfo` or a protected deny path cannot be opened for metadata.

## What changed

Remove object-conflict normalization before and after volume-root expansion. Send explicit path grants directly to BaseContainer, which enforces path and symlink/junction alias precedence.

Document the resulting limitations:

- Hard-link names retain independent permissions, so an allowed name can access the same file through a less restrictive grant.
- Volume roots expand using their declared access without first reconciling aliases. A writable root can therefore generate more-specific writable grants that override a read-only root alias.

GitOrigin-RevId: de0b2d7b5b98eaa358a97156c02e9f7f85860335
2026-10-27 04:39:28 +00:00
Dmitriy Kovalenko 9510f36df2 Preserve child signal failures in the npm wrapper (#57352)
## Why

The npm wrapper can exit successfully after its native child is terminated by a signal if Node ignores the re-emitted signal or a forwarding handler intercepts it.

## What changed

Set a fallback exit status of `128 + signal number` and remove listeners for the terminating signal before re-emitting it, preserving signal termination where supported.

## Testing

Add a non-Windows integration test using a built Codex binary to cover numeric argument-error exits, forwarded `SIGHUP` termination, and the fallback exit status for `SIGXFSZ`, which Node ignores by default.

GitOrigin-RevId: cad18a47aa50fd78517c367f8d8aae83bbbf7843
2026-10-27 04:39:05 +00:00
Benjamin Carlsson b7f7e7f7e8 Separate TUI session resume preparation from activation (#57342)
## What changed

Split saved-thread resume into preparation and activation. Preparation resolves configuration and attaches to the destination thread before activation replaces the displayed conversation.

Keep stored-backend configuration and local settings separate from active settings during preparation, while retaining the existing eager settings refresh for active-backend resumes. Use the destination backend for working-directory, permission, and directory-trust checks.

Carry the backend identity in the prepared result and reject activation through a different backend before changing the active conversation or composer.

## Testing

Extend coverage for preserving active settings and composer drafts during preparation, rejecting activation through another backend, applying destination remote-permission checks, and retaining active-backend settings refresh behavior.

GitOrigin-RevId: 7171f1abcf4bdd62793c21232a8b895bb809cf70
2026-10-27 04:09:04 +00:00
goodman-oai c587d6e54c Add model catalog fields for granular approval templates (#57325)
## What changed

Add optional `approvals.granular` catalog fields for the policy introduction and prompted and rejected category lists. Preserve template strings verbatim in `GranularApprovalMessages`, leaving validation and rendering to consumers.

Document the 500-byte template limit, required `{{ policy }}` and `{{ categories }}` markers, and fallback rules.

## Testing

Extend serialization tests to cover null, empty, and populated granular templates, and verify their preservation through model responses and base instruction overrides.

GitOrigin-RevId: ce32e41a9b37e2e7c45ac9b079708a640c99326c
2026-10-27 01:50:46 +00:00
Alex Daley ce7adb6a31 Add opt-in concise hints for explicitly selected plugins (#57317)
## What changed

Add the `features.simplified_selection_hints` flag, disabled by default. When enabled, replace detailed plugin capability instructions with a concise developer message identifying the selected plugin and directing the model to use its available skills and tools.

Continue omitting hints for plugins without available capabilities and bounding hint length. Preserve the existing detailed instructions when the flag is disabled.

## Testing

Cover plugin refresh in an existing thread with the flag enabled and disabled. Verify that explicit skill prompts precede the simplified plugin hint and that the hint uses the developer role.

GitOrigin-RevId: 64fc3347bd49fffe675f343a4733ced1b4e5e88c
2026-10-27 00:52:31 +00:00
Benjamin Carlsson b01148de59 Keep failed subagents from marking tasks as needing attention (#57315)
## Why

A subagent failure ends its work without requiring user action, but the agent command center treated it as needing attention and promoted its parent task into the `Needs you` group.

## What changed

Classify failed subagents as inactive when computing task groups and selecting details. Recognize subagents by either a parent thread or a subagent session source, including background workers without a parent.

Keep approval and user-input requests from descendants actionable, even beneath a failed agent. Show these requests as `Needs input` rather than `Error` when the displayed task is a failed subagent. Errors in non-subagent tasks continue to require attention.

## Testing

Add and update regression tests and a snapshot covering stable ordering after subagent failures, idle parents staying ready, failed background workers, and pending requests beneath failed agents.

GitOrigin-RevId: 1a06d5d00c08bb77c9ed36aadffd5e0514f0b2c6
2026-10-27 00:29:59 +00:00
Joe Savona 95cafae96c Format all Rust sources and clean up repository checks (#57314)
## Why

Rust formatting should include source files that Cargo cannot discover, while keeping command lines within Windows limits.

## What changed

- Update `scripts/format.py` to discover tracked and non-ignored untracked Rust files with Git and invoke `rustfmt` in batches of 64 files. Use the workspace configuration and skip recursive child-module formatting.
- Pass `SystemDrive` and `LOCALAPPDATA` to Windows Bazel tests.
- Extend the spelling allowlist, remove a manifest feature exception, and clean up an unused import, an empty MCP scenario module, and its snapshot.

GitOrigin-RevId: c0d625fda9290ead6a63919325d65f7352abfa40
2026-10-27 00:23:39 +00:00
smurching-oai 9526f8d0d0 Default gateway OAuth delivery to Authorization bearer tokens (#57313)
## What changed

Allow omitting `gateway_oauth.delivery` to send the gateway token as `Authorization: Bearer …`. Custom headers and cookies remain available when a provider also needs its own credentials.

Reject conflicting provider authentication and duplicate delivery headers with actionable errors. For gateway bearer delivery, require `model_catalog_url` to share the scheme, host, and port of `base_url`. Consistently reject request header collisions across auth application methods.

## Testing

Add coverage for omitted delivery, provider credential conflicts, and model catalog origin validation. Update inference tests to verify gateway-only authentication while signed in and combined ChatGPT and gateway credentials in separate headers.

GitOrigin-RevId: 8564d3998511b3f6c55f3b65a01ed9056a90417e
2026-10-27 00:08:07 +00:00
ioanbudea-OAI 1f281290e3 Centralize Guardian root context preparation (#57312)
## What changed

Move root message preparation and handoff context selection into `codex-guardian-context`. Keep source collection and handoff boundary detection in core, while shared helpers handle text limits, whole-record verified answer admission, delivered assistant message lookup, and retained assistant fallback.

GitOrigin-RevId: a3eb35cddb3b0c5b93243b9d9c553397a7a61a14
2026-10-27 00:01:05 +00:00
cassirer-openai e977cb394d Preserve tool output versions and history order in rollout traces (#57311)
## Why

Tool calls can emit multiple outputs, and compaction can trim output content while retaining the same call and item IDs. The trace reducer rejected these versions as conflicting content. Late tool and code-cell events could also link outputs in map-key order instead of conversation order.

## What changed

- Preserve distinct tool output versions while retaining consistency checks for tool invocations.
- Link tool and code-cell outputs in thread history order, and resolve pending code cells after the entire event has been reduced.
- Prevent snapshot reconciliation from reusing the same conversation item twice when identical items move within history.

## Testing

Extend reducer regression tests for trimmed outputs, changed images and metadata, reordered identical messages, and late tool and code-cell events spanning the item-ID ordering boundary.

GitOrigin-RevId: eb4242d6a2d32d61c3caab9d3cc3cf6b374ce799
2026-10-26 23:55:28 +00:00
Joe Savona 4aca387e3e Bump openai/fence to v0.12.2 in the blob size policy (#57307)
GitOrigin-RevId: 2334b1916220f86a83b8ddb066d5ab9450f97eb8
2026-10-26 23:30:00 +00:00
smurching-oai fa4c0607d4 Surface refresh-token rejection errors during workspace routing (#57304)
## Why

When workspace discovery receives a 401 and token refresh is permanently rejected, the generic discovery error hides the guidance to sign in again.

## What changed

Propagate cached permanent refresh-token failures for the current credentials through workspace routing and model-provider resolution as `CodexErr::RefreshTokenFailed`. Preserve account-change checks and only surface the cached rejection when external authentication is absent and the auth generation is unchanged.

## Testing

Add an app-server regression test that simulates `refresh_token_reused` during workspace discovery and verifies that the turn fails with `Unauthorized` and tells the user to sign in again.

GitOrigin-RevId: cf89c71fd6a2103e56d637838b0cb34d58b3cc32
2026-10-26 23:21:18 +00:00
ioanbudea-OAI 3e9264fb18 Defer synchronous Guardian evidence limits to preparation (#57295)
## What changed

Collect original retained instructions, assistant context, and verified answers before applying synchronous request limits in `guardian-context` preparation. Carry original record sizes through collection, preserving whole-record omission notices, source ordering, and host assistant-context framing.

Apply retained transcript source size checks during synchronous transcript preparation as well.

## Testing

Extend regression assertions for synchronous/asynchronous retained-context parity and equivalent verified-answer omissions when oversized records are filtered during preparation.

GitOrigin-RevId: 9042ee3fe60ebd455f6656b4008efb2acc44ac3d
2026-10-26 22:27:05 +00:00
Anthony Tafoya 62f7f3418f Extract plugin manager errors and box realtime handoff routing (#57294)
## What changed

- Move plugin install and uninstall errors and telemetry classification helpers into `codex-rs/core-plugins/src/manager_errors.rs`, preserving the existing public re-exports and error classifications.
- Box the realtime text routing future to bound the handoff future's size while retaining the admission permit across the await.

GitOrigin-RevId: ccf0c3bb93a8c69a0a618b96cd1525da87003176
2026-10-26 22:23:59 +00:00
BOZHANG-OAI 126a0ee92e Add GPT-6.1 Terra to model catalogs (#57293)
## What changed

- Add `gpt-6.1-terra` to the bundled catalog and GCP Vertex model picker.
- Add `openai.gpt-6.1-terra` to Amazon Bedrock catalogs, including Global and US cross-region runtime variants.
- Use `gpt-6.1-terra` as GCP's preferred memory consolidation model.

## Testing

Extend catalog, model picker, thread startup, and Vertex request tests to cover GPT-6.1 Terra.

GitOrigin-RevId: edb3be3c4286c191349cdee742005ed3c67029e8
2026-10-26 22:13:14 +00:00
Ian MacLeod b52a272cff Render async questions and replies with Markdown in the TUI (#57292)
## Why

Async question replies appeared as plain user text, leaving Markdown formatting literal and repeating the full question above each answer.

## What changed

- Accent question titles with a `?` prefix while preserving Markdown in titles and suggestions.
- Render replies with a `↪ Re:` question caption and a Markdown answer. Limit captions to two rows with an ellipsis on overflow, while keeping answers complete.
- Apply the same rendering to live messages and loaded transcripts, preserving inline styles, hyperlinks, and Markdown when copying selections.

## Testing

Add snapshots and assertions for matching live and loaded transcript rendering, plus tests for caption clipping, hyperlink bounds, Markdown copying, partial selections, and whitespace-only or nonprinting answers.

GitOrigin-RevId: 0290d8a2ebfb42bd5d7374c7037cde5ae8a13b5d
2026-10-26 22:12:07 +00:00
Ian MacLeod a014908c50 Represent user message presentation with an enum (#57291)
## What changed

Replace `UserHistoryCell`'s `spoken` boolean with `UserMessagePresentation`, defaulting to `Plain` and using `Spoken` for speech transcripts. Route rendering checks through `is_spoken()`, preserving the existing prompt styling and whitespace handling.

GitOrigin-RevId: d0683a2b536a7d71f68fd9a089e6839d0ab0cc65
2026-10-26 22:11:27 +00:00
Joe Savona 16effdfc8c Add a plugin process host with bounded IPC and lifecycle management (#57290)
## What changed

- Add `codex-plugin-host` to launch a helper with a cleared environment, verify its readiness handshake, and expose framed stdin/stdout pipes with a 256 KiB frame limit and write backpressure.
- Support startup cancellation and process-group cleanup, retaining exit status and the last 16 KiB of stderr while omitting raw diagnostics from `Debug` output.
- Extend the Bazel crate macro to support test-only binaries and fixture entry points outside `src/`.

## Testing

Add process integration tests for framed communication, startup cancellation, helper and descendant cleanup, repeated close calls, and bounded diagnostics from startup and runtime failures.

GitOrigin-RevId: ed539e7899af06ee83a0d8c2d0ea8cec10f19afb
2026-10-26 22:11:01 +00:00
Keyan Zhang b46a3801e4 Preserve parent tool declarations in prediction forks (#57287)
## What changed

Keep inherited incremental tool declarations in MCP-disabled prediction forks and `thread/sample` requests, and append a developer notice that MCP tools are unavailable. Skip tool declaration updates within the inherited context window; new windows still declare the current tools.

Add the default-enabled `prediction_preserve_parent_tools` feature flag and its configuration schema entries.

## Testing

Update core snapshots and app-server tests to cover inherited declarations, the MCP-unavailable notice, preservation across MCP refresh, and continued parent tool availability.

GitOrigin-RevId: 3adf96c7d0e0093986dbdbd540bd47674a2c105c
2026-10-26 22:05:23 +00:00
viyatb-oai 136d891a94 Support network_proxy in managed requirements (#57286)
## What changed

Accept `[network_proxy]` in `requirements.toml`, retaining `[experimental_network]` as a compatibility alias. Reject both names in a single layer and normalize them before merging across layers so precedence and source tracking are preserved.

Honor the new spelling during credential broker project discovery, display `network_proxy` in debug configuration, and update diagnostics and documentation. Document the distinction between managed requirements, proxy feature configuration, and permission profiles. Policy publishers must keep using `[experimental_network]` until all clients and policy validation layers support the new spelling.

## Testing

Add coverage for alias equivalence, duplicate rejection, cross-layer precedence and sources, and broker project discovery. Exercise both spellings in proxy configuration, network approval routing, app-server requirements responses, and Windows machine policy validation.

GitOrigin-RevId: 5c5bb82bd4b6b1431aa97f27248775820eae6302
2026-10-26 22:05:00 +00:00
Ian MacLeod f9c4c3c9a9 Let the terminal handle links in expanded questions (#57285)
## Why

Mouse capture prevents the terminal from handling link-opening gestures in expanded questions.

## What changed

Disable mouse capture while questions are expanded and the TUI owns the screen, unless an interactive modal is active. Restore the default capture policy when questions collapse.

## Testing

Add a regression test covering expansion, collapse, non-owned screens, and link visibility with warnings open.

GitOrigin-RevId: 1fd37feb5c9cd374b492218eeef8c80316bb1cf9
2026-10-26 22:04:03 +00:00
Ian MacLeod a3eabbbbf9 Express TUI mouse capture as an explicit policy (#57284)
## What changed

Replace screen-specific `OverlayInput` variants with `MouseCapture::{Inherit, Enabled, Disabled}` and rename the setter to `set_mouse_capture`.

Preserve existing capture behavior: transcript and usage overlays enable capture, onboarding and static pagers disable it, and the inherited policy follows screen ownership. Update the alternate-screen and lifecycle tests to use the new policy.

GitOrigin-RevId: 965a3bb6d0854e289d2b0dbeedbf2b252b98293d
2026-10-26 22:03:39 +00:00
Eric Traut efab30992b Promote rounded token counts to the next compact unit (#57282)
Compact token counts can round to `1000K`, `1000M`, or `1000B` near unit boundaries. Promote these values to the next suffix so, for example, `999,500` tokens displays as `1M` instead of `1000K`.

GitOrigin-RevId: 803e7c8c8eebd61522fb717275b43904a5da056f
2026-10-26 21:57:34 +00:00
Eric Traut 812d9a3e9a Enable agents navigation for remote App Server sessions (#57281)
## Why

Remote App Server sessions support the command center, but the empty-prompt Left shortcut and its footer hint were enabled only for local daemon sessions.

## What changed

Enable the shortcut and `← for agents` hint for remote sessions. Centralize command center availability in `AppServerTarget::supports_command_center()` and use it consistently across navigation, lifecycle handling, trust prompts, and command center actions. Embedded sessions keep command center support disabled.

## Testing

Extend navigation coverage to verify the footer hint and opening the agents overview for both local daemon and remote sessions, while keeping navigation disabled for embedded sessions. Add a remote-session footer snapshot and update related UI tests to use the shared capability flag.

GitOrigin-RevId: 8148812217f68cf0fd441c35ed3c5b466ecc9cbd
2026-10-26 21:56:47 +00:00
cassirer-openai f2df3e3b56 Preserve full MCP results in rollout traces (#57280)
## Why

MCP completion events can truncate large results and omit content removed for model consumption. Rollout traces need the original response, including content and metadata, as well as results for calls denied before reaching the backend.

## What changed

- Record MCP runtime results before callbacks, content filtering, and UI truncation, and record skipped calls as failures.
- Stop deriving MCP runtime completion records from protocol events to avoid duplicate records.
- Treat MCP runtime payloads as opaque results when reducing agent interactions.
- Buffer JSON trace writes and explicitly flush them.

## Testing

Extend app-server tests to verify that traces retain oversized MCP text, audio, structured content, and metadata while UI results remain truncated, and that denied calls produce exactly one failed runtime result with the denial reason.

GitOrigin-RevId: 57880770545eb5869420d7dc6fa4a15e481cae9d
2026-10-26 21:56:23 +00:00
Alex Kira 6d8f311b00 Render untrusted additional context as named tool outputs (#57279)
## What changed

When `features.untrusted_as_tool_output` is enabled, emit untrusted additional context as `function_call_output` items in the `agent` namespace before user input. Use the explicit context name when supplied; otherwise derive a bounded name from the source key, falling back to `untrusted_content`.

Deduplicate these outputs by name and truncated value so name changes are emitted while changes confined to truncated content are ignored. Application context remains in developer messages, and disabling the feature preserves the existing message format.

## Testing

Extend core and app-server tests and add request-history snapshots covering both formats, turn start and steering, derived names, truncation, and deduplication.

GitOrigin-RevId: cd5e2f4b3121714acb7f4baf5607f3c27d408cae
2026-10-26 21:55:00 +00:00
rhan-oai 716b4ec6df Refactor agent spawning, startup, and communication helpers (#57278)
## What changed

- Separate native child spawn preparation from submission and move forked-history loading and filtering into `agent::history`.
- Group resolved session startup dependencies in `ThreadStartupContext` and extract helpers for effective spawn configuration and inherited environment requests.
- Share loaded-recipient message submission and capture only the content needed for communication logging, avoiding a clone of the full message.

GitOrigin-RevId: 4417ba6ca35e9f293064600f0a54932de514636f
2026-10-26 21:48:19 +00:00
goodman-oai 6eb357445f Use the crates.io release of i18n-config (#57277)
## What changed

Remove the `i18n-config` Git patch and its `cargo-deny` Git source allowance. Update the Cargo and Bazel lockfiles to use the crates.io release of `i18n-config` `0.4.8`, restoring its `basic-toml` dependency and adjusting the locked TOML dependencies.

GitOrigin-RevId: 4d4f6c52dddf79d2006e170432347ab79280da51
2026-10-26 21:47:10 +00:00
Francis Chalissery d416d8a0ff Support window prefixes for extension world-state sections (#57276)
## What changed

Add `WorldStateSectionContribution::with_window_prefix()` to render extension developer fragments as separate messages before retained history when building a context window, including after compaction. Updates within an existing window still append to history. Ignore fragments with other roles for sections that opt in.

## Testing

Add a unit test for prefix placement and duplicate avoidance, plus local and remote compaction scenarios covering live updates, persisted replacement history, and rejection of non-developer fragments.

GitOrigin-RevId: 8621457c6eec17f1585ca8e6fa154b1bf3257330
2026-10-26 21:46:26 +00:00
jimxie-oai 166aed9854 Preserve image generation failure metadata for premium usage limits (#57275)
## Why

Image generation usage-limit errors with the `imagegen_premium` limit ID were not recognized as structured `UsageLimitExceeded` failures.

## What changed

Recognize `imagegen_premium` alongside `image_gen`, preserving the limit ID and available reset time in image generation failure metadata.

## Testing

Extend app-server coverage to verify premium limit metadata and reset-time fallback in completion events, thread reads, and resumed threads. Add unit coverage for missing exhausted-window reset times and unrelated or absent limit IDs.

GitOrigin-RevId: 8cf991776403ddce1f45d9780b8040982fd0fcfe
2026-10-26 21:46:01 +00:00
ioanbudea-OAI 369b2eaa62 Defer REPL evidence rendering to synchronous context preparation (#57274)
## What changed

Collect REPL evidence as shared immutable response records, then select and render it during synchronous context preparation. Share response selection logic between text and multimodal layouts while preserving rendering limits, omission markers, and image order.

Use the shared `NodeReplResponse` type in core evidence storage and preserve existing snapshots through copy-on-write image eviction.

## Testing

Extend tests to verify shared response identity during collection, unchanged rendering after preparation, and snapshot stability when storage pressure evicts images.

GitOrigin-RevId: 8564d3732faa5adf01a66bca523d4c03cfbe1822
2026-10-26 21:37:28 +00:00
Eric Traut bae11269eb Reject unsupported options for codex queue (#57273)
## What changed

- Validate inherited options before and after the `queue` subcommand, with explicit errors for unsupported flags and positional prompts.
- Reject `--model` and `-c model=...` because queued messages use the thread's model.
- Allow `--cd` for local server startup, but reject it with `--remote`.
- Hide unsupported inherited options from queue help and clarify the scope of startup configuration overrides.

## Testing

Add regression coverage for unsupported options in both argument scopes, model configuration overrides, remote `--cd` conflicts, and queue help output. Preserve coverage for overrides that bypass a running local daemon.

GitOrigin-RevId: 703ba26f38930a01559847e66e1af3d0d338d1e9
2026-10-26 21:37:03 +00:00
Sean Huang e963cab11a Add code-mode output truncation protocol contracts (#57272)
## What changed

Add session options for client- or server-owned output truncation and optional `max_output_tokens` budgets for wait and terminate observations. Introduce `TerminateRequest` and update session implementations and callers to use it.

Extend the stdio and gRPC schemas with optional truncation settings and budgets, and define the `bounded-output-v1` capability. Existing sessions retain client-side truncation; providers reject server mode by default. This change defines the contracts without enabling server-side truncation.

## Testing

Extend protocol serialization coverage for `outputTruncation: "server"` while preserving existing wire shapes when optional fields are absent.

GitOrigin-RevId: 22145897ea16d385c5ba9e7549109f7a669fceb4
2026-10-26 21:36:35 +00:00
Ian MacLeod 7077b1edb9 Enable text selection and mouse scrolling in the warning viewer (#57271)
## What changed

- Allow selecting warning text while preserving wrapped URLs and hard line breaks when copying.
- Add mouse-wheel scrolling within the warning body and keep page navigation working after selection.
- Use the shared menu surface and show configured scroll hints only for directions with more content.
- Preserve painted backgrounds when rendering text selections.

## Testing

Add coverage for warning selection without changing the draft, paging after selection, wheel scrolling and directional hints, and selection boundaries in scrolled text containing tabs and wrapped words. Update warning panel snapshots.

GitOrigin-RevId: c4b77277a60b7b4af92043cb3761769ddc636454
2026-10-26 21:36:05 +00:00
Abhinav 51e3f94b2b Load cloud config for sandbox and remote exec-server commands (#57270)
## Why

Sandbox invocations without an explicit permissions profile and remote `exec-server` connections using ChatGPT auth need access to cloud-defined model providers and managed requirements. Cloud bootstrap requests must also respect local application network policy.

## What changed

- Bootstrap sandbox cloud config whenever managed config is included, even without an explicit profile. Skip bootstrap when `--sandbox-state-json` supplies the sandbox state.
- Load cloud config for remote executors beyond workload identity, while skipping forwarders and executors using stdin credentials, AWS SigV4, or agent identity auth. Honor `CODEX_API_KEY` selection so API key connections skip ChatGPT cloud config.
- Apply local application network policy during cloud bootstrap and activate effective application network policy before exec-server clients are created.

## Testing

Add coverage for cloud-defined providers in sandbox and remote exec-server invocations, API key bypass, local policy blocking bundle requests, cloud policy blocking remote registration, and bootstrap exclusions.

GitOrigin-RevId: e8bd6210751e96161f575ade309ebf41bf10f8b5
2026-10-26 21:31:28 +00:00
Sean Huang 0818b91867 Add native Windows MSVC V8 source archive builds (#57269)
## Why

The Bazel V8 source build supported Windows GNU but lacked an MSVC-targeting toolchain to produce `*-pc-windows-msvc` archives.

## What changed

- Add opt-in archive targets for native Windows x64 and ARM64 hosts, selected by `//third_party/v8:rusty_v8_native_windows_archive_for_target`.
- Fetch pinned LLVM and scope its `clang-cl` toolchain to V8 artifacts, using the installed Microsoft SDK. Bundle Chromium libc++ and compiler-rt builtins into the resulting `.lib`.
- Adapt V8 dependencies, assembly, snapshot generation, and platform feature settings for MSVC, and derive test metadata from the selected engine features.
- Document the native build workflow. Existing MSVC consumers continue using prebuilt artifacts; generated Rust bindings and publishing integration remain separate.

GitOrigin-RevId: abd5049245aece90a116fc3bfeac2b158a76f6af
2026-10-26 21:30:41 +00:00
Eric Traut fcb3ba7558 Record reasons for embedded TUI starts (#57268)
## What changed

Emit `codex.tui.embedded_start` when the TUI successfully connects to an embedded app server, with a `reason` tag identifying daemon exclusions, disabled auto-start, failed daemon connections, or agent startup without a discovered daemon.

Distinguish `--search` from other configuration overrides when it is the only configuration exclusion preventing daemon use.

GitOrigin-RevId: b837ad2e83af17ea92392ffa6d5f91108ceaeecc
2026-10-26 21:30:15 +00:00
Benjamin Carlsson 654b2ec1f5 Keep cloud conversation settings server-owned in the TUI (#57267)
## Why

Cloud conversations own their execution settings and workspace. TUI requests must preserve those settings instead of overriding them with local configuration.

## What changed

- Add a distinct cloud parameter mode that omits local execution settings from thread start, resume, and turn requests, including misalignment continuations.
- Route cloud model and reasoning selections through `thread/settings/update`, requiring server acceptance rather than falling back to local changes or saved defaults.
- Use server model defaults and tolerate an unavailable `configRequirements/read` method during cloud bootstrap.
- Skip local tool setup and TUI-generated titles, and report that permission selection, forking, and conversation recaps are unavailable for cloud conversations.

## Testing

Add regression coverage for cloud request parameters, bootstrap without configuration requirements, rejected model changes, and suppression of unsupported requests.

GitOrigin-RevId: a2dafb6c8a6b0db8607575e2291fee739c2fb2b1
2026-10-26 21:28:54 +00:00
Eric Traut c93a54e164 Show effective processing tiers in TUI status surfaces (#57265)
## What changed

- Make the `fast-mode` status line and terminal title items show the current model's processing tier name, falling back to `Standard`, instead of `Fast on` or `Fast off`.
- Share tier label resolution with `model-with-reasoning`, including `Flex` for configured providers other than Amazon Bedrock, and remove the ChatGPT account requirement for displaying tier names.
- Refresh model-dependent surfaces when Fast or Ultrafast mode is enabled or disabled.

## Testing

Update status surface tests and snapshots to cover tier selection, feature toggles, model changes, and provider-specific `Flex` fallback behavior.

GitOrigin-RevId: 7d67ae6177bb1b3c0be4ecf0910106aaaf2bd0be
2026-10-26 21:21:23 +00:00
goodman-oai 698599a411 Support model-catalog wording for permission path warnings (#57263)
## What changed

- Add optional `omitted_paths` and `denied_reads` fields to catalog permission messages. The latter requires exactly one `{{ denied_reads }}` placeholder.
- Preserve mandatory denial and no-bypass warnings, path/glob facts, and existing path selection limits. Limit each override to 500 UTF-8 bytes and fall back independently to bundled wording for invalid overrides.
- Pin `i18n-config` to an upstream revision that removes the unmaintained `basic-toml` dependency, updating Cargo and Bazel lockfiles.

## Testing

Add serialization and rendering coverage for sparse values, invalid templates, byte limits, and preserved policy facts. Extend model-switch scenarios to verify that warning wording follows the selected model while preserving request history and permission annotations.

GitOrigin-RevId: f5fa1a978abe07d90917f552c64e7c8fc257c061
2026-10-26 21:20:52 +00:00
Alex Daley 3cacafa0b7 Add incremental skill catalogs behind skill_catalog_deltas (#57262)
## What changed

- Add the disabled-by-default `skill_catalog_deltas` feature flag to append new and updated skills without repeating unchanged catalog entries.
- Share a cumulative metadata budget across executor, cloud, and host catalogs, preserving usage across turns and resume. Removals emit no update and do not refund budget.
- Rebuild the current catalog and reset its budget after compaction, including any required skill root mappings in updates.

## Testing

Add unit and integration coverage for update costs, shared source budgets, feature rollback, and catalog updates across resume and compaction, with a request-history snapshot.

GitOrigin-RevId: e88b4265d7361498113d43fdc2e0260a9f930bbc
2026-10-26 21:20:21 +00:00
swastik-oai bd72161881 Separate apply_patch request preparation from execution (#57261)
## What changed

Extract patch parsing, verification, and permission assessment into request preparation helpers used by the tool handler and intercepted shell patches. Execute the prepared `ApplyPatchRequest` through the existing runtime and derive auto-approval status from its approval requirement.

Move approval action construction onto `ApplyPatchRequest` and update the existing approval tests to use the new helpers.

GitOrigin-RevId: 7f07d38f0dbf2a971c94b897281651b7a174fd05
2026-10-26 21:15:23 +00:00
swastik-oai 51849772f0 Centralize permission request preparation and approval actions (#57260)
## What changed

Introduce `PreparedPermissionRequest` to encapsulate argument parsing, path resolution, permission normalization, and approval action construction. Pass the prepared request, including the selected environment ID, into session permission handling.

## Testing

Extend the selected-environment path resolution test to assert that the prepared approval action carries the expected environment, reason, and resolved permissions, matching the emitted permission request.

GitOrigin-RevId: ebd34fad0e5d4c9f98330d17a6254325526b8c78
2026-10-26 21:14:59 +00:00
Ian MacLeod 81cbc26ee3 Render Markdown in TUI async question choices (#57259)
## Why

Async question titles support Markdown, but named choices display Markdown syntax as plain text.

## What changed

Render named choices with Markdown styling and terminal hyperlinks, wrapping them to the available width after the numbered prefix. Use the rendered rows for height measurement and scrolling, and reuse layout measurements for the option tip.

Share viewport-aware Markdown rendering between question titles and choices, preserving hyperlink destinations when splitting overwide tokens.

## Testing

Extend tests to cover Markdown-aware height measurement, italic styling, and terminal hyperlinks in selected choices. Update the long-choice snapshot to show text starting beside its numbered prefix.

GitOrigin-RevId: 7a1292ac7dff16b55439888d569fc7fa7c6ef689
2026-10-26 21:14:35 +00:00