Commit Graph
12403 Commits
Author SHA1 Message Date
Max Johnson 9ac8c3f8d7 Close abandoned tool dispatch traces as aborted (#61434)
## Why

Interrupting a turn while a tool awaits approval can leave its rollout trace execution marked as running without an end timestamp.

## What changed

Record an `Aborted` end event when a tool dispatch trace is dropped before producing a result. Make completion and failure methods consume the trace handle so each dispatch is closed once.

## Testing

Add coverage for dropping a pending dispatch and for interrupting a turn with a pending command approval, verifying that replay reports an aborted execution with an end timestamp.

GitOrigin-RevId: 63cf68312fcbff8c6b85a01a7713cf4460c9d795
2026-11-14 01:32:55 +00:00
Celia Chen de83e7674a Instrument MCP OAuth credential store locks (#61430)
## What changed

- Record acquisition counts, wait durations, and hold durations for file and secrets store locks, tagged by store, lock mode, operation, and originating client. Acquisition metrics also report outcome and contention.
- Preserve the resolved credential store's originating client across storage operations and lock release, and exclude nonblocking probes from lock metrics.
- Add `record_global_duration` for standalone durations with the existing buffering limits and metrics opt-out behavior.

## Testing

Extend tests to verify lock metrics for shared and exclusive access, contention, timeouts, probe exclusion, and originating-client attribution. Add coverage for standalone duration buffering, validation, and opt-out behavior.

GitOrigin-RevId: 96de8bd195477d61bc8cd966c5fbf72ae7156273
2026-11-14 01:21:54 +00:00
Anthony Tafoya 6d919e65e2 Refresh cloud plugin and skill catalogs during step preparation (#61429)
## Why

Installing a plugin without connector tools must still refresh a cached cloud skill catalog so its skills are visible to the next inference.

## What changed

- Rely on step preparation for cloud plugin and skill discovery, removing their turn-start callbacks and the `requires_mcp_runtime` lifecycle hook.
- Request an MCP runtime refresh after every completed plugin install, including skills-only installs.

## Testing

Add regression coverage for skills becoming visible immediately after a connector-free install. Update lifecycle tests to cover discovery after MCP reconciliation, prewarm skipping discovery, cancellation allowing subsequent preparation, and reuse of unchanged connections. Use deterministic DNS lookups in network proxy authorization tests.

GitOrigin-RevId: 76036bd29253fb8987e606c3c28411c689590fc4
2026-11-14 01:11:17 +00:00
Anton Panasenko 005f910210 Require OAuth CONNECT metadata for Portals TCP tunnels (#61428)
## What changed

Require `x-portals-auth-mode: oauth` in CONNECT metadata when the TCP tunnel listener connects to a known Portals gateway. Reject missing or non-OAuth metadata before reading credentials.

Remove local tunnel JWT type and version checks and treat tokens as opaque bearer credentials. Drop the unused `base64` dependency from `codex-tcp-tunnel`.

## Testing

Replace JWT validation tests with coverage that rejects missing OAuth metadata and accepts OAuth metadata with an opaque access token.

GitOrigin-RevId: 746816f0227280524c019dd90df203b182934751
2026-11-14 00:57:54 +00:00
Alex Kira 27e2227b2b Enable incremental tools by default for Amazon Bedrock (#61426)
## What changed

Enable `incremental_tools_legacy` by default so both Amazon Bedrock providers publish tool declarations through `additional_tools` input items. Users can still opt out by setting `incremental_tools_legacy = false`.

## Testing

Update the incremental tool scenarios to cover the default behavior and explicit opt-out for both Bedrock providers. Adjust the Bedrock multi-agent test to verify collaboration tools in `additional_tools` declarations.

GitOrigin-RevId: 7a54aed24039d178f9b7d7f5a3f49fe4d588ffa7
2026-11-14 00:56:00 +00:00
Felipe Coury 01806453b0 Refill the transcript viewport when collapsing tool groups (#61424)
## Why

Collapsing a tool group while reading its expanded details can leave the scroll anchor beyond the new bottom limit, leaving available transcript space unfilled.

## What changed

Clamp the reading position to the bottom limit during collapse layout and persist it after the final viewport height is known. Keep activity focus and reading mode intact, including when copy confirmation changes the composer layout.

## Testing

Add regression coverage for collapsing a scrolled tool group, preserving the resulting view across renders, and rendering a collapsed group with clipboard confirmation.

GitOrigin-RevId: f48271720f7b400736bc02b08b6eafefdb60ac63
2026-11-14 00:43:58 +00:00
Felipe Coury 68c63d72d3 Add keyboard table selection to the transcript (#61422)
## What changed

- Add configurable `pager.mark_markdown`, bound to the leader followed by `v`, to mark the table cell under the selection caret.
- Use arrows or `hjkl` to extend a rectangular cell selection, `o` to swap corners, and `y` to copy. Press `v` to select text within the active cell without including neighboring cells, including across wrapped lines.
- Show table-specific footer hints and route the marking chord in both the main transcript and transcript overlays.

## Testing

Add coverage for cell rectangles, header-only selections, empty cells, wrapped text, Unicode and escaped pipes, Markdown copying, search cancellation, mouse takeover, and chord routing with remapped find and leader keys.

GitOrigin-RevId: 81ed9e52092bba3c7ef064e95043d2c070df0f4c
2026-11-14 00:32:35 +00:00
Abhinav 4598f33790 Use thread-scoped model catalogs for model lookups (#61421)
## Why

Model lookups through the startup catalog can use the wrong provider's capabilities or instructions after a default provider switch or when a thread has its own catalog.

## What changed

- Resolve model metadata for sampling, prediction forks, and memory writes through the owning thread's catalog.
- Make the thread's models manager available to extensions before startup callbacks and use it for guardian sampler configuration.
- Import external sessions using the destination provider and originator's catalog, loading its offline cache only when no refreshed catalog is available.

## Testing

Add regression coverage for sampling after a default provider switch, parent-specific prediction fork capabilities, thread-scoped model lookups, and imported sessions retaining destination provider instructions and originator.

GitOrigin-RevId: c86081b9e55c5e2b42a7f082966485d7fb5139d4
2026-11-14 00:32:02 +00:00
alexsong-oai 51f0b53d8b Clear the user endpoint override during GCP setup (#61420)
## Why

A user-configured `model_providers.gcp.base_url` previously blocked GCP setup, requiring manual removal before configuring a project and location.

## What changed

Have `account/gcp/setup` clear the active user configuration’s `base_url` override after obtaining an access token, allowing the requested project and location to determine the Vertex AI endpoint. Continue rejecting configuration layers that would still supply an endpoint override or otherwise conflict with the request. Document this behavior.

## Testing

Update integration tests to cover clearing an existing override on success, preserving it when authentication fails, and rejecting a managed endpoint override.

GitOrigin-RevId: 26a725133d9069ad63dfb0bb06ddf3c5d1545cad
2026-11-14 00:30:18 +00:00
Eric Traut 2d5bfb7931 Resolve pasted Windows paths with wslpath in WSL (#61419)
## Why

Pasted Windows drive paths were mapped unconditionally to `/mnt/<drive>`, even when that mount was unavailable or WSL used a different mapping.

## What changed

Use `/bin/wslpath -u` with a one-second deadline and require an absolute result. Fall back to `/mnt/<drive>` only when the helper is missing and `/proc/self/mountinfo` confirms the mount exists. Reject fallback paths that traverse above the drive root and return no path when conversion fails.

Share the bounded subprocess output helper with tmux probing.

## Testing

Update coverage for quoted and unquoted Windows paths with spaces. Add fallback tests for a mounted drive, a missing drive mount, and traversal above the drive root.

GitOrigin-RevId: f6a05045b2108722a686e9e5b766fc8cb233bea0
2026-11-14 00:21:47 +00:00
jackz ad8b7f1134 Require a government workspace for the government backend (#61418)
## What changed

Reject workspace routing to `gov.chatgpt.com` when the workspace backend is `NO_CONSTRAINT`, whether the backend comes from the required or effective base URL.

Return an invalid-request error from account reads with `reason: "governmentWorkspaceRequired"` and `action: "relogin"`, prompting users to sign in to a government workspace.

## Testing

Add routing tests covering required and effective government backend URLs, including hostname case and the default HTTPS port.

GitOrigin-RevId: a54b990d2b0dc716122124ee6924538aa06d30d2
2026-11-14 00:19:55 +00:00
Joe Savona fb0715949b Expose Codex rate limits in statusline state (#61417)
## What changed

Add `account.rate_limits` to the statusline snapshot, including the `codex` limit's name, primary and secondary usage percentages, window lengths, and Unix reset timestamps. Emit an empty array when no Codex rate-limit windows are available, and exclude other limit IDs.

Preserve raw reset timestamps alongside the formatted display values.

## Testing

Extend serialization assertions to cover both rate-limit windows, a missing reset timestamp, exclusion of other limit IDs, and the empty-array default.

GitOrigin-RevId: f775c281a17ea2b72cbca810db397f00f16ea5e9
2026-11-14 00:19:21 +00:00
Joe Savona 4495f7ce17 Expose the workspace headline in structured status-line state (#61415)
## What changed

Include the cached workspace headline as `account.workspace.headline` in the structured status-line snapshot. Serialize `account` as an empty object when no headline is available.

## Testing

Extend status-line tests to assert headline serialization and the empty `account` object.

GitOrigin-RevId: 50a923ff3f8bc2fdb0bab3487547979e6d837980
2026-11-14 00:17:57 +00:00
Joe Savona 641e2e362c Ignore stale workspace headline requests and archived messages (#61411)
## Why

Workspace headline request counters restart when the chat widget is replaced, allowing a response for the previous widget to match a new pending request. Archived headlines can also be selected for the status line.

## What changed

- Use UUIDs for workspace headline requests and reject refresh events and responses that do not match the current widget's pending request.
- Skip archived messages when selecting the first non-empty workspace headline.

## Testing

Add a regression test verifying that a replacement widget rejects the previous widget's response while retaining its own pending request. Extend headline selection coverage to include an archived headline before the active one.

GitOrigin-RevId: 44b98ab8c6cb70b7cf8e8b9341f27c99c1e1490a
2026-11-14 00:08:20 +00:00
Joe Savona 5ca2007abe Expose thread costs in statusline state and reject stale usage reads (#61410)
## Why

A replacement chat widget can receive a previous widget's usage result for the same thread. Statusline state also lacks the estimated costs available in the built-in status line.

## What changed

- Add optional `thread.usage.cost.total_cost_usd` and `total_credits` fields, using the built-in status line's plan-specific values. Convert micro-units to ordinary units and omit unavailable or negative values.
- Use UUIDs for thread usage requests and verify that each request is still pending before fetching usage or accepting its result.

## Testing

Add regression coverage for rejecting a previous widget's usage result and assertions for serialized costs across supported enterprise plans.

GitOrigin-RevId: 91c3f7cead0249b673979d17cc108ceae1088df2
2026-11-14 00:07:46 +00:00
Joe Savona e87cd55ed9 Expose context usage in statusline state (#61409)
## What changed

Add `thread.usage.context` with optional `context_window_size`, `used_tokens`, and `used_percentage` fields. Use the latest token report for context usage and the built-in footer's window size and percentage calculations. Omit unavailable fields, including the percentage when the context window is unknown.

## Testing

Extend statusline state tests to cover missing usage, unknown context windows, and footer-consistent percentages, with context usage distinct from cumulative token totals.

GitOrigin-RevId: 699b65f6c047e76fcc7d1ba729eebd19a19e4bcd
2026-11-14 00:07:11 +00:00
Joe Savona 91ae3d10bf Expose token usage totals in statusline state (#61408)
## What changed

Add `thread.usage.total` to the provider-facing statusline snapshot with total input, cache-read input, cache-write input, other input, and output token counts. Preserve cache-write counts when converting app-server token reports for the TUI.

Omit totals when usage is unavailable, the breakdown is invalid, or the report represents a synthetic context fill. Keep measured zero totals.

## Testing

Add coverage for the reported token breakdown, cache counts exceeding total input, synthetic context fills, and measured zero usage.

GitOrigin-RevId: 6c506af30d6e51a49a780a0316304ef9c067fe43
2026-11-14 00:05:32 +00:00
Joe Savona 38cdc4d655 Show the primary executor's workspace in TUI status surfaces (#61405)
## Why

The primary executor's working directory can differ from the app-server's. Displaying the app-server directory can misidentify the workspace, and abbreviating a remote path using the TUI's home directory can be misleading.

## What changed

- Carry the primary environment's working directory through thread initialization, restoration, and settings updates.
- Use it for the status line and terminal title's current-directory item, and expose it as `thread.workspace.cwd` in the statusline state.
- Preserve the known environment directory when settings omit environments; fall back to the app-server directory when the environment list is empty.
- Apply home-directory abbreviation only to server-local workspaces on local connections.

## Testing

Add regression coverage for remote executor paths, omitted and empty environment settings, local-only directory abbreviation, and workspace state for inactive threads. Update the resumed-thread snapshot to display the executor directory.

GitOrigin-RevId: 9f3bcad186e07f942ea00d1f4233cf09f022571f
2026-11-13 23:49:59 +00:00
Joe Savona 68847438b5 Add a structured status-line snapshot for the displayed thread (#61403)
## What changed

Add a serializable `StatuslineState` containing app and status-line configuration, thread identity, agent state, model settings, approvals, and permissions. Reuse the displayed status line's run-state and profile logic, and serialize status-line items with their canonical configuration IDs.

Omit the snapshot for read-only history or when no thread is attached. Omit service-tier, approval, and permission fields until thread settings are confirmed. Use an inferred child thread's reported model and reasoning effort without inheriting the parent's collaboration mode.

## Testing

Add coverage for serialized settings and canonical item IDs, inferred child-thread values, settings confirmation, and snapshot availability before and after interactive resume.

GitOrigin-RevId: 512bdff9b92d886a7764f16955206109f56437d3
2026-11-13 23:27:43 +00:00
jamy-OAI 61bedf383f Update Daybreak links in TUI cybersecurity notices (#61402)
## What changed

- Point `Apply for Daybreak` to `https://chatgpt.com/admin/status-and-access`.
- Point the Astra notice’s `Learn more` link to the Daybreak overview’s model-specific reduced-refusals section.
- Update notice snapshots to reflect the new URLs and line wrapping.

GitOrigin-RevId: 14068e8d6e56ec1a3bf3a0f896b5c36204a9eff8
2026-11-13 23:17:13 +00:00
Celia Chen 43ca762a59 Release MCP OAuth read locks before keyring access (#61401)
## Why

Encrypted MCP OAuth reads hold a shared file lock while accessing the keyring, blocking writers until the keyring lookup and decryption finish.

## What changed

- Add `LocalSecretsSnapshot` to capture ciphertext under the file lock, then release shared read locks before keyring access and decryption. Keep exclusive locks across conditional credential updates.
- Reuse the loaded passphrase when updating existing secrets, avoiding a second keyring lookup. Return an error when an existing encrypted file has no keyring passphrase instead of generating a replacement.
- Update login storage error fixtures to use directory reads that fail consistently across platforms.

## Testing

Add regression coverage for releasing read locks during keyring access, updating secrets with one keyring lookup, rejecting missing passphrases on cached reads, and reading captured snapshots after later writes.

GitOrigin-RevId: add8f60dba52f71c8f8bc10ae8b8ae2f3379ccac
2026-11-13 23:15:54 +00:00
Anthony Tafoya 0b297ec5ee Retry incomplete cloud catalogs with exponential backoff (#61400)
## What changed

- Keep partial cloud skill and plugin catalogs, and catalogs with warnings, usable while retrying discovery with exponential backoff. Start retries after 5 seconds and cap the delay at 5 minutes; clear backoff after a complete, warning-free result.
- Replace previous catalog entries with each accepted result, including partial results, and clear cached cloud skill resources when publishing a replacement.
- Check catalog freshness across turns and steps using auth and resource identity. Auth or resource changes bypass retry cooldowns, including within the same turn.

## Testing

Add and update tests for retry delays and recovery, concurrent refreshes, auth and resource invalidation, partial catalog replacement, and cloud skill read-cache replacement.

GitOrigin-RevId: 0ce5a9d5596e8a73d7084abbbaeb4fb8cda84aa0
2026-11-13 23:14:47 +00:00
Matthew Zeng e8f5d2bb55 Restore shared connector metadata for Codex Apps tools (#61398)
## Why

When an Apps `tools/list` response supplies connector names and descriptions in shared `openai/apps` metadata, tools need those fields restored to expose the correct namespaces and descriptions to the model.

## What changed

Match tools to shared connector metadata by `connector_id` on each response page and copy nonempty names and descriptions into tool metadata before conversion. Restrict this handling to Codex Apps; regular MCP servers use the standard tool listing path.

## Testing

Add a regression test with two tool pages that verifies both connectors' namespaces and descriptions appear in the model's tools state.

GitOrigin-RevId: d4c8b44007773ff65d3e366669ee5c705a480cb1
2026-11-13 23:05:04 +00:00
Abhinav c5ef97aa89 Add default model provider selection to the app server (#61397)
## What changed

Add `modelProvider/default/set` with a `providerId` parameter to persist the default provider for new threads and model lists. Return `ConfigWriteResponse`, reject unconfigured providers, and respect managed requirements, read-only configuration, and CLI overrides.

Reload the model catalog on its next read when the default changes effectively. Resolve explicit `model/list` provider selections against the current catalog configuration so clients can continue listing models for a retained provider after switching defaults.

Update the protocol schemas, generated TypeScript and Python types, and app-server documentation.

## Testing

Add coverage for switching defaults and switching back, rejecting unknown providers without changing the catalog, retaining explicit provider selections, reporting CLI overrides, and rejecting writes blocked by configuration restrictions.

GitOrigin-RevId: 3615835f58045d33a21b3c57d47932d6d1e3fb12
2026-11-13 23:04:26 +00:00
ioanbudea-OAI f626b8fde9 Remove legacy sandbox-policy accessors from configuration (#61395)
## What changed

- Remove `Config::legacy_sandbox_policy` and `Permissions::legacy_sandbox_policy`.
- Update core and TUI tests to use permission profiles and filesystem/network policies directly, with explicit conversion where legacy wire formats are required.
- Report the active sandbox label in app-server resume override mismatch diagnostics.

GitOrigin-RevId: cbc5417944e23404523e69dc5516d66d6bfafefe
2026-11-13 23:03:49 +00:00
Hung 5158e9780e Add opt-in file-backed tool audio (#61394)
## What changed

- Add the disabled-by-default `file_backed_tool_audio` feature to prepare fresh function and custom tool audio through the attachment store before persistence. Store returned file IDs in history and preserve them on replay without uploading again.
- Validate and budget mixed text and audio output before uploading retained clips, preserving audio token charges and producer limits. Resolve tool audio durations before continuation compaction checks.
- Keep inline audio on backend upload failures and use text placeholders for invalid or rejected clips. Replace unavailable tool audio files with placeholders in prompts while retaining the original history, so restored files can be used again.
- Treat file-backed tool audio as a competing source when attributing audio or unknown-file errors to user uploads.

## Testing

Add coverage for direct tool and Code Mode audio across follow-up turns, file expiration, restoration, and resume in both legacy and paginated history. Extend tests for truncation before upload, upload failure handling, bounded error placeholders, and error attribution.

GitOrigin-RevId: 66c1e7699c7d92f98c3a2d0f5cecbbd63147eb6c
2026-11-13 23:02:16 +00:00
Alex Zamoshchin f941a5fb92 Add optional release IDs to cloud plugin source locations (#61393)
## What changed

Add `release_id: Option<String>` to `PluginSourceLocation::Cloud` to carry the opaque release ID selected by the cloud catalog for a plugin declaration. Update catalog and discovery test fixtures to supply the new field, including a populated release ID in catalog reconciliation tests.

GitOrigin-RevId: 1d60e25bd5fb8efd84e6e825305ad68b847fc1ee
2026-11-13 22:44:55 +00:00
viyatb-oai f5fb19fc4a Normalize managed network requirements before merging (#61391)
## Why

Managed network requirements support both legacy tables and `permissions.network`. Equivalent declarations in one source should be accepted, while older runtime clients still need the top-level network field.

## What changed

- Normalize `network_proxy` and `experimental_network` into `permissions.network` before merging requirements, preserving source attribution and explicit empty allowlist replacements.
- Accept legacy and nested declarations in one source when they describe the same policy, comparing domain and review selectors by their canonical identities. Continue rejecting mixed surfaces across sources.
- Populate the legacy output field for compatibility and preserve legacy selector text when both forms are supplied.
- Include contributing requirement sources in cloud bundle errors without exposing submitted TOML.

## Testing

Add coverage for equivalent and conflicting declarations, empty allowlist overrides, loader compatibility, and debug output. Add a proxy regression test verifying that a saved grant cannot bypass managed loopback restrictions.

GitOrigin-RevId: e0d2a600f5c7c6c07a665ccc0e18a72ff172fd6d
2026-11-13 22:31:23 +00:00
Dylan Hurd 347143f140 Preserve active additional context across compaction (#61390)
## Why

Compaction can drop active client context while deduplication prevents unchanged values from being sent again on subsequent turns.

## What changed

Track additional context by history item ID and restore active items when installing complete or prefix compaction results. Preserve their history order, refresh retained items with their original bounded payloads, and leave queued updates to arrive with their input.

## Testing

Add regression coverage for local compaction with message context and remote compaction with tool-output context. Verify that current context survives exactly once, stale values are absent, and restored context precedes the preserved user prompt.

GitOrigin-RevId: a3114f387c6a4ae1a2d1651993d0f7a101be7dd5
2026-11-13 22:19:12 +00:00
Charlie Marsh 1c76c0bc08 Reduce session submission channel memory with boxed payloads (#61389)
## Why

The bounded submission channel reserves all slots at session startup, including space for a full `Submission` in each slot.

## What changed

Send `Box<Submission>` through the channel so each slot reserves only pointer-sized payload storage, allocating full submissions as needed. Update submission producers, delegate forwarding, and test helpers to pass boxed submissions, and unbox them in the submission loop.

GitOrigin-RevId: d8d9c613683076d74fcb3e2f2cb6244c5857bca2
2026-11-13 22:18:34 +00:00
zm-oai 0276c8143d Include the Windows sandbox service in release builds (#61388)
## What changed

Add `codex-windows-sandbox-service` to the Windows package build binary list and include its release files in the combined Bazel runtime archive.

GitOrigin-RevId: 3438aae09cc605303145ac220766a8e71ea284ff
2026-11-13 22:18:01 +00:00
Alex Zamoshchin 42f950cd11 Refresh plugin recommendations when tooling state changes (#61387)
## Why

Cached recommendations can keep offering a plugin after installation. Refreshing the shared catalog during step preparation can also leave the recommendation prompt and install handler with different candidates.

## What changed

- Check `tooling_changed_at` before reusing recommendations, with a one-second reuse window and a 250 ms deadline that includes authentication. Refresh the catalog when the marker changes, preserving cached recommendations on failure and retrying on a later poll.
- Scope recommendation and featured-plugin caches by product, backend, and account identity, and share concurrent recommendation refreshes.
- Use the same recommendation snapshot for a step's prompt and install handler, while allowing later steps to observe updated recommendations.

## Testing

Add coverage for marker changes, missing markers, refresh failures, concurrent and cancelled requests, and the authentication deadline. Extend integration tests to verify consistent step candidates and stop offering an installed plugin while preserving the original recommendation block in conversation history.

GitOrigin-RevId: 44fa6723a623d9604f0c768118bc6889d2d3b693
2026-11-13 22:16:32 +00:00
Anthony Tafoya 826b6e8199 Reuse cloud plugin catalogs across turns until invalidated (#61386)
## Why

Cloud plugin discovery previously ran each turn even when authentication and Apps resources were unchanged.

## What changed

- Reuse complete, warning-free catalogs across turns, including empty catalogs, while authentication and the Apps resource cache key match.
- Retry partial catalogs and catalogs with warnings on subsequent turns, preserving failure backoff.
- Reject discovery results if authentication or Apps resources changed while discovery was in flight. Hosts must invalidate Apps resources when the remote plugin catalog changes.

## Testing

Extend lifecycle tests to cover populated and empty cache reuse, resource and auth invalidation during discovery, and reuse of the empty catalog after plugin revocation.

GitOrigin-RevId: f0f0f4fd5a83179d722ba3cb917deec7eef18458
2026-11-13 22:01:26 +00:00
surajs-oai 14813d3616 Add configurable idle heartbeats to Code Mode gRPC streams (#61385)
## What changed

- Add `code_mode.heartbeat_interval_s` to configure heartbeats after inactivity on session-event and tool-call streams. The default value of `0` disables heartbeats.
- Pass the interval through session options and gRPC requests, preserving provider defaults when overriding it.
- Ignore heartbeat messages in the client without admitting tool callbacks, and reject tool-call heartbeats that carry invocation data.

## Testing

Add coverage for disabled heartbeats, repeated idle heartbeats and timer resets after traffic, callback handling, and configuration loading. Extend TCP integration tests to verify heartbeats on both streams and continued session operation after idle periods.

GitOrigin-RevId: bf0b6d3081b5541837d07f35931e0dd3e5472c3b
2026-11-13 21:53:25 +00:00
Ben Romano 52ff3d1a35 Support Orbit originators in model catalog partitioning (#61384)
## What changed

Recognize `orbit_cca`, `orbit_cca_web`, `orbit_cca_desktop`, and
`orbit_cca_mobile` as separate model catalog originators, giving each its
own manager and disk cache.

## Testing

Extend catalog isolation coverage to the Orbit originators, including cache
reuse after manager recreation and avoiding redundant refreshes when the
catalog ETag is unchanged.

GitOrigin-RevId: 9507daae5c418212c9fed1be76df9aaa43c9d73f
2026-11-13 21:52:54 +00:00
Benjamin Carlsson c5b6bf1f21 Keep the composer responsive while opening new conversations (#61383)
## What changed

Show an editable draft while starting a new conversation in the TUI, including on another backend. Hand the draft to the conversation when it opens, keeping submission disabled during the transition.

If opening fails, show a failure hint and restore the draft to the current composer. Drain queued input and preserve delayed paste newlines before handing off the draft.

## Testing

Add regression tests for editing before thread startup completes, retaining drafts and consuming queued Enter keys after failure, and preserving multiline raw pastes across handoff.

GitOrigin-RevId: 40540306b4544c485d0dfe76aeda7a4c8b82b19b
2026-11-13 21:52:22 +00:00
Ruslan Nigmatullin 4aac2eacc5 Make clock reads synchronous and remove client clock requests (#61382)
## What changed

- Make `TimeProvider::current_time` and `CodexThread::current_time` synchronous, with clock reads required to avoid yielding or calling back into the session.
- Remove the experimental `currentTime/read` app-server request and its client-backed clock and sleep polling implementation.
- Require a host-provided `TimeProvider` for external clocks. App-server thread startup now fails when `features.current_time_reminder.clock_source = "external"` has no provider.

## Testing

Add coverage for external provider selection and rejection of app-server thread startup without an external provider.

GitOrigin-RevId: 09479d6eb28453b343dee78b3673092e73ae5d73
2026-11-13 21:51:53 +00:00
Vivian Fang e40b0e62e2 Update the harness provenance comment in context history (#61381)
GitOrigin-RevId: f53e93d355bb97737859b0f4c50862bda961872b
2026-11-13 21:51:23 +00:00
Felipe Coury 9d11b38fe7 Add cell-aware mouse selection to transcript tables (#61380)
## What changed

- Keep drags within a wrapped table cell scoped to that cell's text. Dragging into another cell selects a rectangle of complete cells.
- Let triple-click select an entire cell, including from its padding, and extend or shrink the selection by dragging.
- Preserve table structure, empty rows, alignment, and escaped literal pipes when copying rectangles. Keep inline Markdown formatting when copying cell text.
- Support grid and stacked record layouts, and return to ordinary text selection when a character drag leaves the table or selection continues with the keyboard.

## Testing

Add regression tests and highlight snapshots covering wrapped cells, reverse and repeated drags, padding, empty cells, stacked records, copy-on-select, clipboard formatting, and selection after resizing.

GitOrigin-RevId: 32e9a6e7781b0a25914907a0ef8f8c28bbaa21f5
2026-11-13 21:50:54 +00:00
andrewgu-oai f579388d52 Remove unused workspace entries and simplify Rust code (#61379)
## What changed

- Remove the `codex-v8-poc`, `sentry`, and `syntect` workspace dependency entries and the `codex-v8-poc` entry from the `cargo-machete` ignore list.
- Remove unnecessary clones from MCP configuration and web search serialization tests.
- Simplify the final protected-metadata check in `WritableRoot::is_path_writable` to return the negated predicate directly.

GitOrigin-RevId: 80c1dd3106fc24c0767696936c719bb1fbb47227
2026-11-13 21:50:24 +00:00
Alex Zamoshchin a46c5be77e Delegate installed plugin recommendation filtering to the endpoint (#61374)
## What changed

Request plugin suggestions with `includeInstalled=false` and use the endpoint results without filtering against loaded plugins or the local installed-plugin cache. Retain disabled-tool and client eligibility filtering, and remove plugin loading that was only needed for recommendation filtering.

## Testing

Update tests to verify the query parameter and confirm that endpoint recommendations survive local installed-cache filtering while disabled tools remain excluded.

GitOrigin-RevId: a1b199f9ac8da7dae40abe46b6ccfaf1d8230a5c
2026-11-13 21:00:04 +00:00
viyatb-oai 7194b21776 Add opt-in transparent TCP routing for Linux sandboxes (#61372)
## Why

Native TCP clients need to reach managed network destinations without implementing proxy support themselves.

## What changed

- Add `--transparent-tcp` to the Linux sandbox command, using a bundled TCP stack, private TUN interface, and DNS stub to route native IPv4 and IPv6 connections through the attributed managed SOCKS proxy.
- Preserve original hostnames for proxy policy checks and cancel pending approval connections when their native sockets close.
- Expose `--linux-sandbox-transparent-tcp` and `--tcp-upstream-proxy` on `codex exec-server` for transparent routing and a mandatory HTTP CONNECT next hop without direct fallback.
- Require private network and PID namespaces, private procfs, system `bwrap`, and access to `/dev/net/tun`; reject incompatible launcher options and untrusted proxy ports.

## Testing

Add integration coverage for native hostname and IPv6 connections, SOCKS attribution, pending connection cancellation, policy denials, and filesystem and host-loopback isolation. Extend launcher and executor tests for option validation and managed-policy propagation.

GitOrigin-RevId: 96bd7726e5369efceb65320face56aa85ae3deb8
2026-11-13 20:24:37 +00:00
Drew Hintz ba3071a66d Remove BuildBuddy presets from the checked-in Bazel configuration (#61370)
Remove the BuildBuddy cache, build event upload, downloader, and remote execution
presets from `.bazelrc`, while retaining the shared remote execution policy for
callers that supply their own executor.

Update the Bazel documentation and Windows V8 cross-build instructions to remove
references to the deleted presets. Ordinary local `bazel` and `just` invocations
continue to run locally.

GitOrigin-RevId: bb0428a2aa4eac83d7a1b55d4e56a793f9b115bc
2026-11-13 20:23:24 +00:00
ioanbudea-OAI 400a1e1e82 Use native permission profiles for diagnostics and sandbox checks (#61369)
## What changed

- Derive sampling diagnostic and rollout trace labels directly from permission profiles instead of constructing legacy sandbox policies. Rename the trace metadata field from `sandbox_policy` to `permissions_profile`.
- Extract `with_workspace_write_cwd` to share default workspace metadata protections between legacy policy conversion and the TUI's sandbox-mode compatibility check. Build the check's workspace-write profile from filesystem and network permissions directly.

## Testing

Add a regression test confirming that the sandbox-mode compatibility check accepts standard workspace metadata protections and rejects a profile with an additional writable `.git` root.

GitOrigin-RevId: f20d23afd80dff6347865df3d6a94d6f5e90e1e0
2026-11-13 20:22:45 +00:00
Charlie Marsh 6d99161bce Limit MCP status discovery to the requested page (#61365)
## Why

Paginated MCP server status requests previously discovered all configured servers before selecting the response page, causing unnecessary connections to servers outside that page.

## What changed

Select and deduplicate server identities before discovery, then collect status only for servers on the requested page. Include thread runtime statuses when selecting pages and preserve separate entries for same-named servers in different environments. Empty pages skip discovery.

## Testing

Add coverage that counts MCP initialization requests across successive pages and an empty final page. Extend environment inventory coverage to verify that pagination preserves each registration's identity, authentication status, and tools.

GitOrigin-RevId: 0c9c9ca6c8016147eb9a12b53ffe533ac3334444
2026-11-13 19:50:06 +00:00
Eric Traut 4413deac57 Resolve queued attachment paths against the thread working directory (#61359)
## Why

Relative attachment paths in queued submissions should refer to files in the thread's working directory, even when the app server runs from a different directory.

## What changed

Resolve relative `LocalImage` and `LocalAudio` paths against the loaded thread's current working directory or the stored working directory for an unloaded thread when adding or updating queued submissions. Preserve absolute paths and reject relative paths that cannot be resolved to an absolute path.

## Testing

Add a regression test for queue add and update with different images sharing the same filename in the thread and server working directories. Verify that the relative path selects the thread's image and that explicit absolute paths retain their meaning.

GitOrigin-RevId: 3c1a48693c031f1c650650a9b3a7059fb962ba5c
2026-11-13 18:53:48 +00:00
andrewgu-oai dd8cee9822 Add structured error kinds for exec-server process starts (#61358)
## What changed

Attach a tagged `ProcessStartErrorData` value to JSON-RPC errors for not-found, permission-denied, and other spawn failures, unavailable sandboxes, and sandbox preparation failures.

Record the error code and structured error kind for failed `process/start` responses in the `codex.exec_server.response_received` tracing event.

GitOrigin-RevId: 556d0068e469ea25e95108262826a77a66b7d83b
2026-11-13 18:53:14 +00:00
Eric Traut 3f2603f2a2 Clarify removal scope for profile MCP servers (#61357)
## Why

`codex mcp get` suggests `codex mcp remove` for servers defined in the active profile, but that command only edits the global config.

## What changed

For servers defined in the active profile, replace the removal hint with the profile settings file path and an explanation of the command's scope. Keep the removal hint for servers inherited from the global config.

## Testing

Add CLI coverage for profile-only servers, profile overrides of global servers, and inherited global servers.

GitOrigin-RevId: 454df034f7e74b10f96983a9f13821d5ababfde7
2026-11-13 18:52:41 +00:00
Krish Chainani ae12a9d645 Add deferred MCP reprojection for the next regular turn (#61356)
## What changed

Add `CodexThread::reproject_mcp_on_next_turn()` to request an MCP reprojection after `TurnStarted` and before tools are bound. Repeated requests coalesce, and idle reconciliation or prewarming leaves the request pending until the next regular turn.

## Testing

Add coverage for deferred requests surviving prewarm and idle reconciliation, coalescing into one reprojection, and exposing refreshed tools in the turn's first model request. Verify that discovery starts after `TurnStarted`.

GitOrigin-RevId: 260b2381013291a47eb9a7f736c129de76c5897f
2026-11-13 18:52:09 +00:00
Sean Huang 76a8ca3914 Upgrade Bazel rules_rs to 0.2.3 (#61355)
## What changed

- Use the `rules_rs` 0.2.3 registry release instead of an archive override, and upgrade `platforms` to 1.1.0.
- Disable root crate alias targets and migrate explicit dependencies to package labels such as `@crates//tokio`. Disable root crate data for the argument comment linter's crate repository.
- Refresh the retained `rules_rs` patches, remove the zlib snapshot URL backport, and drop extra dependency declarations from `exec-server` and `v8-poc`.

GitOrigin-RevId: c354413a19b45964104457063c613028f5325bc0
2026-11-13 18:51:30 +00:00