Commit Graph
10506 Commits
Author SHA1 Message Date
Adam Perry @ OpenAI 17a9df60e4 Add an experimental flag for bundled tools in login shells (#49403)
## What changed

Register `login_shell_package_path` as a disabled-by-default experimental feature and add it to the configuration schema. Expose it in `/experimental` as “Bundled tools in login shells,” with a description explaining its intended use when login shell startup resets `PATH`.

## Testing

Extend the experimental feature metadata snapshot test to cover the new feature's label, description, and unchecked default state.

GitOrigin-RevId: dc110486ccd8d2d76ac788ba5a413a1374699ff8
2026-09-29 23:33:58 +00:00
ningyi-oai 87d3e06847 Preserve live tool-call metadata across request windows (#49401)
## Why

Persistence and aggregate metadata budgets can omit tool-call observations that are still relevant to the current request, including tool result metadata needed during compaction.

## What changed

- Retain live direct-call observations separately from bounded persisted outputs, keyed by response item ID so reused call IDs cannot mix results.
- Restore those observations for sampling and compaction, pruning them only when sampling confirms they have left the history window. Preserve observations across shortened compaction retries.
- Remove aggregate prompt metadata caps while retaining per-call argument limits and the outgoing message size limit. Invalidate cell completeness when argument normalization truncates a recorded call.

## Testing

Add regression coverage for exhausted persistence budgets, reused call IDs and reversed completion order, shortened compaction retries, and completeness after argument truncation. Extend integration coverage for large Code Mode metadata, provider metadata support, and fork/resume behavior.

GitOrigin-RevId: 004082b69bff9cc8b05f36d1052057f163c67f07
2026-09-29 23:24:37 +00:00
Eric Traut ceea67163f Remove randomized greetings from TUI session headers (#49395)
## What changed

Remove startup greeting phrases and the shared greeting state from startup drafts, session headers, and the empty-state animation. Raw session headers now consistently include `model:` and `directory:` fields.

## Testing

Update startup and fresh-thread snapshots to omit greetings, and adjust raw-header assertions to check model and directory fields.

GitOrigin-RevId: 531b5ba42d7a88f86b1c7f69030f3560abc25198
2026-09-29 23:09:32 +00:00
Celia Chen 05ea5f757e Add attributed MCP OAuth credential storage telemetry (#49392)
## What changed

- Instrument MCP OAuth loads, saves, deletes, fallback cleanup, and refresh persistence with credential-free storage metrics, distinguishing configured policy from operations on a pinned store.
- Retain the originating client across background tasks, blocking storage operations, and session recovery, including recovery after startup found no credentials.
- Preserve typed keyring and lock error categories for metrics and remove raw error details from storage warnings.

## Testing

Add tests for policy and pinned-store outcomes, best-effort cleanup failures, wrapped lock errors, and successful or failed refresh persistence without duplicate observations. Add recovery tests that verify client attribution after anonymous startup and across threads with different originators.

GitOrigin-RevId: 5ea4528bcdcf500c8ffdf1d9c7008ea52112c726
2026-09-29 23:01:46 +00:00
jgershen-oai 9212b3eca8 Serialize tests that share Windows sandbox accounts (#49389)
## Why

Elevated sandbox tests share machine-local Windows accounts. Concurrent setup can rotate account passwords between another test's setup and logon.

## What changed

- Add a shared file-lock guard for elevated sandbox tests in `codex-core`, `codex-exec-server`, and `codex-windows-sandbox`, held through sandbox commands and cleanup.
- Queue these tests in a single-threaded Nextest group before their timeouts start, while retaining the file lock to coordinate other test processes.
- Limit account locking to tests that use elevated accounts and remove the sandbox crate's blanket Bazel `exclusive-if-local` tag.

GitOrigin-RevId: 26d4606cb1fdcac65926d29835bed4eac04c19c0
2026-09-29 22:50:07 +00:00
Dmitriy Kovalenko d6571322d2 Fix Windows path inference for opaque URIs with slash prefixes (#49388)
## Why

Opaque Windows paths encoded as UTF-16LE could be mistaken for POSIX paths when they began with `/`, or fail Windows convention inference when their leading separators mixed `/` and `\`. This prevented them from retaining the Windows path convention across URI serialization.

## What changed

Distinguish a UTF-16LE slash from a POSIX root and recognize either Windows separator in both positions of an opaque UNC prefix.

## Testing

Add round-trip coverage for Windows drive, UNC, device, and namespace paths, including forward and mixed separators. Cover JSON serialization, absolute-path joins, relative-path separator handling, and Windows-only host-native conversions.

GitOrigin-RevId: d4e8a40a314cfc030c30fa8c124bfdd1e565076d
2026-09-29 22:49:42 +00:00
Celia Chen a44afa527c Track credential storage outcomes and redact sensitive errors (#49384)
## Why

Successful file fallback can hide a secure-store failure. Storage diagnostics need to distinguish that fallback from explicit file storage while keeping credential values out of error output.

## What changed

- Record credential load, save, delete, and fallback-file cleanup outcomes, including secure-store failures and fallback reasons.
- Preserve the initiating client's attribution across app-server requests, login tasks, sessions, turns, and blocking token persistence.
- Preserve storage error context and typed causes while redacting credential JSON data errors and payload-bearing keyring errors.
- Include sanitized fallback completion warnings in the default `codex login` file logs.

## Testing

Add coverage for storage policy and metric attribution, credential redaction, login diagnostics, concurrent app-server clients, device-code login, and token refresh during a turn.

GitOrigin-RevId: 6d5651c1718d184016fa77befa02aa528750b2ae
2026-09-29 22:24:09 +00:00
jif bd4204efc2 Compile hook matchers during discovery (#49379)
## Why

Hook dispatch recompiles regex matchers for each input even though discovery already validates them.

## What changed

Store compiled `HookMatcher` values on configured handlers and reuse them during dispatch. Preserve match-all, exact-name, pipe-alternative, and regex matching semantics, along with the original pattern spelling for configuration equality. Invalid regexes continue to be rejected during discovery.

GitOrigin-RevId: 117a8a19c7bc0e55ccbedcd5940b806a17ebba10
2026-09-29 22:04:56 +00:00
Celia Chen 2a34aef794 Update Bedrock GPT-6 Sol catalog tests to expect multi-agent V2 (#49369)
Update the runtime catalog test expectations for `global.openai.gpt-6-sol`
and `us.openai.gpt-6-sol` from `MultiAgentVersion::V1` to
`MultiAgentVersion::V2`.

GitOrigin-RevId: 1b038ab988cae221a641ee54002bffc25109f45c
2026-09-29 21:25:26 +00:00
Celia Chen 94d642d8b4 Clarify credential storage wording across authentication UI and docs (#49361)
## Why

Credentials can use a keyring backend, so describing all login and logout operations as reads or writes to `auth.json` is misleading.

## What changed

- Remove the API-key onboarding claim that keys are stored in `auth.json`.
- Describe authentication storage and credential-removal errors in terms of stored credentials and the selected backend.
- Label the doctor output's auth-file path as the file backend or fallback, and document why startup checks also consider `config.toml` when credentials may be in a keyring.

## Testing

Add API-key entry snapshots for terminal widths of 80 and 40 columns.

GitOrigin-RevId: 87189f422448b88721ea2d7448930ece63102803
2026-09-29 20:46:44 +00:00
Adam Perry @ OpenAI 995138d71a Carry shell invocation metadata and report executor PATH directories (#49360)
## What changed

- Carry the selected shell and login mode through unified exec using `ShellInvocation`. Use this metadata for shell snapshots and credential brokerage instead of inferring it from command arguments.
- Add `prependPathDirs` to exec-server environment metadata, populated from the executor's package PATH directory. Default to an empty list for older servers and omit empty lists from serialized output.

## Testing

Extend environment metadata round-trip coverage for `prependPathDirs` and the remote exec-server integration test to verify the packaged `codex-path` directory is reported.

GitOrigin-RevId: c571c068effcb305d196a701ad9a335ec7a3f5a2
2026-09-29 20:40:21 +00:00
Benjamin Carlsson 1983c48fd1 Continue Markdown blockquotes when pasting multiline text (#49357)
## Why

Pasting multiple lines into a blockquote previously left subsequent lines unquoted.

## What changed

- Continue the current line's `> ` prefix across pasted lines, including blank and trailing lines, in the TUI composer and embedded answer fields.
- Append two unquoted newlines so typing resumes in the next Markdown block. Preserve quoting when large paste placeholders expand on submission.
- Use a shared edit target for paste context and insertion so selection replacement uses the prefix at the replacement start.
- Keep shell input and provisional startup pastes literal.

## Testing

Add unit tests and rendering snapshots for blockquote pastes, embedded answers, cursor placement, selection replacement, and large-paste expansion. Add textarea tests for forward and backward selections, adjacent elements, and Vim Replace backspace recovery.

GitOrigin-RevId: 525a7951aa16a25d49cc3be98822d0dd0709de97
2026-09-29 20:22:34 +00:00
viyatb-oai 804d6306e8 Allow approved filesystem escalation while preserving denied reads (#49353)
## Why

Denied-read policies previously kept explicitly approved commands within their original filesystem restrictions, preventing operations that need broader write access, such as updating Git metadata.

## What changed

- Apply broader filesystem permissions after approval of explicit escalation while retaining the sandbox, denied reads, and network policy. Command allow rules alone do not widen filesystem access.
- Reject escalation when the required local sandbox is unavailable or a remote exec server lacks support for preserving the restrictions.
- Track escalated terminal access so subsequent `write_stdin` calls still require review when stdin approval is enabled.

## Testing

Add coverage for approved and denied escalation, allow rules, remote server compatibility, and stdin approval before input delivery. Add a Windows integration test verifying that an approved `git pull` updates Git metadata while exact-path and glob-based read denials remain enforced. Serialize Windows sandbox integration tests across processes to protect shared test account credentials.

GitOrigin-RevId: 5dce6d41487ee4d39bd795c8d086398ab9794d5b
2026-09-29 19:50:50 +00:00
Celia Chen 8ffd91e42a Enable multi-agent V2 and Ultra reasoning on Amazon Bedrock (#49345)
## What changed

Preserve catalog `multi_agent_version` values instead of forcing V1, allowing models that declare V2 to use it by default. Retain Ultra in supported reasoning levels so it appears in the Astra advanced reasoning picker for Bedrock Mantle and Runtime.

## Testing

Add coverage for preserving configured multi-agent versions, selecting V2 and exposing `collaboration.spawn_agent` and `collaboration.followup_task` without the V2 feature flag, and displaying and selecting Ultra in both Bedrock reasoning pickers.

GitOrigin-RevId: 4fb1336c79b3f86ce12fa5ea81fe2237a300840d
2026-09-29 19:03:30 +00:00
Celia Chen a6e9eaa9bd Add GPT-6.1 Sol to Bedrock catalogs and make it the default (#49339)
## What changed

Add `openai.gpt-6.1-sol` to the Bedrock Mantle catalog and its `global.` and `us.` variants to the Bedrock Runtime catalog. Make GPT-6.1 Sol the default and provider fallback model, preferring the global variant for Runtime. Keep existing models available.

## Testing

Update catalog and provider assertions, thread-start fallback tests, and TUI model-picker snapshots to cover GPT-6.1 Sol and the new defaults.

GitOrigin-RevId: ec65744ff9409980474cc1faf516beed0b2430da
2026-09-29 18:50:36 +00:00
jif ed9e5a26a8 Clean up canceled exec-server RPC requests immediately (#49332)
## Why

Canceled RPC calls could leave entries in the pending request map until further traffic or disconnect. Cleanup should happen when the call is dropped, even if no response arrives.

## What changed

Use a `PendingRequestGuard` to remove each registration when its call completes or is canceled. Protect the pending map with a synchronous mutex so cleanup can run in `Drop`, replacing opportunistic pruning and explicit error-path removals.

## Testing

Add a regression test that drops an in-flight call and verifies that the pending request count immediately reaches zero without further traffic.

GitOrigin-RevId: 82c0629f37a2f4bb89b8d10e167e2a09765b26eb
2026-09-29 18:34:48 +00:00
yansenzhou-oai 5937592c07 Keep remote control reconnect backoff capped during sustained failures (#49330)
## Why

Reaching the reconnect backoff cap reset the attempt counter, restarting fast retries during sustained failures such as HTTP 409 responses indicating that the remote app server is already online.

## What changed

Keep the reconnect delay at the 30-second cap and stop advancing the backoff exponent once capped. Successful connections and auth changes still reset backoff. Remove logging for the obsolete reset-at-cap behavior.

## Testing

Add regression tests for long failure streaks and repeated HTTP 409 handshakes, with and without a subscribe cursor. Verify capped retry intervals, recovery after a successful handshake, backoff reset on success, and preservation of enrollment and cursor state.

GitOrigin-RevId: 56e3f10ec5ceeced5a71397a99ca22b75dd5ef52
2026-09-29 18:26:40 +00:00
zm-oai 26dd19ef47 Retry Windows sandbox runner logon once on error 1056 (#49325)
## Why

`CreateProcessWithLogonW` failures with `ERROR_SERVICE_ALREADY_RUNNING` (1056) previously aborted sandbox startup without retrying. At this stage, neither the runner nor the user command has started, so retrying does not replay the command.

## What changed

Retry runner creation once with the same sandbox credentials when logon returns error 1056. Propagate a second failure without refreshing credentials, and keep child startup errors with the same code ineligible for this retry.

## Testing

Add regression tests for recovery, the two-attempt limit, and exclusion of child startup failures. Add a unified exec test that injects a logon failure, verifies that the retry preserves the original request and credentials, and checks that the command runs exactly once.

GitOrigin-RevId: 78def6cdb93bf32f9b4a3e398cd16de83286fec4
2026-09-29 18:06:32 +00:00
andrewgu-oai b1e72963c3 Add GPT-6.1 Sol as the default catalog model (#49318)
Add `gpt-6.1-sol` to the bundled model catalog with its capabilities,
reasoning levels, and availability message. Give it the highest catalog
priority and update older Sol descriptions to reflect their generations.

Update startup, model picker, and tool catalog snapshots to reflect the
new default and catalog contents.

GitOrigin-RevId: 1092a0524c6d1813ddd600c31c4fd0e708294ae9
2026-09-29 17:22:13 +00:00
jif 63475131ce Notify parent agents when Guardian stops a subagent (#49312)
## Why

A subagent stopped by repeated Guardian denials remained interrupted without notifying its parent. The parent needs guidance to report the stop and wait for explicit user confirmation before continuing the blocked work.

## What changed

Forward `TooManyDenials` interruptions from `MultiAgentV2` children to their parents with Guardian-specific guidance to inform the user and avoid resuming or retrying until the user explicitly confirms. Preserve the child's `Interrupted` status and keep ordinary interruptions silent.

## Testing

Add integration coverage for parent notifications under `CircuitBreakAction::Strict`, silence under `CircuitBreakAction::Default`, and preservation of the child's interrupted status. Add a unit test ensuring long denial messages stay within the notification token limit while retaining the guidance.

GitOrigin-RevId: c9bb90827393068d9c92edaf0443a52e6ff57f9f
2026-09-29 16:53:11 +00:00
Eric Traut 50d9c5deac Run piped legacy Windows sandbox processes without a console (#49308)
## What changed

Use `ConsoleMode::NoWindow` for legacy Windows sandbox capture and non-TTY unified execution, enabling `CREATE_NO_WINDOW` for these piped processes.

## Testing

Extend the PowerShell interrupt and capture tests to assert that `GetConsoleWindow()` returns null before checking process termination and descendant survival.

GitOrigin-RevId: dcc3b5554986ab0280748e5fa7080d36ded3d673
2026-09-29 16:39:34 +00:00
jif c2837d8ece Batch metadata reads when resolving thread names (#49305)
## Why

Thread name resolution performs a separate SQLite metadata lookup for each thread. Batch these reads to reduce database queries for large result sets.

## What changed

Add `StateRuntime::get_threads` and use it in `resolve_thread_names`. Fetch metadata in batches of at most 999 IDs to stay within SQLite's bind limit, skipping missing or invalid records independently so valid metadata remains available.

## Testing

Add regression coverage for reads spanning multiple batches, invalid and missing records, duplicate IDs, and empty input.

GitOrigin-RevId: a403416f1da5adea56705c70839850760d3eb550
2026-09-29 16:36:07 +00:00
jif a6f09397aa Compact the inline hidden tag buffer once per chunk (#49300)
## Why

Parsing multiple tag delimiters in a chunk repeatedly drained the pending
buffer, shifting its remaining contents after each delimiter.

## What changed

Track a consumed offset in `InlineHiddenTagParser::push_str` and drain the
buffer once after processing the chunk, preserving partial delimiters for
the next chunk.

## Testing

Add a regression test comparing visible text and extracted tags against
single-chunk parsing at every UTF-8 character boundary. The input covers
non-ASCII text and delimiters, adjacent tags, an empty tag, and an unfinished
tag at end of input.

GitOrigin-RevId: 18bfbfdb81060ffda30901d5cb82ee5804878b09
2026-09-29 16:26:46 +00:00
jif d5e6526362 Scan the session index backwards for batch thread name lookups (#49297)
## Why

Batch thread name lookups read the entire append-only session index even when all requested names could be found near the end.

## What changed

Use `ReverseJsonlScanner` in `spawn_blocking` for `find_thread_names_by_ids`, stopping once every requested ID has a usable name. Preserve the latest nonempty, trimmed name for each ID while skipping malformed entries.

## Testing

Add regression coverage for renamed threads, whitespace-only names, Unicode, reads across chunk boundaries, malformed entries, a partial final write, and missing IDs.

GitOrigin-RevId: 2ab9254ba8b718fe3e02c47fc9b0de20c09fd10f
2026-09-29 16:16:39 +00:00
jif cf12c86dc5 Simplify configuration fingerprint canonicalization (#49295)
## What changed

Replace the custom recursive JSON canonicalizer with `serde_json::Value::sort_all_objects()` before hashing configuration values, preserving existing fingerprints.

## Testing

Add a regression test that checks reordered keys in nested tables and tables inside arrays produce the same existing fingerprint.

GitOrigin-RevId: 890e79865a1d690adea3b35f19fcc6c30dbd17ce
2026-09-29 16:10:27 +00:00
felixxia-oai d79a95bdf8 Record Guardian context mode in review and classification telemetry (#49294)
## Why

Guardian review and classification telemetry lacks the context mode needed to distinguish `legacy`, `independent`, and `thread_owned` reviews.

## What changed

- Add `guardian_context_mode` to review and classification analytics and `context_mode` to their metrics.
- Capture the mode from the conversation history snapshot before review preparation or classification setup so failure metrics retain it, including when review preparation or reviewer startup fails.
- Use `unknown` for review metric tags when no context mode is available.

## Testing

Update metric assertions to cover `thread_owned` classification tags and the `unknown` review fallback.

GitOrigin-RevId: 79f7d11b3e4ccfc53681890d75fbc7c54e1ce7de
2026-09-29 16:09:48 +00:00
Nick Steele 4773a132c3 Add /mcp login <name> to the TUI (#49290)
## What changed

Allow users with an active session to start MCP OAuth sign-in through `/mcp login <name>`. Request login through the app server, open the authorization URL in the browser, and display success or failure in the originating thread.

Guard overlapping start requests and track login attempts per server so stale retry completions do not overwrite current results. Skip opening the browser when the attempt has already completed, and retain results across thread switches and session refreshes.

## Testing

Add command dispatch coverage and regression tests for overlapping starts, stale retry completions, rejected starts, independent server logins, and result retention across thread switches and session refreshes.

GitOrigin-RevId: aeec2dbee566660f9aa26ef23039196ef3ca49d6
2026-09-29 16:00:05 +00:00
jif 65c3f40bef Model exec-server session attachment state as an enum (#49286)
Replace the three optional fields in `AttachmentState` with `Attached` and
`Detached` variants, making inconsistent field combinations unrepresentable.
Keep the connection ID in both variants and the expiration deadline only in
`Detached`, and update attachment and expiration checks to match on the state.

GitOrigin-RevId: 6a5f05f0ce2f064acc8f5cacd00bc374c4f47986
2026-09-29 15:41:22 +00:00
Michael Zeng 18194bfd35 Restrict capability roots to captured turn environments (#49280)
## Why

Stale thread capability roots can reconnect executors that are not selected for the current turn and shadow selected roots with the same ID.

## What changed

Filter out roots whose environments are absent from the turn snapshot before deduplication and readiness resolution. Update app-server capability tests to explicitly select the executor environments used by each turn, including after resume.

## Testing

Add regression coverage for full-access and workspace-write permissions, verifying that stale roots never connect an unselected executor, selected roots with matching IDs remain available, and turns with no environments expose no roots.

GitOrigin-RevId: afe375047cc5e8aad06df83334149510460dcdcc
2026-09-29 15:10:17 +00:00
felixxia-oai d515b2f85e Avoid a turn teardown race in the Guardian agent message test (#49277)
## Why

`TurnComplete` can arrive before the previous turn finishes teardown, making `start_turn_if_idle` race with cleanup in the encrypted parent reply scenario.

## What changed

Submit the reply through `Op::InterAgentCommunication` so it queues through the same mailbox path as real agent messages. The scenario continues to verify that the encrypted parent reply appears exactly once in each incremental Guardian review.

GitOrigin-RevId: 3d356c274442aa839324b9425490feafacd47313
2026-09-29 14:52:58 +00:00
Nick Steele 4994306e9f Enable enterprise MCP sign-in and account-scoped grant cleanup (#49276)
## Why

The app server previously rejected OAuth login for enterprise-managed MCP servers. These servers need an explicit sign-in flow that ties saved authorization to the active Codex user and workspace and prevents canceled or superseded attempts from saving credentials.

## What changed

- Enable enterprise sign-in through `mcpServer/oauth/login` for configured servers with a connected thread, trusted IdP registration, and `features.use_xaa` enabled. Scope shared enterprise credentials by user, workspace, issuer, and client ID.
- Add `loginId` to MCP OAuth login responses and completion notifications, preserving compatibility with older servers that omit it.
- Support enterprise login replacement and `account/login/cancel`, wait for callback listener shutdown before replacement, and recheck account and configuration before saving grants. Fence stale attempts across processes and account changes.
- Remove shared enterprise authorization during account logout and `codex mcp logout`, including when the feature is disabled. Continue account logout if enterprise cleanup fails, and invalidate MCP runtimes on account changes.

Start a fresh session after successful enterprise sign-in to use the saved grant.

## Testing

Add regression coverage for login replacement and cancellation, callback port reuse, account changes during setup, cross-process logout invalidation, persisted workspace policy selection, cleanup failures, and responses from older servers without `loginId`.

GitOrigin-RevId: 7ed4caaab4659ed1e67064262cf5cee48e3a26ac
2026-09-29 14:46:33 +00:00
felixxia-oai 677b07eca0 Isolate realtime conversation tests from Responses prewarm connections (#49275)
## Why

Responses prewarm can reconnect and consume scripted WebSocket replies intended for realtime conversations when both share a test server.

## What changed

- Give realtime conversations a separate scripted server in tests for runtime replacement, prompts, and voice selection.
- Disable Responses WebSocket prewarm in the audio/text round-trip test while preserving coverage of the default realtime endpoint.
- Update connection counts and request assertions to address only realtime connections.

GitOrigin-RevId: 8e3b5ac86ee80777cf94063db468c80203966999
2026-09-29 14:45:09 +00:00
Nick Steele 0b1b78a4f1 Preserve thread overrides and cloud policy validity during config reloads (#49269)
## Why

Reloads can reject a valid thread configuration when the host configuration references a missing model provider that thread overrides replace. Concurrent cloud refreshes can also leave older policy snapshots or staged cache writes eligible for publication.

## What changed

- Compose preserved session layers before materializing refreshed configuration, retaining source-aware validation errors.
- Carry cloud policy revision bindings through config loading and role overrides. Reject stale MCP refreshes and disable enterprise MCP authorization when the policy is suspended. Retire the old policy when replacing or clearing its loader.
- Stage cloud cache writes in temporary files and publish them atomically only while their policy revision remains current.
- Route file reloads through the shared runtime refresh path, resolve paths relative to each config file, and preserve session settings. Restore host defaults for `secret_auth_storage` and `mcp_oauth_refresh_coordination` when explicit overrides are removed.

## Testing

Add regressions for thread-provided model providers, managed plugin and feature requirement refreshes, stale and suspended policy snapshots, superseded and retired cache writes, and file reloads preserving runtime settings and restoring feature defaults.

GitOrigin-RevId: 3280a2445eeb7074a142f720690bb0e4f01d174b
2026-09-29 13:58:09 +00:00
jif 68e1a421f5 Support remote agent message boards in multi-agent sessions (#49267)
## What changed

Add `features.multi_agent_v2.message_board_remote` with a board URL and a bearer token supplied directly or through an environment variable. When configured, use the remote board in preference to local or in-memory storage, including in ephemeral sessions, while preserving the existing board tools and session identity.

Ignore remote board settings in project-local configuration and use the runtime HTTP client and clock for remote requests.

## Testing

Add a mock-server integration test and snapshot covering an ephemeral session posting through the existing tool, with the expected bearer authentication, session identity, timestamp, and returned post.

GitOrigin-RevId: 263413d90a1ee4c0bdba8c1b08ba9f68bdd7a986
2026-09-29 13:52:04 +00:00
jif 5f7d5add2a Remove the remote agent message board client README (#49266)
GitOrigin-RevId: b165bcc82473b5896f830ad8e56cca06b6f8bf7a
2026-09-29 13:49:49 +00:00
jif a7660cd154 Trace turn phases and correlate accepted input with turns (#49262)
## Why

Steering and recovery requests can have different traces from the turn they join. Sampling can also finish while tools remain in flight. Tracing needs to preserve that correlation and distinguish sampling time from time spent waiting for tools.

## What changed

- Add `codex.turn_input` spans with `conversation.id` and the accepted `turn.id` for started, steered, and recovered turns.
- Add sampling, tool-blocking, and automatic and manual compaction spans with `codex.turn.phase` and conversation and turn IDs. End the sampling span before draining outstanding tools.
- Emit a `codex.mailbox_preemption` event when pending mailbox input preempts sampling.

## Testing

Add integration coverage for cross-trace steering and recovery, sampling and tool-blocking boundaries through a blocked dynamic tool, and completion or interruption. Extend mailbox preemption tests to check event emission with preemption enabled or deferred.

GitOrigin-RevId: 59893c2d463c02cbd05f5c332e5afc2351cc8b62
2026-09-29 13:09:30 +00:00
zm-oai f35a0fdc5d Preserve Windows sandbox runner launch errors (#49261)
## Why

Restoring the error mode with `SetErrorMode` can overwrite the failure code from `CreateProcessWithLogonW`, causing `RunnerLogonError` to report the wrong error.

## What changed

Capture `GetLastError()` immediately after a failed runner launch, before restoring the previous error mode, and use the saved code for `RunnerLogonError`.

GitOrigin-RevId: c0f4267232306be4d06e7e8accd60f7b77b8d6f3
2026-09-29 13:09:03 +00:00
Nick Steele af0d68a236 Restrict enterprise MCP auth and fail closed on config refresh (#49260)
## Why

Configuration reloads must honor current managed restrictions without granting new enterprise MCP authority to existing sessions or overwriting newer configuration with stale snapshots.

## What changed

- Allow enterprise managed authentication only for configured MCP servers. Remove plugin `ema_auth` overlays from the schema and disable servers that still use them.
- Refresh ordinary MCP settings while preserving session settings and initially admitted enterprise registrations. Disable enterprise MCP when its registration changes, policy revokes access, or configuration loading or resolution fails; require a new session to restore enterprise authority.
- Publish refreshes only when their captured configuration is still current, with bounded retries in app-server reloads. Preserve updated managed restrictions even when a refresh is rejected.
- Finish processing other thread refreshes before `config/mcpServer/reload` reports a rejection, and document that an error can accompany partially applied changes.

## Testing

Add regression coverage for stale refreshes, bounded retries, managed-policy revocation, persistent enterprise disablement, ordinary MCP transport changes, and rejection of plugin enterprise authentication. Verify that denied enterprise servers receive no requests.

GitOrigin-RevId: 34429cd339c1ec152a2ee8697cb29f0cff5d9e5f
2026-09-29 13:08:37 +00:00
felixxia-oai 4f16bdc265 Allow Guardian cached approvals with incomplete root context (#49257)
## Why

Missing retained root instructions could indefinitely block a worker's matching low-risk cached score from approving an action.

## What changed

Require complete retained local context for cached approvals, while allowing incomplete root context when the cached score matches the current authorization. Root omissions remain visible to the classifier.

## Testing

Extend the cached-delivery regression test to verify that a worker with complete local context and an `IncompleteRootInstructions` marker can approve using a matching low-risk cached score.

GitOrigin-RevId: 06feda47fe47feb933c67239d32bf154b2032615
2026-09-29 12:56:14 +00:00
felixxia-oai 0462dcc062 Use executable fixture copying in the bundled bwrap test (#49246)
## Why

Copying executable fixtures in the test process can expose writable file descriptors to sibling spawns. The shared `copy_executable` helper completes copies in a separate process on Linux before launching the fixtures.

## What changed

Use `copy_executable` for both `codex-linux-sandbox` and `bwrap` in `bazel_build_rejects_tampered_bundled_bwrap`, and add `codex-utils-cargo-bin` as a Linux test dependency.

GitOrigin-RevId: 05fb1381eeefb64568b525925c9e81863acc2b54
2026-09-29 11:51:21 +00:00
Eric Traut c248f6d48b Fix model provider lookup for TUI history (#49171)
Read `model_provider` from the effective configuration's nested `config`
field in `history_model_provider`, retaining the `openai` fallback.

GitOrigin-RevId: 06a8b3da1b499e673f80b8827951020c469c3970
2026-09-29 05:10:13 +00:00
Eric Traut fbc169827e Suppress Windows console windows for background subprocesses (#49164)
## Why

Background helpers launched from a detached Windows process can allocate console windows. Job Object launches and containment fallbacks need to preserve console suppression as well.

## What changed

- Add `codex_utils_process::background_command` to set `CREATE_NO_WINDOW` on Windows, and use it across background subprocess launches, including Git, plugins, authentication, diagnostics, and sandbox helpers.
- Centralize console suppression in Job Object launches. Keep `CREATE_NO_WINDOW` when retrying without containment, and clear `CREATE_SUSPENDED` so the fallback child can run.
- Preserve console inheritance for interactive shell launches and interactive AWS authentication refreshes.

## Testing

Add Windows regression tests covering console-free launches from detached parents through standard and Tokio commands, stdout/stderr capture, successful containment, Job Object creation and assignment failures, and sandbox setup refresh helpers.

GitOrigin-RevId: b2c238fa7d4f9fbd868e5adf7d4be9958ff01e6c
2026-09-29 04:38:37 +00:00
Eric Traut 3226512d47 Honor app-server provider defaults in the TUI (#49161)
## Why

Client provider defaults can override the app server's configured provider and hide its sessions from resume and fork history.

## What changed

- Omit implicit provider overrides from thread start, resume, and fork requests so the server can resolve its defaults.
- Use the server's effective provider for named history lookup, `--last`, and resume and fork pickers, while honoring explicit CLI and selected-profile choices.
- Respect managed provider requirements when resolving history filters and preserve the active session's provider when forking it.

## Testing

Add app-server regression tests for provider defaults, explicit choices, configuration changes, selected profiles, and managed requirements. Add CLI coverage for resume and fork pickers and `--last` with local daemon and embedded servers, plus a picker rendering snapshot.

GitOrigin-RevId: a077758b13a5e55552b52e5532ad4bebe86dce7e
2026-09-29 04:17:32 +00:00
Eric Traut 0d7b8117d3 Support projectless TUI sessions with workspace defaults (#49160)
## What changed

- Skip folder trust prompts for locally discovered projectless directories without a saved trust decision. Apply workspace-write permissions and granular approval defaults only when local execution, configuration, and managed policy allow them.
- Prompt for Windows sandbox setup when needed before enabling implicit workspace-write permissions.
- Restore saved task permissions on resume unless explicitly overridden, and keep ordinary turns from overwriting the server's saved permission profile. Track explicit approval reviewer choices separately from restored permissions.
- Let `/cd` request folder trust with a “Keep current directory” option. Recheck task activity and background terminals before switching, and enforce destination permission requirements.

## Testing

Add regression coverage for projectless defaults and session transitions, explicit permission overrides, saved profile preservation, trust discovery, destination policy conflicts, and the directory consent and Windows sandbox prompts.

GitOrigin-RevId: cf74f5a90245f2aee96caa80d76de64da6ec1ebd
2026-09-29 04:13:14 +00:00
Benjamin Carlsson c6c7c8d270 Omit blockquote markers when copying quoted selections in the TUI (#49153)
## Why

Copying text selected within a blockquote adds Markdown quote markers that are not part of the selected content.

## What changed

Return plain text for selections containing only quoted content, preserving literal `>` characters and selected whitespace. For quoted tables and task lists, remove quote prefixes while retaining table reconstruction and checkbox states. Selections spanning quoted and unquoted content continue to preserve Markdown structure.

Preserve the existing logical source when marking list separator lines as omitted from Markdown copying.

## Testing

Add coverage for partial and nested blockquote selections, quoted tables and task lists at narrow and wide widths and after rewrapping, and copying a mouse-selected blockquote.

GitOrigin-RevId: 5ac0c8c47a77937e5a35c376d8908065217ad2dc
2026-09-29 03:49:47 +00:00
akira-oai 3a16c0b707 Simplify cloud task base URL normalization (#49147)
Replace the trailing-slash removal loop in `normalize_base_url` with
`trim_end_matches('/')`, preserving existing behavior.

Add regression coverage for unchanged URLs, single and repeated trailing
slashes, empty and slash-only inputs, and ChatGPT URLs with and without
`/backend-api`.

GitOrigin-RevId: db71e80c4dcaac33b308a45684b14e7edbd71528
2026-09-29 03:32:19 +00:00
Eric Traut 8d48f71922 Hide reasoning summary settings in /status for server connections (#49145)
## What changed

Omit the reasoning summaries setting from the model details when connected to a remote server or local background server. Continue displaying it when no server connection is present.

## Testing

Expand status snapshots to cover no server connection, a remote server, and a local background server, including the reasoning summary setting visibility in each case.

GitOrigin-RevId: f7213e7ad7439107705461ccf4e070501729113b
2026-09-29 03:24:14 +00:00
Eric Traut ff3c82c8a9 Preserve server reasoning summary and verbosity settings in the TUI (#49144)
## Why

Forwarding local defaults as request overrides can replace server defaults or saved thread settings for reasoning summaries and verbosity.

## What changed

Only forward `model_reasoning_summary` and `model_verbosity` as shared thread request overrides when their winning configuration layer is a session flag or an explicitly selected user profile. Use the effective values from that layer, and omit values whose winning source is ordinary user or project configuration. Preserve the existing reasoning-summary defaults for new embedded threads.

## Testing

Add coverage for profile, project, and CLI precedence. Extend outbound model request tests to verify that remote-mode thread start and resume preserve server reasoning summary and verbosity settings despite conflicting local values.

GitOrigin-RevId: 5e14254a51ed7506118a46847bb7466ab58908ef
2026-09-29 03:23:49 +00:00
Bryan Ashley f53f5a6fed Expose original error details to turn lifecycle contributors (#49138)
## Why

Turn error hooks receive only a `CodexErrorInfo` category, which omits backend metadata such as usage-limit reset times and rate-limit snapshots.

## What changed

Add borrowed `CodexErrorDetails` to `TurnErrorInput` and pass the original details through turn and compaction error notifications, alongside the existing error category.

## Testing

Add coverage for usage-limit metadata during sampling, manual compaction, and post-turn compaction, including preservation of completed answers and existing error events. Extend lifecycle tests to verify that an `InvalidImageRequest` retains its details when surfaced as `BadRequest`.

GitOrigin-RevId: 6f2058992126da0f69508ef51998e7581557deea
2026-09-29 02:40:51 +00:00
Benjamin Carlsson d7f7fa4106 Remove the plus separator after Option symbols in TUI key hints (#49136)
## What changed

Render macOS Option shortcuts as `⌥t` and `ctrl+⌥t` instead of `⌥+t` and `ctrl+⌥+t`. Keep `+` separators after text modifier labels such as `ctrl`, `shift`, and `alt`.

## Testing

Update key-label and chord assertions and UI snapshots to expect the compact labels across shortcut help, navigation hints, and tooltips.

GitOrigin-RevId: 7d52088ebce3dfa3f8bdad65eb159ca0fead8a31
2026-09-29 02:37:23 +00:00