Commit Graph
11817 Commits
Author SHA1 Message Date
felixxia-oai 00df7f65ab Preserve Guardian sender context for cloud deliveries with orbit IDs (#58946)
## Why

Delegation messages containing `<source_orbit_id>` fail sender provenance parsing, leaving Guardian without the sender's instructions.

## What changed

Accept an optional `<source_orbit_id>` between `<source_thread_id>` and `<input>`, rejecting values containing `<`. Continue to derive sender authority from the source thread ID.

## Testing

Update the cross-host sender context scenario and snapshot to include orbit attribution. The scenario checks that sender evidence reaches Guardian after compaction and rollback without exposing it to the receiving agent.

GitOrigin-RevId: 463b18667384d30297245eedcd0f6bcbf683634e
2026-11-02 18:43:57 +00:00
Eric Traut 4515bc6df0 Fix model selection after provider setup (#58945)
## Why

After provider setup, new threads could still use the models manager created for the server's startup provider, leaving their default model inconsistent with the model picker.

## What changed

- Build a models manager from the thread's configuration when its provider differs from the startup provider.
- Invalidate the model catalog after successful Amazon Bedrock setup so subsequent model listings reflect the configured provider.

## Testing

Extend Bedrock and GCP setup integration tests to verify that a new thread's model matches the refreshed model listing. The Bedrock test also checks that the thread uses `amazon-bedrock`.

GitOrigin-RevId: 1db30ad040ba97e2f4f31c9e162a2b73af1377fa
2026-11-02 18:42:19 +00:00
Eric Traut a5c4092437 Retire the daemon_auto_start feature flag (#58940)
## What changed

Eligible interactive launches now start or reuse the shared daemon regardless of `features.daemon_auto_start`. Remote-control daemon eligibility also no longer checks this flag. Use `--no-daemon` to run without the shared background server.

Treat `daemon_auto_start` as removed: ignore configured values with a migration notice, ignore managed requirements with a warning, and hide the flag from experimental feature discovery. Remove its launch telemetry tag.

## Testing

Extend retired-feature requirement coverage and add a migration-notice snapshot. Update CLI and TUI integration tests for daemon startup and explicit `--no-daemon` usage.

GitOrigin-RevId: e0290e5acd4bc0169a0f71c3296c567e46269ce3
2026-11-02 18:31:19 +00:00
Alex Kira 1a604d58da Refine additional-context byte histogram buckets (#58939)
## Why

The previous histogram placed post-truncation values just over 4,000 bytes in a bucket ending at 8,000 bytes, obscuring their size near the truncation cap.

## What changed

Use logarithmic boundaries through 4 MiB for `codex.additional_context.value_bytes`, with an explicit 4 KiB boundary near the truncation cap.

## Testing

Add a regression test verifying that post-truncation samples between 4,024 and 4,043 bytes land in buckets ending at or below 4 KiB while preserving their sum and count.

GitOrigin-RevId: af268fc0de3d5ceb648ce51fced3918317f2457a
2026-11-02 18:05:13 +00:00
victor-openai 62bf900680 Skip attribution for direct MCP tool calls (#58938)
## Why

`CodexThread::call_mcp_tool` returns only the tool result, so computing attribution and creating a cached runtime binding for these calls is unnecessary.

## What changed

Add `McpRuntime::latest_call_tool_without_attribution` and use it for direct thread calls. Validate the call, wait for server startup, and dispatch through the latest connections without capturing an attribution binding.

## Testing

Extend the runtime binding cache test to verify that a successful call without attribution leaves the cached binding empty. Update the test server to return a successful tool result.

GitOrigin-RevId: 898e655d9a0174ddaf71c390757d6fc9a5a61780
2026-11-02 17:55:39 +00:00
Sean Huang 172d8fc593 Verify queued network approval wakeups before polling again (#58937)
## What changed

Strengthen the execution cancellation test to verify that a session approval wakes a queued request before it is polled again. Assert that the request remains unwoken while the session policy commit lock is held, then receives a wakeup after the grant completes.

Wait for the second request to hold a prompt queue reference and install a counting waker on its semaphore. Share `WakeCount` with the existing manual prompt wakeup tests.

GitOrigin-RevId: c559a7c31385000347cd1c7dace25e84d1099db9
2026-11-02 17:54:31 +00:00
ioanbudea-OAI 68334831d8 Extract model-provider unit tests into separate files (#58936)
## What changed

Move inline tests for authentication, bearer auth, model endpoints, and providers into dedicated `*_tests.rs` files. Register workspace-routing tests under the `workspace_routing` module and keep test-only imports with the tests.

GitOrigin-RevId: 9ba043c82814e27be63432a0e13a4929dc3ea372
2026-11-02 17:35:57 +00:00
ioanbudea-OAI a54329e235 Defer Guardian context trimming in elastic preparation (#58935)
## What changed

- Thread `ContextBudgeting` through synchronous context and image preparation. Elastic mode preserves candidates for later entry capping and allocation; existing reviewer callers continue to use `Fixed`.
- Defer transcript selection, supporting-text caps, and image budget admission in elastic mode while preserving exact planned actions. Mark host framing as protected and distinguish optional user messages from required manual approvals.
- Add `ElasticBudgetConfig` validation requiring section minimums, including fallback policies, to sum to `DEFAULT_MAX_INPUT_TOKENS`.

## Testing

Extend tests for elastic transcript preservation, deferred native tool-call limits, oversized planned actions, image allocation, and section minimum totals above and below the required budget.

GitOrigin-RevId: 46a4605e12e2bab5973097eb1caf5fd99f6640aa
2026-11-02 17:26:49 +00:00
jif 0712633d37 Release message-board state before HTTP shutdown returns (#58933)
## Why

Connected legacy MCP sessions and HTTP keep-alive connections can retain message-board state after shutdown. Pending board bindings also need cancellation before they can dispatch a tool call.

## What changed

Explicitly close MCP sessions after HTTP drains and track binding factories and handlers until they release their state. Cancel pending bindings during shutdown while allowing already-dispatched board operations to finish. Clarify that `LocalServer::shutdown` waits for cleanup, while dropping the server initiates it.

## Testing

Add regression coverage for shutdown with a connected legacy client, a paused board binding, and an unauthenticated keep-alive connection. Assert that shutdown releases the board host before returning.

GitOrigin-RevId: 7fbc9415e579a21f0c0fcf7bbb7db239b3aea886
2026-11-02 17:16:07 +00:00
swastik-oai 451787127c Support direct Guardian review of patches invoked through exec_command (#58931)
## Why

Direct Guardian review rejected recorded `exec_command` calls intercepted as `apply_patch`, even though normal execution could review those patches.

## What changed

Share intercepted patch preparation between execution and direct review so Guardian assesses the verified patch and its approval requirement without applying it.

## Testing

Extend the direct patch review scenario to cover `exec_command` heredocs alongside native `apply_patch` calls, asserting identical live and direct review inputs and no file writes after direct approval.

GitOrigin-RevId: af62cf66a3f01c65a65c15cfad3fc9cdd1f2bf19
2026-11-02 17:05:56 +00:00
Felipe Coury 8a17396d13 Fix live stream reflow at the allocated conversation width (#58927)
## Why

Streaming answers and plans need to wrap to the conversation's allocated width, which can differ from the terminal width. Resizing while reading earlier output should not report new activity unless new output has arrived.

## What changed

Reflow live streams when preparing the owned conversation layout, using its allocated width. Update the observed live revision after presentation-only reflow so it does not trigger `New activity`, while preserving notifications for unseen output.

## Testing

Add regression coverage for streaming answer and plan tables across width changes, including a narrow-layout snapshot, preservation of the reading position, and activity notifications when new output arrives before a resize.

GitOrigin-RevId: a9831c5a1a5ffb7477e7868d4ecca430d6ee50f3
2026-11-02 16:56:09 +00:00
jif 8806313db4 Scope local history discovery to the current ChatGPT account (#58918)
## What changed

- Add `currentAccountOnly` to `thread/list` and `thread/search`, defaulting to `false`, and enable it for TUI history discovery, resume pickers, and task mentions.
- Mark newly created threads as account-scoped and require each recorded creator user or account ID to match the current login. Older threads and threads without creator IDs remain shared; API-key logins continue to see all local history.
- Preserve account scope through resume and revert, including fallback to original rollout metadata when an older binary drops the marker. Forks receive new-thread scope.
- Skip unreadable rollout headers in scoped discovery and filter search candidates before reading snippets. Direct access by thread ID remains available.

## Testing

Add coverage for account matching, shared legacy history, list page refilling, search pagination, API-key visibility, and scope preservation across reverts. Extend rollout lookup coverage to compressed active and archived files.

GitOrigin-RevId: aa374f5e69165be5a71c0716ded1b105f5fb51e0
2026-11-02 16:00:20 +00:00
jif 6c4fa86838 Add an in-memory launcher for the message-board MCP server (#58909)
## What changed

Expose `launch_in_memory()` and `LocalServer` to run a loopback HTTP endpoint with generated bearer credentials. Runners register a shared in-memory board per session through `add_board(session_id, host)`, using `MessageBoardHost` for membership, clocks, and notifications without a SQLite registry.

The handle exposes the endpoint and authorization header for MCP configuration, including plugin endpoint overrides. Dropping it cancels HTTP and MCP sessions; `shutdown().await` also waits for completion.

## Testing

Extend the parent/child HTTP integration scenario to cover the in-memory launcher, plugin endpoint overrides, host-provided timestamps, authentication and invalid identity rejection, and operation without creating a SQLite board database.

GitOrigin-RevId: e1cae295724a35f4eded290ba8a4e19926b98c13
2026-11-02 15:29:45 +00:00
jif 517960e0ed Package the message board MCP connection as a plugin (#58908)
## What changed

Add a `message-board` plugin with connection metadata for the HTTP MCP server. It defaults to `http://127.0.0.1:7777/mcp`, uses `CODEX_MESSAGE_BOARD_TOKEN` for bearer authentication, and marks the server as required.

Document installation and endpoint overrides through `mcp_servers.codex_message_board`. Installing the plugin does not start the server.

## Testing

Extend the HTTP board integration scenario to cover both direct configuration and plugin installation, verifying that a child can post a decision and its restarted parent can discover the same board and read it. Add a plugin context snapshot and include the plugin resources in Bazel test data.

GitOrigin-RevId: d6cf797caaa4dbdcd45114c2ad0a6bd695cf056f
2026-11-02 15:28:37 +00:00
jif 18c6dbe52b Add a standalone HTTP MCP server for the agent message board (#58904)
## What changed

- Add `codex-message-board-mcp` to serve discussion tools at `/mcp` through ordinary MCP configuration, backed by the existing SQLite board and a read-only Codex registry.
- Require bearer authentication and validate `threadId` and `sessionId` metadata against persisted agent membership. Support additional allowed HTTP hosts with `--allowed-host`.
- Expose a reusable `serve_http` library entry point and scope retry deduplication to the caller within an MCP session.

## Testing

Add integration coverage for a child posting and its restarted parent reading the persisted board, including reads while a database writer lock is held. Cover invalid tokens, disallowed hosts, missing caller metadata, invalid membership, and startup without an existing registry.

GitOrigin-RevId: 5e3d71eaaf120169e2585acd0b5f84df1b402f00
2026-11-02 15:09:22 +00:00
swastik-oai f04090521d Support permission requests in direct Guardian review (#58903)
## What changed

Allow `guardian_review` to assess a final recorded `request_permissions` call without granting permissions. Build the review action using the same permission request preparation as live review, while continuing to reject earlier permission requests in the recorded history.

Return no assessment when the approval policy is `never` or granular policy disables permission requests.

## Testing

Add coverage comparing live and direct permission review inputs, plus tests that disallowed requests return no assessment without contacting the reviewer.

GitOrigin-RevId: cb5935202b0980e657b023f840a0186cea5e0b74
2026-11-02 15:07:54 +00:00
swastik-oai 84dfc209d2 Add native patch support to direct Guardian review (#58899)
## What changed

Allow `guardian_review` to assess recorded native `apply_patch` calls alongside `exec_command` calls. Use the existing patch preparation and approval logic without applying the patch, and skip assessment when approval is unnecessary.

## Testing

Add coverage that compares direct and live patch review inputs, verifies that an allow decision leaves files unchanged, and checks that writable files skip review without writes or model requests.

GitOrigin-RevId: 8634ad8c00a67bcac9e7930ebf89c02707c3a6f7
2026-11-02 14:40:54 +00:00
goodman-oai aef7d276a4 Support model catalog overrides for plugin guidance (#58894)
## What changed

- Add `model_messages.plugins` overrides for generic usage guidance, selected-plugin hints, and recommendation introductions, with independent fallback to bundled wording for missing or invalid fields.
- Validate text limits and required template placeholders while keeping plugin identities, available capabilities, and eligibility controlled by the client.
- Track generic guidance changes across model switches and session resume, emitting replacement or retirement notices and supporting legacy snapshots and retained history.

## Testing

Add unit and scenario coverage for sparse overrides, literal text preservation, template validation, UTF-8 size bounds, capability filtering, recommendation fallback, and guidance recovery after resume.

GitOrigin-RevId: 148b658c2d8490c9d0dc208addbee1be5342a5f5
2026-11-02 14:06:17 +00:00
jif 1e8b536dc7 Add a feature-gated account check for CLI thread resume (#58890)
## What changed

Add the disabled-by-default `cli_resume_account_check` feature. When enabled for `codex-tui` and `codex_exec`, reject resuming or attaching to a local thread if its recorded creator user or workspace differs from the current ChatGPT account. Return an error directing the user to sign in with the original account.

Carry creator IDs through stored thread metadata and check them before loading resume history. Preserve existing behavior for untagged threads, other clients, and authentication modes without a comparable ChatGPT account.

## Testing

Add integration coverage for account and workspace mismatches, matching accounts, legacy and paginated history, ID and path lookup, and the feature's default and bypass behavior. Verify that switching back to the original account permits attachment to a loaded thread and that creator metadata remains unchanged.

GitOrigin-RevId: a3ab089254703417dde0890a5f8d6326c4cbb75a
2026-11-02 13:51:49 +00:00
jif 020e0f7708 Preserve timestamp ties when paginating threads (#58886)
## Why

Timestamp-only cursors can skip threads that share the last result's timestamp, including rollout files created in the same second.

## What changed

- Include thread IDs as tie-breakers in time-sorted listing and search cursors, and use them when resuming filesystem scans and database queries.
- Share filesystem sort-key and cursor construction so continuation cursors match the listing order, including filename-based creation times.
- Preserve support for legacy timestamp-only cursors and their existing behavior of skipping ties.

## Testing

Update regression coverage for pagination through filesystem timestamp ties, legacy cursors, thread IDs in database fallback cursors, and search cursors for all time-based sort keys.

GitOrigin-RevId: 455b95452849e6ffe20a27d7bdcec864f2e8135a
2026-11-02 13:40:04 +00:00
Charlie Marsh ba0d0e1f74 Handle steers accepted during the final transcript flush (#58877)
## Why

Input accepted while a regular turn was flushing its transcript could miss the final pending-input check and remain unprocessed when the turn completed.

## What changed

Check pending input atomically with closing steer admission. If input was accepted, resume sampling in the same turn while preserving MCP startup requirements, and complete the turn with the updated answer.

## Testing

Add a regression test that pauses the final flush, submits a steer, and verifies that the model receives it exactly once before the same turn completes with the answer to the steer.

GitOrigin-RevId: 193db3ab6916a86e97c3845590598fd8fbe47081
2026-11-02 12:24:38 +00:00
alexsong-oai 053e5b1ca9 Add model provider configuration writes to the app-server (#58876)
## What changed

Add `modelProvider/config/write` to create custom gateways and patch existing custom gateway, Bedrock, and GCP settings. Return the saved provider using the same safe summary as `modelProvider/list`.

Omitted fields retain their values; explicit `null` clears nullable user overrides. Apply patches through the shared configuration queue with last-write-wins semantics, enforce field editability and validation, and preserve unexposed authentication settings.

Saving leaves provider selection and authentication unchanged. Saving the provider used by `model/list` invalidates its catalog for the next access. Include documentation and generated JSON, TypeScript, and Python protocol types.

## Testing

Add coverage for gateway creation and ID allocation, patch and null semantics, configuration policy enforcement, authentication preservation, and catalog refresh after active-provider edits. Extend Python protocol tests to verify wire round trips and reject mismatched provider IDs or fields.

GitOrigin-RevId: 850fe2c48ef5274944400efb5a859d720179c923
2026-11-02 12:22:22 +00:00
alexsong-oai 3026a8e54e Add model provider discovery to the app server (#58845)
## What changed

- Add `modelProvider/list` to return OpenAI and explicitly configured providers, provider-specific settings, and the selected default provider.
- Report `canEdit` and `canChangeDefault` based on configuration requirements, layer precedence, and whether user configuration is enabled.
- Describe gateway authentication without resolving credentials, and omit endpoint URLs that are unsuitable for display.
- Document the API and update generated JSON schemas, TypeScript types, and Python models.

## Testing

Add app-server tests for provider discovery, authentication modes, unsafe URL suppression, and configuration editability, plus a Python wire-format round-trip test.

GitOrigin-RevId: 8ba26637cd6bdd075e0e815e88aeeb04c53a2364
2026-11-02 08:31:14 +00:00
Won Park 05c08d7655 Accept agent follow-ups through native turn input delivery (#58829)
## Why

`start_or_steer_turn` rejected agent messages, preventing callers from submitting follow-up work through the turn input API.

## What changed

Route `TurnInput::InterAgentCommunication` through native agent message delivery and return `TurnInputSubmission::Accepted`, without implying an immediate turn ID. These submissions request work regardless of `trigger_turn`, retain the recipient's settings, and forward turn-start options.

Wrap plaintext messages with agent context while preserving encrypted content. Reject submissions to idle recipients when the host is draining.

## Testing

Add scenario tests and snapshots covering queued-message ordering, encrypted follow-ups, preemption at reasoning boundaries, and follow-ups arriving before or after a final answer. Extend drain-gate coverage to agent submissions with parent-turn lineage.

GitOrigin-RevId: 92d49465f97bb366babbf1b1bc18a1e8a6c6ed1c
2026-11-02 07:27:49 +00:00
Eric Traut a09812981d Validate /fork before consuming the composer draft (#58767)
## Why

MCP startup alone should not block `/fork`, and rejecting a fork while foreground work is pending should preserve the draft and its image attachments.

## What changed

- Defer `/fork` draft consumption until dispatch validates the thread state, as for `/review`.
- Allow `/fork` during MCP startup when no user turn or review is pending or running, and clear the composer after validation succeeds.
- Preserve drafts and attachments when these commands are rejected in side conversations.

## Testing

Extend regression coverage for `/fork` and `/review` draft preservation during MCP startup, successful fork dispatch and composer clearing, rejection during an active review, and attachment preservation in side conversations.

GitOrigin-RevId: d152ba6659e4507d8750cb6bd3073d9f8b293538
2026-11-01 23:27:06 +00:00
Eric Traut b8c5102431 Distinguish update handoffs in TUI startup telemetry (#58766)
## Why

Accepting the startup update prompt exits before connecting to an app server, so launch telemetry previously reported `unconfirmed`.

## What changed

Record `app_server_mode=update_requested` when handing off to the updater. Continue recording `in_process`, `local_daemon`, or `remote` after a successful connection, and use `unconfirmed` for other early exits.

## Testing

Extend the launch telemetry test to verify exactly one recording for a connection, an update handoff, or an early return.

GitOrigin-RevId: 10dd29246218e1a86a396ab073305402a0b44d38
2026-11-01 23:25:39 +00:00
Brent Traut fe16bc0a97 Release superseded assistant text from live paginated history (#58751)
## Why

Live paginated history retains completed assistant text even when summaries only need the latest message. Release older text for threads with persisted history while preserving full resume responses.

## What changed

- Evict superseded assistant text from live turn state while preserving corrected items and the latest assistant message.
- Restore evicted text for full resume responses from prepared history pages, fetching remaining items by ID in bounded batches. Return an error if saved text is missing.
- Only load the active turn when it belongs in the requested initial page, and use the item ID index for targeted history reads.

## Testing

Add reducer coverage for text eviction and corrected messages. Extend running-thread resume coverage to compare full and summary items with live notifications, exercise restoration when the prepared page lacks the active turn, and check missing-text errors.

GitOrigin-RevId: 3229c0cea820f117dc6331312f1e6056a8d1d52c
2026-11-01 20:10:33 +00:00
Benjamin Carlsson 54201ea65a Add naming and navigation helpers for TUI backend sessions (#58722)
## What changed

Add `BackendSessions` helpers to name the displayed listening backend, find the first listening backend, and cycle through listening backends in registration order. Cycling wraps around, skips closed streams, and excludes the current backend. Display names use `Local` for the initial session and `Backend N` for additional sessions; a closed displayed stream has no name.

## Testing

Extend backend session tests to cover cycling with a single backend, wraparound across three backends, and skipping a closed stream.

GitOrigin-RevId: e8f3fcc38a178b6b91d385d65d899fdd042062c5
2026-11-01 15:59:49 +00:00
Tamir Duberstein 181b4a853d Prioritize pending approvals in the subagent picker (#58720)
## What changed

- Group threads needing approval first in `/subagents`, mark them with `(needs approval)`, and initially select the first waiting thread.
- Refresh the open picker and approval notice as requests and agent metadata change, preserving the selected thread when rows move.
- Use consistent agent labels across the picker and approval notice, preferring agent paths and using UUID suffixes to distinguish unnamed agents.
- Track approval requests that arrive before thread metadata and refresh pending approvals after reconnecting.

## Testing

Extend the picker test and snapshots to cover approvals arriving while the picker is open, agent paths arriving later, and selection staying on the same thread after reordering.

GitOrigin-RevId: b7dd943d151ce98d1978f7c6b9f5e16903b9075b
2026-11-01 15:51:11 +00:00
Benjamin Carlsson e02a32cd51 Wire native voice dependencies into full Rust CI (#58719)
## What changed

- Build native voice SDK and runtime artifacts with Bazel for Linux GNU, macOS, and Windows on x64 and ARM64, then configure Cargo jobs to consume them. Keep musl builds in a separate job without these inputs.
- Validate artifact receipts against the target, source commit, and source manifest; verify SDK file hashes and relocate pkg-config metadata. Package the runtime and plugins with nextest archives and restore `CODEX_TEST_VOICE_RUNTIME` when running shards.
- Prepare native Windows voice tools for argument-comment linting and install ARM64 DotSlash on Windows ARM64. Reduce archive disk usage, bound Linux ARM64 build concurrency, and correct the JUnit artifact path.
- Recognize TLS errors wrapped directly in `io::Error`. Make TLS fallback fixtures select the native backend explicitly, allow the MCP test server's non-loopback address, and isolate skill-root tests from ancestor Git markers. Install `git` in remote test containers and filter MCP discovery assertions to POST requests.

## Testing

Add tests for relocated voice inputs, Windows ARM64 import libraries with host-native pkgconf, and rejection of mismatched receipts or corrupt SDK files. Extend untrusted-certificate coverage to an explicitly selected rustls backend.

GitOrigin-RevId: da3ff690b94906edc1f8f60a3c7feda1bf66134a
2026-11-01 15:50:50 +00:00
Felipe Coury 8c811e8d93 Support rendering TUI conversations within an inset area (#58718)
## What changed

Split conversation rendering into preparation, painting, and post-draw steps. Use the supplied conversation bounds for transcript wrapping, composer layout, suggestion overlays, cursor placement, and the empty-state animation.

Preserve surrounding text and image placements during input-triggered redraws. Keep centered dialogs relative to the full viewport and restore neighboring content when they close.

## Testing

Extend regression tests and add a snapshot for conversations rendered at an offset, covering selection, link hit testing, cursor placement, scroll preservation, neighboring images, and dialog dismissal.

GitOrigin-RevId: 0dbca3f8d1064f2d58856c3bc77a4dab1c099cdd
2026-11-01 15:50:25 +00:00
Eric Traut 5e07d1f694 Support OSC 52 clipboard forwarding through GNU screen (#58716)
## What changed

Detect GNU screen via `STY` when `TMUX` is absent and wrap OSC 52 clipboard sequences in DCS passthrough strings. Split the sequence into 252-byte chunks to stay below screen's older 256-byte string limit while forwarding one continuous OSC 52 sequence to the outer terminal.

Prepare the terminal sequence in the clipboard worker and retain it for deferred delivery.

## Testing

Add coverage for short text and a longer Unicode payload, checking that each passthrough chunk stays below the limit and that reassembling the chunks reproduces the complete OSC 52 sequence.

GitOrigin-RevId: 1a042ed4fed817179e98459f4f4b2b847b160721
2026-11-01 15:39:52 +00:00
Eric Traut f7f1f0196c Sort agent center tasks by recency within status groups (#58714)
## What changed

Keep unpinned tasks ordered by descending update time within each status group as tasks arrive, change status, or refresh. Clearing a search or status filter also reflects timestamp changes to hidden tasks.

Keep pinned tasks at the top of their respective status groups in pin order, and mark their titles with 📌 instead of placing them in a separate Pinned group when grouping by status.

## Testing

Update ordering tests and snapshots to cover arrivals, status transitions, rediscovered tasks, filters, pins, and adjacent selection after hiding tasks.

GitOrigin-RevId: 2f3320a17b1932294f421dd28af848f0e0be45ef
2026-11-01 15:39:27 +00:00
Benjamin Carlsson 456ae93b63 Extract fresh session adoption from TUI session startup (#58713)
## What changed

Bundle the started thread, configuration, and local settings in
`PreparedFreshSession`, and move session activation into `adopt_fresh_session`.
The helper preserves input state, switches threads, applies settings, names the
session, and attaches the chat widget with a caller-supplied presentation.

`start_fresh_session` delegates to the helper with
`ThreadAttachPresentation::Fresh`, preserving its existing behavior.

GitOrigin-RevId: c4fdb6b5024a024f6baa48610e62a8e6628de30a
2026-11-01 15:38:07 +00:00
Ian MacLeod 67f0994b53 Tighten Bazel CI snapshot handling and OTLP test cleanup (#58459)
## Why

Failed snapshot assertions should print their diffs without leaving `.snap.new` files after a passing retry. The OTLP loopback collector should stop once exporter shutdown completes instead of waiting for its deadline.

## What changed

- Set `INSTA_UPDATE=no` for Bazel CI tests, including the local configuration used when no BuildBuddy API key is available.
- Initialize the OTLP provider before starting the collector's deadline in the Tokio bounded-shutdown test.
- Signal the collector to stop after shutdown and join its thread before propagating any shutdown error.

GitOrigin-RevId: 55b050822ec923894c9edbc8f039f35f693a4b7e
2026-10-31 00:12:17 +00:00
Benjamin Carlsson 1da2aefe00 Enable cross-backend session switching in the TUI (#58457)
## Why

The session picker can list conversations from multiple backends, but selecting a conversation owned by another backend was rejected.

## What changed

- Resume selected conversations through their owning backend, preparing the destination before replacing the current conversation. Preserve drafts and restore the destination's settings, account state, model catalog, and workspace services.
- Block backend switches during an active turn and retain the current conversation when destination preparation fails.
- Queue background backend requests until that backend is displayed, removing requests that are resolved or disconnected. Isolate background events from the displayed conversation while continuing to deliver notifications to a background voice session.
- Track backend ownership for thread detachment, startup results, and reconnect attempts.
- Remove the `yaml-rust` advisory exception from `codex-rs/deny.toml`.

## Testing

Add regression coverage for backend handoff errors, detaching through the source connection, clearing stale provider errors, deferred request delivery and cleanup, and voice-session closure on a background backend.

GitOrigin-RevId: 1bba84f16831af1d5295c1404f48803ce0608d3d
2026-10-30 23:56:12 +00:00
cassirer-openai 7656a23b8d Preserve incomplete response output in failed inference traces (#58456)
## Why

When a response fails with incomplete output, attempted tool calls can appear only in the terminal response payload. Failed inference traces previously omitted those items, losing evidence of the attempted call.

## What changed

Retain output items marked `incomplete` on `ResponseIncompleteError` and include recognized items in failed inference traces, deduplicating by item ID. Keep these items out of streamed output, tool dispatch, and the continuation cache, and omit their payloads from the error's debug representation.

## Testing

Add tests for retaining only incomplete output from terminal responses and recording attempted calls in failed traces without streaming them or creating tool calls. Cover unknown response item types being skipped.

GitOrigin-RevId: 594f6a37a5af543694f19fcffe0c164cb2addb36
2026-10-30 23:55:47 +00:00
ioanbudea-OAI 26cc286314 Add elastic budgeting for Guardian context preparation (#58454)
## What changed

Introduce `ContextBudgeting::Elastic` to prepare captured root conversation and Node REPL evidence without the fixed per-section request caps. Elastic preparation preserves message text and candidates for later allocation while retaining storage omission notices and legacy source deduplication.

Keep `ContextBudgeting::Fixed` as the default and use it at existing call sites.

## Testing

Add tests covering elastic root message preservation and legacy source deduplication, plus REPL text, images, and omission counts in text-only and multimodal modes.

GitOrigin-RevId: ce4fae9d725694456525a413fb511166df6f5e2c
2026-10-30 23:54:38 +00:00
Eric Traut a795f961be Make viewed image paths clickable in the TUI (#58446)
## What changed

- Add terminal file hyperlinks to viewed image filenames and transcript paths, including older history loaded through pagination.
- Enable links only for local workspaces outside SSH sessions. Require a local regular file with a recognized image extension on both the original and resolved paths, and reject Windows reparse points.
- Preserve links when summaries are truncated or transcript paths wrap.

## Testing

Add coverage for local versus remote workspace links and for hyperlink destinations and column ranges in compact and expanded image rows.

GitOrigin-RevId: a7dff255c280ad4e609644e6f5ef5e130d9a55fb
2026-10-30 22:30:53 +00:00
ioanbudea-OAI 2f452e74b2 Cap Guardian context entries before elastic allocation (#58444)
## What changed

- Add `prepare_elastic_entries` to cap required and optional supporting text before allocating whole optional entries. Measure rendered content, including JSON escaping, metadata, and framing, while preserving truncation markers.
- Keep exact planned-action JSON, images, audio, and opaque native payloads whole. Mark shortened sources incomplete and record truncation sizes.
- Expose token estimation and synchronous delivery preparation on `PreparedElasticContext` so deduplication uses the capped representations.

## Testing

Add tests for required and optional entry caps, transcript metadata preservation, unchanged short entries and opaque payloads, and exact action preservation with rejection when the request budget cannot accommodate the action.

GitOrigin-RevId: 23008fb03d15d501e5d602f0584f70b473c2c2e8
2026-10-30 22:24:56 +00:00
goodman-oai 22fbf8de8e Preserve Apps usage instructions in model catalog messages (#58441)
## What changed

Add optional `ModelMessages.apps` and `AppsMessages.usage_instructions` fields to carry model catalog wording without runtime interpretation. Missing or null values become `None`, and strings retain their exact contents, including empty strings, whitespace, and template-like text.

## Testing

Add serialization coverage for nullable and literal Apps values, and extend existing tests to verify Apps messages survive model response round trips and base instruction overrides.

GitOrigin-RevId: 49b516656255e07b91f8f4679e2acb8e1b03f9e1
2026-10-30 22:02:26 +00:00
Philipp Spiess 0ffae14a43 Add interactive controls and refresh inline visualization styles (#58436)
## What changed

- Add tab switching with keyboard navigation and a `.viz-carousel` variant picker with previous/next controls and screen reader announcements.
- Support touch tooltip toggling and tooltip triggers inside shadow roots.
- Refresh typography, tables, buttons, and form controls; add widget and progress styles and larger touch targets.

## Testing

Add a viewer snapshot test covering embedded tab and carousel scripts, generated control markup, and selected CSS rules.

GitOrigin-RevId: 3b85ef816fe307e8ac9903f176a0b81430e48f3f
2026-10-30 21:27:28 +00:00
Hung 5a7353f040 Treat audio validation failures as non-retryable input errors (#58434)
## What changed

Map audio size, data, format, and sample-rate validation failures to `InvalidAudioInput` for HTTP 400 responses and streamed errors. Preserve the provider's message, falling back to `Invalid audio input.` when it is absent or blank.

Classify these errors as non-retryable and expose them as `BadRequest`. Redact their messages in doctor diagnostics and group them as invalid requests in telemetry.

## Testing

Add coverage for all six audio validation codes across HTTP errors, streamed `error` events, and `response.failed` events, checking error classification, message preservation, and the absence of retries. Extend doctor diagnostic redaction coverage for `InvalidAudioInput`.

GitOrigin-RevId: 0a59964bcabd83997bdb32fc9318a5482dac33b0
2026-10-30 21:01:23 +00:00
Hung 2546265e3e Add audio file references with explicit runtime rejection (#58430)
## What changed

- Allow audio inputs to carry uploaded file references via `fileId` in the app-server API and `file_id` in model content, preserving existing inline audio shapes and Python class names.
- Preserve mixed inline and file-backed audio ordering through history reconstruction and migration, and budget file-backed audio conservatively when duration is unknown.
- Keep uploaded audio disabled at runtime: reject it before inference or raw history injection, preserve accompanying text, and prevent rejected attachments from reaching follow-up or resumed requests.

## Testing

Add coverage for wire-format round trips, SDK compatibility, mixed audio history ordering, and rejection during turn start, steering, task completion, and raw injection.

GitOrigin-RevId: 70895c47a2494c0c9936348ad1250eb1b7b892a6
2026-10-30 20:53:25 +00:00
Matthew Zeng b9858217d8 Support app settings in plugin configuration (#58428)
## What changed

Allow connector-wide app settings under `plugins.<plugin>.apps.<connector>` for plugins enabled by configuration. Merge these settings field by field, giving earlier plugin names precedence and applying explicit top-level `apps` fields last. Ignore nested `_default` settings.

Expose the merged app settings and their field origins through the config API. Keep app policy changes from invalidating the loaded-plugin cache.

## Testing

Add coverage for plugin enablement, merge precedence, field origins, config API output, cache reuse, and disabling an app through plugin configuration during explicit plugin mentions.

GitOrigin-RevId: a275319815915dc618ee606b10e0844248dbccb5
2026-10-30 20:39:47 +00:00
alexsong-oai 22b3365156 Group alternative sign-in methods in a submenu (#58427)
## What changed

Move OpenAI API key, Amazon Bedrock, and Google Cloud Vertex AI options under “Sign in another way” during onboarding. Keep ChatGPT and device code sign-in on the main menu, and let `Esc` return from the alternative methods menu.

Guard activation keys across menu transitions so holding `Enter` or a numeric shortcut cannot advance through multiple steps or save a prefilled API key without a fresh confirmation.

## Testing

Add regression coverage for held activation keys and update onboarding tests and snapshots for submenu navigation, provider availability, and returning with `Esc`.

GitOrigin-RevId: b5aa56e48f10b490cc8f04b5d4288d21b76d2c61
2026-10-30 20:26:22 +00:00
swastik-oai 8801b9a8a6 Simplify recorded exec command review (#58418)
## What changed

Inline validation and command preparation in `review_tool_call`, removing the
`RecordedExecCall` helper. Use the tool invocation's call ID for approval actions
and return `GuardianReviewResult` directly from the review future, including when
no assessment is required.

GitOrigin-RevId: aafd01f640d46dc542a649bc5b31b3cfba7bedb8
2026-10-30 19:26:26 +00:00
Matthew Ma 275a9a89b6 Keep exposed leading bangs literal in the chat composer (#58412)
## Why

Deleting `Yes` from `Yes! I agree.` should leave an ordinary message, without entering shell mode or treating the remaining `!` as a shell command on submission.

## What changed

- Activate shell mode when an edit inserts a leading `!`, rather than when deletion exposes one.
- Use the composer's shell-mode state to classify submissions and preserve that state when restoring the same draft.
- Keep input with whitespace before `!` in normal text mode.

## Testing

Add regression coverage for literal-bang submission and queueing, editing and rendering, Vim repeat and undo/redo, and cancelled history search. Update paste and startup-submission tests to distinguish literal bangs from shell commands.

GitOrigin-RevId: 05002c3e07edb47e0882465ad91b39d317d2c663
2026-10-30 18:53:11 +00:00
rhan-oai 6df44f08dd Expose non-consuming input activity waits to hosts (#58411)
## Why

Host-owned tools need to wait for agent messages or steering input with the same behavior as native `wait_agent`, including when native multi-agent support is disabled.

## What changed

- Add `CodexThread::wait_for_input_activity` and export `InputWaitOutcome` through core and core-api, sharing the wait implementation with `wait_agent`.
- Distinguish notifying agent messages from steering input, with steering taking precedence when both are pending. Passive response items do not wake waits.
- Observe input without consuming it. Waits remain active after the original turn ends, support independent observers, and can be cancelled by dropping the future.

## Testing

Add coverage for pending and incoming input, agent-message classification, cancellation, independent observers, timeouts, and input arriving after the original turn completes or is interrupted.

GitOrigin-RevId: d0c0bd776c3b6fd4ba3021603d87eaaf1d93976f
2026-10-30 18:34:10 +00:00
Alex Daley 0e31c29e25 Enable deferred tool world state by default (#58410)
## What changed

Mark `deferred_tool_world_state` as stable and enable it by default. Deferred tool namespaces now appear in the developer `<tools>` context instead of the `tool_search` description. Explicitly disabling the feature preserves discovery metadata in the search description.

## Testing

Update tool discovery tests to cover the default behavior and explicit opt-out, and refresh request snapshots for the deferred namespace context.

GitOrigin-RevId: d58e369ea22754cee593c26a5ca011e41ba56e79
2026-10-30 18:33:14 +00:00