Commit Graph
13207 Commits
Author SHA1 Message Date
alexsong-oai 6eb51a438a Retry gateway credential exports after unauthorized responses (#59816)
## Why

Cached gateway command credentials need to be refreshed when the gateway rejects them with a `401`.

## What changed

Clear the cached `credential_export` token after an inference HTTP `401` or a WebSocket upgrade rejected with `401`, then rerun the command for one retry. Preserve subsequent primary authentication recovery if the retry is also unauthorized, and document the behavior.

## Testing

Add integration coverage for using a new exported token, reporting an invalid export, recovering primary authentication after the gateway retry, and stopping after a second unauthorized WebSocket upgrade.

GitOrigin-RevId: 3397476dbfd3bec1bd44f90657c4f9e17bb7df67
2026-11-06 03:51:12 +00:00
Dmitriy Kovalenko 7b54fd245d Pack relative relocations in x86-64 musl release builds (#59805)
## What changed

Add `-z pack-relative-relocs` to the Cargo and Bazel release linker flags for
`x86_64-unknown-linux-musl`, alongside the existing safe identical code folding.

GitOrigin-RevId: 1398ea6775e6b8ec81e624def6c23e8053363544
2026-11-06 03:09:21 +00:00
lt-oai da279f6fd4 Support optional thread IDs in hosted file uploads (#59795)
## What changed

Add an optional `thread_id` to `HostedFileUploadContext` and include it as `codex_thread_id` in file creation requests when provided. Keep MCP app uploads without this field while retaining the thread ID in tool-call metadata.

## Testing

Extend upload tests to check inclusion and omission of `codex_thread_id`, and assert that MCP app calls retain `_meta.threadId` without adding it to file uploads.

GitOrigin-RevId: cff15b35e5130e56973f944b3b849807550d298b
2026-11-06 02:42:02 +00:00
rhan-oai 1031a7b9aa Check extension budgets before model generation requests (#59794)
## What changed

Add a default `ModelRequestContributor::budget_exhausted` hook and fail generation with `SessionBudgetExceeded` when any contributor reports an exhausted budget for the thread.

Check budgets before HTTP requests and before WebSocket connection setup, then check again after the connection is established. WebSocket warmup remains available when the budget is exhausted.

## Testing

Add coverage for budget changes during a tool call, verifying that exhaustion prevents the next model request while an available budget allows completion. Extend WebSocket coverage to verify that exhausted generation opens no connection and warmup still permits connection reuse once the budget becomes available.

GitOrigin-RevId: 97ce02dc7f9bd54830e4b73c4f0334a30367eebf
2026-11-06 02:31:54 +00:00
Owen Lin 2f02d8461d Support update-boundary paging across forked thread histories (#59793)
## Why

Item reads with an update boundary previously rejected forked thread histories and only supported an exclusive lower bound on update ordinals.

## What changed

- Add `before_updated_at_ordinal` as an exclusive upper bound, mutually exclusive with `after_updated_at_ordinal`.
- Allow update-filtered and update-ordered item reads across parent and child segments, applying segment bounds and preserving cursor pagination in both directions.
- Require an update boundary for update-order sorting and reject either boundary when using an item anchor or item-ID filtering.

## Testing

Extend thread-store tests to cover upper-bound filtering, descending cursor pagination, forward and backward paging across forked lineages, mutually exclusive boundaries, and ordinals outside SQLite's integer range.

GitOrigin-RevId: 63f7e18fb24a89a41ff8e570cf65963622519a25
2026-11-06 02:21:38 +00:00
viyatb-oai a6ed292aa3 Centralize managed proxy preparation and sandbox routing (#59792)
## What changed

Move proxy configuration and routing selection into `prepare_managed_network`. Keep native Windows launches direct by stripping managed proxy variables before credential brokering, and select dedicated listeners only for Windows MXC launches.

Consolidate managed network context filtering in `SandboxManager` and simplify proxy preparation for Linux and MXC while preserving the macOS Seatbelt context.

## Testing

Add Windows regression coverage for native launches with both disabled and enabled proxy configurations, verifying that managed proxy variables are removed while caller environment values and API credentials are preserved.

GitOrigin-RevId: 29fe1fb02afb574b4108032b7e8028d19d8270b4
2026-11-06 02:21:14 +00:00
Benjamin Carlsson 3cf4899cb5 Render delegated thread messages as Markdown in the TUI (#59789)
## Why

Incoming delegated messages were rendered as plain text, leaving Markdown formatting visible and links without hyperlink metadata.

## What changed

Use a dedicated history cell to render the message body as Markdown while keeping the source task attribution literal. Preserve hyperlinks and wrapping, and apply the appropriate list spacing for scrollback and the redrawable transcript.

Use the same rendering for live messages, resumed history, and transcript projection.

## Testing

Extend replay coverage to check matching live and replayed output, transcript rendering, hyperlink destinations, and shared source text across wrapped rows. Add a snapshot covering list spacing in scrollback and the redrawable transcript.

GitOrigin-RevId: e9864c7721fa1afa2d3662ab9f57122ab696a51e
2026-11-06 02:01:43 +00:00
alexsong-oai b1263c593d Support credential export commands for gateway authentication (#59787)
## What changed

Allow `model_providers.<id>.gateway_oauth.credential_export` to supply a gateway access token instead of browser OAuth. Run the configured command on first use, cache its token in memory, and deliver it through the configured header or cookie. Export failures surface directly, and command-backed providers do not require an OAuth session.

Require mutually exclusive OAuth and exporter settings, same-origin model catalog access, and rejection of HTTP redirects for command-backed gateway credentials. Share the bounded, timeout-controlled command runner with AWS credential export.

## Testing

Add tests for inference and model listing without OAuth, token caching and recovery after invalid output, preservation of primary authentication, and rejection of mixed OAuth/exporter configuration.

GitOrigin-RevId: e3dbfd8823b1992045f1c1efd56ec98ee17e07a5
2026-11-06 02:00:39 +00:00
Ruslan Nigmatullin 5e5bdee745 Decouple message lifecycle state from model-visible item IDs (#59785)
## Why

A message's model-visible item ID may be unknown until the recipient records it. Message lifecycle observers need to capture publication state before that point.

## What changed

Remove `message_id` from `MessageLifecycleInput` and give each publication's `ExtensionData` a fresh UUID key. Stop assigning an item ID when publishing messages for lifecycle observers.

## Testing

Update the agent mailbox test to store a contributor-specific token in `ExtensionData` at publication and retrieve it at consumption, verifying that publication state survives queued delivery and recipient eviction.

GitOrigin-RevId: e254f94994d0976e61cb46ee23297f3248b9a389
2026-11-06 01:50:20 +00:00
Felipe Coury d63a342256 Support multiple side chats in the TUI sidebar (#59784)
## What changed

- When side retention is enabled, let the sidebar chooser create additional side chats from the main chat or reopen existing ones.
- Add numbered, clickable tabs and keyboard navigation in the chooser. Keep the selected tab visible when space is limited.
- Preserve drafts, transcript history, and the sidebar layout when switching between sibling side chats.
- Make `/side` with a prompt request a new side chat, while `/side` without arguments reopens the selected side chat. Preserve existing reuse behavior when side retention is disabled.

## Testing

Extend TUI tests and snapshots to cover creating sibling side chats, switching through the chooser and tabs, retaining drafts and history, and restoring image attachments after failed creation.

GitOrigin-RevId: 4166010c253c40a409390f7020b69478c04cf98c
2026-11-06 01:49:57 +00:00
Alex Kotliarskyi f6a69b5873 Tie gRPC code-mode connection lifetime to live sessions (#59783)
## Why

Some hosts assign a worker per connection. Idle connection eviction can prevent a quiet session from reaching the worker holding its lease, while retaining a connection after the last session closes unnecessarily keeps that worker allocated.

## What changed

- Disable the HTTP connection pool idle timeout for gRPC code-mode connections.
- Cache URL-based clients weakly and let live sessions own the shared client, releasing their ownership on closure or failure even while the provider remains alive.
- Acquire clients for deferred RPCs only when needed and return the session error if the client has already been released.

## Testing

Add regression tests that verify connection reuse and stored state after 120 seconds of inactivity, and connection closure after the last shared session fails while the provider and session handles remain alive.

GitOrigin-RevId: bd1ff00c4003c03ed173c23dd2ed373ed354ab65
2026-11-06 01:49:33 +00:00
Dmitriy Kovalenko 1840e7dead Enable safe identical code folding for x86-64 musl releases (#59780)
## What changed

Enable `--addrsig` and `--icf=safe` for `x86_64-unknown-linux-musl` release packages in Cargo and Bazel.

Opt Cargo release builds into these flags with `CODEX_MUSL_RELEASE_LINK_FLAGS=1`, selecting `lld` and preserving existing `RUSTFLAGS`. Apply the corresponding flags in Bazel's release package transition for the x86-64 musl platform.

GitOrigin-RevId: ade3c619dad2f03fd93a6fec35477607caec8b31
2026-11-06 01:33:51 +00:00
alexsong-oai 74bfe33ec8 Add provider configuration editing to the TUI (#59779)
## What changed

- Add an “Add custom provider” entry to the provider picker and an “Edit configuration” action for editable providers.
- Provide forms for custom gateway names, base URLs, and API key environment variable names, plus supported Bedrock and GCP settings.
- Validate required fields, suggest environment variable names from the provider catalog, and preserve drafts when validation or saving fails.
- Save configuration through the connected app server, write only changed fields, and refresh the provider list after saving. For uncertain creation results, ask users to check the list before adding the provider again.

## Testing

Add editor tests for validation, draft recovery, Vim input, and patches that preserve unchanged authentication settings. Add an integration test covering the edit action and custom provider creation while preserving the default provider, with snapshots of the new UI.

GitOrigin-RevId: 8eb32ed30ed27ab671f08f565af48705f2b9f193
2026-11-06 01:33:27 +00:00
tongzhou wang 6103cf6c78 Expose acceptance metadata and code-cell links in rollout traces (#59778)
## What changed

- Add `accepted_at_unix_ms` and `accepted_seq` to conversation items, recording the first local `HistoryItemAccepted` event in trace order. Inherited context alone does not count as local acceptance.
- Add `started_code_cell_id` to model-requested `exec` tool calls when a matching code cell exists in the same thread and, when known, turn. Resolve links after replay so deferred cell starts can be matched.
- Default the new optional fields to absent when deserializing older traces and omit them from serialized output when unset.

## Testing

Extend reducer tests to cover duplicate acceptance events with out-of-order clock readings, inherited items without local acceptance, and `exec` calls with and without matching code cells.

GitOrigin-RevId: dfb594630f77d7c899398aa181c88a681587b1df
2026-11-06 01:20:54 +00:00
Abhinav daa69c411c Allow selecting a configured provider in model/list (#59776)
## Why

Clients need to list models for a configured provider other than the app-server's startup default.

## What changed

Add an optional `modelProvider` parameter to `model/list` and expose it in the generated schemas and client types. Explicit selections use provider definitions loaded at startup and respect current managed provider requirements. Unknown providers return a structured `modelProviderNotConfigured` error.

Use a temporary catalog when selecting another provider, preserving the default catalog and its disk cache while retaining runtime authentication. Requests without a selector keep the existing provider and caching behavior.

## Testing

Add coverage for provider selection, preservation of the default catalog and disk cache, unknown-provider errors, managed requirement enforcement, and runtime authentication for temporary catalogs.

GitOrigin-RevId: 6092df9f6141810c6ac215a8e1fb601f77e54747
2026-11-06 01:10:49 +00:00
ioanbudea-OAI 73b1a3bc85 Remove the legacy Seatbelt command wrapper (#59774)
## What changed

Update Seatbelt tests to call `create_seatbelt_command_args` directly with explicit filesystem and network policies, and remove the unused legacy-policy wrapper.

Reuse `FileSystemSandboxPolicy::read_only()` in read-only policy conversion and test setup instead of constructing equivalent policies inline or through legacy conversion.

GitOrigin-RevId: 2e2b3342425a3477986f41135caa18003b697fe4
2026-11-06 00:59:18 +00:00
ioanbudea-OAI c2bd770ca7 Remove the legacy sandbox policy constructor (#59772)
## What changed

Remove `FileSystemSandboxContext::from_legacy_sandbox_policy` and migrate its test callers to `from_permission_profile`. Construct read-only, disabled, and externally enforced sandbox contexts directly with `PermissionProfile`.

GitOrigin-RevId: e330b89d060061eda106232eab554be5ccd06149
2026-11-06 00:37:27 +00:00
rhan-oai 94ca55a93c Add shared service-tier support for host-owned agents (#59770)
## What changed

- Expose an optional `AgentServiceTier` provider so host-owned children, including detached children, inherit the root's committed tier during spawn preparation, startup prewarm, and each inference step.
- Reject per-turn tier overrides for children using the shared provider. Root updates apply to subsequent requests without changing requests already in flight.
- Preserve independent configured tiers and role overrides when no provider is installed, including across eviction and reload. Spawned children inherit the parent's thread preference rather than its per-turn override.
- Publish the latest committed root tier only after successful runtime registration, preventing failed duplicate starts from changing shared settings.

## Testing

Add coverage for detached-child WebSocket prewarm and between-step tier changes, shared-child override rejection, independent-tier inheritance and reload, and settings updates before registration.

GitOrigin-RevId: f0f3676813a1c59bd77baf95121e2d13e0163a8e
2026-11-06 00:24:27 +00:00
Charlie Marsh 74417e9c6b Reuse decoded WebSocket event kinds in telemetry (#59769)
## Why

WebSocket telemetry reparses text frames to extract event kinds that the transport already decodes.

## What changed

Pass decoded event kinds to telemetry and report receive failures separately. Keep JSON parsing for timing metrics and as a fallback when stream event decoding fails. Remove the `tokio-tungstenite` dependency from `codex-otel` and restrict it to tests in `codex-core`.

Limit wrapped error parsing to error events or failed stream decoding, preserving HTTP error forwarding when unrelated stream fields are malformed.

## Testing

Update runtime summary coverage to include receive failures and extend the WebSocket error forwarding test with a malformed stream field.

GitOrigin-RevId: e1f9d200fd6d30ec124a2354bdbc01f3082ddde3
2026-11-06 00:24:03 +00:00
Alex Zamoshchin 08e4f43c9a Stop prefetching plugin discovery at app-server startup (#59768)
## What changed

- Remove startup prefetching of remote catalogs, featured plugins, and recommendations while retaining installed-plugin refreshes and bundle downloads.
- Fetch featured plugin IDs on demand, concurrently with marketplace fetching when listing the remote global catalog, and reuse the cached results.
- Retire `plugin_discovery_prefetch` as an ignored compatibility flag and remove forced background catalog refreshes.

## Testing

Update app-server tests to verify that startup downloads installed bundles without discovery requests and that two `plugin/list` calls share one featured-plugin fetch.

GitOrigin-RevId: aa10474f3429102d624c83472e81ec85e3b470ae
2026-11-06 00:23:38 +00:00
Felipe Coury 9df200a068 Add sidebar tabs and nonblocking side-chat creation (#59767)
## Why

Starting a side chat waits for fork and setup requests. Keep the workspace responsive during those requests and let users return to an existing side chat through the sidebar chooser.

## What changed

- Add a clickable `Side chat` tab and `+` chooser, plus the configurable `focus_sidebar_tabs` action bound to `leader t` by default.
- Create workspace side chats in the background, showing loading and failure states with `Enter` to retry and `Esc` to go back. Preserve opening prompts and avoid taking focus when the user has moved away.
- Retain inherited permission profiles and defer startup notifications until the side chat is registered on its owning backend.
- Quiet the parent composer while the chooser has focus and prevent completion popups or repeated activation keys from consuming chooser input.

## Testing

Extend tests and snapshots for loading and failure states, returning to an existing chat, draft preservation, inherited permissions, focus transitions, and deferred MCP startup notifications.

GitOrigin-RevId: 244bcd3f170819e2260f21dc1041cf8899fe048c
2026-11-06 00:21:16 +00:00
Charlie Marsh b3c5a49458 Update WebSocket dependency forks (#59759)
## What changed

- Advance the pinned `tokio-tungstenite` and `tungstenite` fork revisions and update the Cargo and Bazel lockfiles.
- Use `OAuthCredentialsStore::File` in the gateway credential test to avoid spending the model discovery deadline on keyring-backed decryption.

GitOrigin-RevId: 2862850215abce478136137b9b68a37f3caaeed4
2026-11-05 23:10:43 +00:00
jamy-OAI b313cca1cf Enforce host-required cyber access programs per thread (#59754)
## What changed

- Expose `RequiredCyberAccessPrograms` so hosts can require an explicit allowed program on a thread. Snapshot the requirement before extension callbacks; hosts must reapply it on cold resume.
- Validate resolved `access_programs` before HTTP and WebSocket model requests, rejecting omitted or disallowed programs. Explicit `Standard` remains distinct from omission. Reject memory summarization and realtime requests when a requirement is present.
- Keep required programs scoped to the parent thread by preventing Guardian reviewers from inheriting its program, including Guardian v2 reviews.

## Testing

Add HTTP and WebSocket coverage for allowed programs, omission, disallowed programs, unsupported providers, and connection reuse. Extend Guardian tests to verify parent-only program scope and that removing the public attachment does not erase the startup snapshot.

GitOrigin-RevId: 9306a9af0e03e7a1728dfeb610cd7ec7517367fd
2026-11-05 22:49:46 +00:00
bkotsopoulos 09358089b0 Configure the Opus Bazel patch and isolate auth tests (#59752)
## What changed

- Configure Bazel to apply `opusic_sys_install_headers.patch` to `opusic-sys` with `-p1`.
- Run the cloud-managed MCP OAuth test with `--no-browser` and keep stdin open until the child exits so EOF cannot race the HTTP callback.
- Serialize the cancelled-refresh test with other auth environment tests and temporarily clear the access-token environment variable.

GitOrigin-RevId: ad76b72ae98320bd0e3ff3231e1ed874332ce38c
2026-11-05 22:18:49 +00:00
richardopenai c48785a9b7 Stop Noise relay recovery on rejected executor credentials (#59750)
## Why

Registry `401` responses during harness key validation previously produced generic relay resets, causing recovery to retry rejected executor credentials instead of surfacing the authentication failure.

## What changed

- Send an authenticated Noise handshake rejection for registry `401` responses without opening an application transport.
- Propagate the rejection as `EnvironmentRegistryAuth` and preserve it in the terminal connection state so recovery stops with a specific authentication error.
- Preserve registry HTTP status codes so `403` responses for stale harness grants and transient service failures can continue through recovery.

## Testing

Add tests that reject tampered authentication rejections and exercise session recovery: `401` stops after one rejected recovery attempt, while `403`, `502`, and `503` retry with fresh harness grants and reconnect successfully.

GitOrigin-RevId: 9a55412e583146c094948618c7c9aeb4fb4b953e
2026-11-05 22:03:55 +00:00
cooper-oai 219ab4043e Use runtime authentication for OpenAI MCP and app requests (#59749)
## What changed

- Select fresh authentication for each HTTP operation on eligible OpenAI MCP connections while preserving the connection's credential source and account network policy. Stop redirects when requests carry runtime assertions.
- Pass the owning thread's authentication and runtime context through app discovery, connector metadata, and trusted-access requests. Include the runtime authentication mode in MCP connection and tool-cache identities.
- Give resumed actors analytics clients bound to their own authentication context, and serialize stored-credential reloads with token refresh while preserving host-provided credentials.

## Testing

Add coverage for fresh request assertions, revoked account policies, redirect handling, resumed-actor isolation, and MCP uploads in dual-header and assertion-only modes.

GitOrigin-RevId: f06900a6db61cd6cf53c3aa8075afeec4d5706d9
2026-11-05 22:03:29 +00:00
Benjamin Carlsson e934edd68c Add typed Cloud user-message submission receipts (#59746)
## What changed

Add `CloudRequestHandle::submit_user_message` to submit a message with a stable ID using `SubmissionMode::Steer`. Return a `CloudUserMessageReceipt` that distinguishes started, steered, and duplicate admissions while preserving server-provided turn status and duplicate identity.

Report preflight rejections and invalid requests as `-32602`, while preserving uncertain admission outcomes as errors without automatic retries. Keep existing `turn/start` callers on `StartIfIdle` with their existing response and error behavior.

## Testing

Add receipt mapping tests and a mock-server worker test covering submission modes, single admission attempts, uncertain outcomes, input validation, and disconnected reply streams.

GitOrigin-RevId: eba120cf47cf0297b072ea373341ead663fb9bc9
2026-11-05 21:44:12 +00:00
zm-oai b93a7b1512 Repair legacy Windows sandbox bin permissions for SYSTEM (#59745)
## Why

Legacy `.sandbox-bin` ACLs grant `SYSTEM` Modify access without `WRITE_DAC`, preventing the provisioning service from reapplying the bin policy.

## What changed

- Grant `SYSTEM` inheritable `WRITE_DAC` access when protecting the sandbox bin so it can update permissions on the directory and its children.
- Before legacy provisioning, repair the old ACL through an authenticated owner handle when `SYSTEM` is denied access. Upgrade only the expected SYSTEM entry in a protected, allow-only ACL, reject unexpected permissions, and verify that `SYSTEM` can reopen the directory with `WRITE_DAC`.

## Testing

Extend ACL coverage to check `SYSTEM` permissions on the bin and existing and newly created runner files. Add an ignored Windows integration test requiring LocalSystem and user-owned legacy homes to cover successful repair, repeated repair, and rejection of an explicit SYSTEM deny entry.

GitOrigin-RevId: 2303cdf5182947c2d044c79ac7027a16f0373c7d
2026-11-05 21:33:57 +00:00
jamy-OAI af92ae158d Forward explicit cyber access programs with header authentication (#59743)
## Why

Explicit cyber access program selections were dropped for requests using `CodexAuth::Headers`, preventing the server from evaluating the requested program.

## What changed

Forward explicit program selections for header-authenticated requests, leaving entitlement decisions to the server.

## Testing

Add integration tests covering explicit selections and omission over HTTP and a reused WebSocket connection, preservation of actor and account headers, and propagation of backend HTTP 403 denials without dropping the selected program.

GitOrigin-RevId: 5e549e87a1420ce8a5f1ce5c704cc6b7630af3ba
2026-11-05 21:21:19 +00:00
Felipe Coury 194f2662b8 Add a sidebar chooser and floating workspace shortcut panels (#59739)
## What changed

- Open a sidebar chooser when no side chat exists, with keyboard and mouse controls to start a new side chat while preserving the parent draft.
- Animate sidebar opening and closing, including reversing an unfinished transition, when animations are enabled.
- Show context-aware workspace shortcuts in a floating panel after a short delay, and render presets in the same overlay without moving the composer.
- Prevent chooser input from accepting an approval dialog before it has been painted.

## Testing

Add coverage for chooser activation and draft preservation, sidebar animation reversal, shortcut and preset snapshots, and approval input handling.

GitOrigin-RevId: 014112622a94798f4e611756c55112dfd8016051
2026-11-05 21:05:51 +00:00
jif 9abfbcea0d Restrict Guardian native multi-agent history to the OpenAI provider (#59737)
## What changed

Require the `openai` provider ID as well as `GuardianNativeMultiAgentHistory` to enable native agent history and review of multi-agent calls. Apply the same check to Guardian prompt construction, collaboration tool registration, and Guardian v2 configuration.

## Testing

Add coverage for fresh and resumed sessions with the feature enabled and disabled on OpenAI, and enabled on Bedrock and LiteLLM. Verify that only OpenAI sessions with the feature enabled request native review and include the agent call as evidence.

GitOrigin-RevId: bfbe547b0544e66763dca7d1e1376f805994bcb2
2026-11-05 20:57:03 +00:00
maxwell-oai[bot] 84a1476a11 Stabilize the unreadable-glob traversal error test (#59736)
## Why

Versions of `ignore` differ in whether parallel walks report traversal errors at the depth boundary, making the test's expectation depend on the walker implementation.

## What changed

Keep the denied directory within the bounded scan depth in `unreadable_glob_traversal_errors_fail_closed`. Require both bounded and unbounded scans to fail with the denied path and permission error, replacing the CPU-count-dependent assertion.

GitOrigin-RevId: 4ed97253247e0c032648ebc6d4be2a97c3ab261a
2026-11-05 20:56:09 +00:00
swastik-oai 3934ae926a Support direct Guardian review of recorded MCP calls (#59735)
## What changed

Extend `guardian_review` to assess recorded MCP tool calls using the current tool catalog, bindings, and approval policy without executing the call or remembering an approval. Return no assessment when policy or a remembered approval skips review, and reject tools blocked by app configuration.

## Testing

Add a scenario test that compares direct and live MCP review inputs, verifies that neither dispatches the tool, and checks that the current app approval policy can skip review.

GitOrigin-RevId: 05746dd0804a0f96d7946468701d5222171ff64f
2026-11-05 20:55:46 +00:00
Won Park c8a1109fa7 Omit native multi-agent guidance when native tools are disabled (#59732)
## Why

Multi-agent V2 still supplied native tool usage guidance when native tools were disabled, leaving instructions for unavailable tools in model requests.

## What changed

Skip bundled and model catalog role guidance for both root agents and subagents when `disable_native_tools` is enabled. Preserve explicitly configured usage hints.

## Testing

Add coverage for omitted bundled and catalog guidance and preserved configured hints with native tools disabled. Update the request snapshot and assert that spawned agents do not receive native tool call guidance.

GitOrigin-RevId: 6f2facabc95e78cbf64af19636a4daf488bbcc51
2026-11-05 20:43:36 +00:00
Adam Perry @ OpenAI 2e58636d16 Use Codex releases as the primary libcap source for musl builds (#59728)
GitOrigin-RevId: f332fd4f86e08c6a5e9bfe08966f9b30c82113ff
2026-11-05 20:04:42 +00:00
Maja Wichrowska 119a547a31 Prevent idle Windows MCP pipes from blocking unrelated I/O (#59726)
## Why

Idle reads from local MCP servers on Windows can occupy Tokio's blocking threads and delay unrelated filesystem operations.

## What changed

Use IOCP-backed named pipes for local MCP server stdin, stdout, and stderr on Windows. Connect child endpoints before launch, restrict pipe access to the owner and SYSTEM, and reject remote clients. Preserve the shared legacy and modern protocol framing.

## Testing

Add Windows regression tests to verify that idle MCP reads leave blocking I/O available in both protocol modes and that child output handles support querying the pipe mode.

GitOrigin-RevId: ca39b940a54427a2cd7bab5291011b0b09143b3f
2026-11-05 19:46:31 +00:00
rhan-oai f69c660a83 Add host reporting for terminal agent turn outcomes (#59725)
## What changed

Expose `AgentTurnOutcomeReporter` for hosts to install through `StartThreadOptions::thread_extension_init`. Await its callback after emitting the terminal turn event, independently of native parent notifications, so hosts can handle result delivery and retries.

Track outstanding outcome handoffs and wait for them during graceful shutdown before running thread-stop hooks. Prevent new turns from starting once handoff registration closes.

## Testing

Add integration coverage for completed and errored outcomes, turn lineage, queued follow-up turns, and shutdown waiting for handoffs. Extend Guardian tests to verify that strict safety stops reach the reporter while default interruptions remain silent.

GitOrigin-RevId: 0d825f6208f0250969734488881f32fd1dcd7509
2026-11-05 19:20:56 +00:00
alexsong-oai b2a8e68c74 Allow choosing the default provider for new chats in the TUI (#59722)
## What changed

- Add Space to set the default provider from Model providers settings, persisting `model_provider` on the connected server. Keep provider details available and disable selection when server configuration or client launch settings fix the provider.
- Apply the choice to `/new` while preserving the current chat. Refresh account details for new chats and reject account data that does not match the started provider.
- Block stale `/model` choices during saves and after confirmed or uncertain provider changes, including across reconnects. Tell users to restart the app server and TUI to refresh the model list, and discard queued picker actions from another backend or chat.

## Testing

Add coverage for provider saves, retry after disconnection, concurrent-save prevention, stale model choices, and account/provider matching, with updated provider-picker snapshots.

GitOrigin-RevId: af6d149f7de7a2eaa09a31935f7088faa64d6a59
2026-11-05 19:11:18 +00:00
jif be765f1ade Set output_deferred to false for cloud thread items (#59714)
GitOrigin-RevId: d7f7c2db52349797c0063526c1ad8e35d4217252
2026-11-05 18:22:37 +00:00
jif c587fbc2fc Clarify message board notification delivery documentation (#59713)
Document that `AgentMessageBoard` notification delivery follows the host's
scheduling and wake policy and may buffer notifications for idle recipients.
Link to `MessageBoardHost` for the delivery contract.

GitOrigin-RevId: fb085fe2c43c74b85b4e6fe471e7d4ae216bf3db
2026-11-05 18:12:28 +00:00
iceweasel-oai 2a32e7c963 Expand Linux sandbox deny globs in process (#59711)
## What changed

Replace external `rg` scans and the fallback walker with an in-process `ignore` walker for bubblewrap deny-glob expansion. Remove scanner lookup and dependency tracking from sandbox integrity checks.

Include hidden and ignored files, respect scan depth limits, and fail closed on traversal errors. Anchor patterns to their static search roots and preserve literal leading `#`, leading `!`, trailing spaces, and unclosed character classes. Follow explicit symlink roots while skipping child symlinks, and mask canonical targets of matched paths.

## Testing

Extend unit and sandbox integration coverage for glob syntax, depth limits, traversal failures, symlink handling, commands launched from `/`, and operation without executing `rg`.

GitOrigin-RevId: 1767d7f37acb149457642bf24ee5971a28696438
2026-11-05 17:56:59 +00:00
Omer Strulovich 0327a3ec34 Prioritize filename matches in fuzzy file search (#59709)
## Why

Matches in parent directory names can crowd matching filenames out of limited search results. For example, searching for `ViewModel` should keep `ChatViewModel.kt` visible even when many directories are named `viewmodel`.

## What changed

- Rank basename matches before applying the result limit for single positive fuzzy queries without path separators.
- Prefer exact filenames, then the strongest exact directory match, then other matching filenames. Leave additional directory matches ranked by their paths.
- Compute highlight indices from the basename for promoted results and return scores that reflect the new ranking.
- Rank snapshots in resumable time slices so new queries and cancellation can interrupt the work.

## Testing

Add regression coverage for filename matches surviving the result limit, exact file and directory priority, path queries, and resuming partial rankings. Update app-server score expectations while preserving highlight indices.

GitOrigin-RevId: 41b3420581b4f6490859e809245370b737889544
2026-11-05 17:34:20 +00:00
Eric Traut 054128c9d9 Fix TUI assistant messages interrupted by tool execution (#59700)
## Why

A tool can start before an assistant message finishes streaming. The TUI needs to incorporate the completed text without duplicating the reply or leaving Markdown split across interrupted fragments. Some streams also include initial text in `item/started` before sending deltas.

## What changed

- Display initial assistant text from `item/started`, avoiding duplicate starts for the same message.
- Track interrupted replies by turn and item ID, then replace their flushed fragments with the completed message at the reply's original position, preserving intervening tool order.
- Re-render the completed Markdown and update transcript views and scrollback.

## Testing

Extend streaming tests to cover initial text, resumed deltas, Markdown spanning a tool interruption, and matching live and replayed transcripts. Expand completion-repair cases to cover missing text and resumed fragments.

GitOrigin-RevId: 7f35e52d0bca2100baf722d7ef4922cd127bbc45
2026-11-05 16:56:05 +00:00
Eric Traut 44252e3f5d Fix reasoning summary restoration in the TUI (#59698)
## Why

Reasoning summaries can arrive with item start or completion events rather than streamed deltas. The TUI can miss or truncate these summaries, and replay after a voice handoff can hide reasoning that started before the handoff.

## What changed

- Initialize reasoning from item start payloads and reconcile live and replayed completions with their full summaries. Preserve streamed text when completion payloads are empty, and continue honoring `show_raw_agent_reasoning`.
- Retain active reasoning payloads across refreshes without resetting an already active item when its start event is replayed.
- Preserve the typed origin of reasoning started before a voice handoff and filter later delegated reasoning starts from buffered replay.

## Testing

Extend regression coverage for summaries supplied at start or completion, partial streamed summaries, active reasoning after refresh, and replay that retains pre-handoff summaries while hiding delegated reasoning even after the handoff marker is evicted.

GitOrigin-RevId: 724b9fc58e10f4d87dabd3d9930e252270855a4f
2026-11-05 16:55:40 +00:00
Benjamin Carlsson ee80baa38e Support Cloud conversation requests in the app-server client (#59693)
## What changed

- Map thread listing and creation, paginated turn and item history, and turn submission and interruption to Cloud operations.
- Mark listed and activated threads as using paginated history, and warn when history items cannot be displayed.
- Reject unsupported filters, custom settings, and structured input. Require stable submission IDs and avoid returning a running turn for duplicate or queued submissions.
- Forward optional `turn_trigger` values through the Cloud client.

## Testing

Add coverage for resume-picker pagination, unsupported filters, submission IDs and settings, duplicate and queued admissions, and `turn_trigger` wire encoding.

GitOrigin-RevId: dcbd87d8190786da65e343a3a0f8d849b24a5b26
2026-11-05 16:41:33 +00:00
jif 55b1c642f5 Split MCP direct-mode exposure coverage into separate test cases (#59691)
Give each independent MCP server and session setup its own test identity
and timeout budget by replacing nested loops with `test_case::test_matrix`.
Preserve all 64 configuration combinations and the existing assertions for
direct tool exposure, tool search availability, and advertised tool calls.

GitOrigin-RevId: 74ef56d34b6bab3038b70d7d84183f7d104788a2
2026-11-05 16:27:59 +00:00
jif d786ff91fa Extract channel notification formatting into PostPreview (#59688)
Move channel notification formatting into `PostPreview::notification_text()` and use it in the local message-board host. Preserve the notification fields, preview text, and `read_post` hint for truncated posts.

GitOrigin-RevId: fd3596c45194c958817a24f8fc35a886f766a84b
2026-11-05 16:08:23 +00:00
ioanbudea-OAI 49f0c60225 Remove the legacy sandbox policy summary helper (#59677)
## What changed

Remove `summarize_sandbox_policy` and its public export from `codex-utils-sandbox-summary`, leaving `summarize_permission_profile` as the summary API. Migrate the external-sandbox, read-only, and workspace-write summary tests to permission profiles.

GitOrigin-RevId: 2ea039a2573e05c17edb8356aa7e04e065ef592a
2026-11-05 15:17:48 +00:00
felixxia-oai 481cb038c2 Add evidence housekeeping for Guardian v3 (#59671)
## What changed

Add a `Housekeeper` that uses an isolated reviewer runtime to route captured original evidence into topic channels and update their discovery descriptions. Keep originals intact and batch inputs within the selected model's tool-output budget.

Validate routing responses before writing to the message board. Advance the evidence cursor only after all writes succeed, stop the worker after an error, and return the runtime disposition so callers can manage session reuse.

## Testing

Add integration coverage for routing originals to multiple channels, updating descriptions, preserving capture boundaries, batching within the input budget, and leaving the cursor unchanged on write failure.

GitOrigin-RevId: 670508c7ecf2ddffdd2946f1b25dd7e071318c5a
2026-11-05 15:02:11 +00:00
felixxia-oai ac03f42e1a Capture Guardian evidence incrementally with explicit acknowledgements (#59670)
## Why

Evidence capture previously reloaded the full history without tracking consumer progress. Live consumers need to read new originals from activation onward and acknowledge them after downstream writes succeed.

## What changed

- Add an in-memory `EvidenceCursor` that starts at the current complete tail without backfilling, captures a fixed unread range, and supports partial acknowledgements. Reads leave progress unchanged.
- Add `ThreadStore::read_original_history` to read original records and their source positions through a fixed cutoff. Local storage supports append-only paginated root histories, including compressed rollouts, and defers unfinished records.
- Reject unsupported histories and invalid ranges, and retain source ordinals as evidence IDs.

## Testing

Add coverage for partial records, compressed suffixes, fixed cutoffs, mismatched thread positions, and truncation. Extend evidence tests to cover activation without backfill, partial acknowledgements, later appends, stale captures, and unchanged cursor progress after capture errors.

GitOrigin-RevId: c7a13749fedc4f44fadddc9dd9875043bccebd95
2026-11-05 15:01:44 +00:00