Commit Graph
11214 Commits
Author SHA1 Message Date
guinness-oai 90e653014a Add opt-in reasoning status for realtime V3 delegations (#47377)
## What changed

Add `backend_reasoning_status`, disabled by default, to relay public reasoning summaries during active, server-managed realtime V3 delegations.

Use the last non-empty summary from each completed reasoning item, truncate it to 256 bytes at a character boundary, and append it as `[STATUS]` context on the `commentary` channel. Discard queued updates if their delegation is no longer active.

## Testing

Add an integration test covering enabled and disabled behavior, selection of the latest non-empty summary, exclusion of raw reasoning and partial summaries, and delivery without triggering `response.create` or changing the model's reasoning-summary setting.

GitOrigin-RevId: 75ce87dbbbab15a6d9d0ad0b23737738837192fd
2026-09-22 22:20:00 +00:00
iceweasel-oai 418199f6ad Add an opt-in preference for the local MXC sandbox (#47375)
## What changed

Add the default-off `features.prefer_mxc` flag to select MXC for local Windows execution when native support is available and effective network settings do not explicitly forbid local binding. Otherwise, retain the configured backend and legacy setup behavior.

Resolve the preference during config loading and use the effective local backend for execution, network proxy setup, sandbox diagnostics, and `windowsSandbox/readiness`. Preserve the configured backend for remote executors and `config/read`. Explicit `windows.sandbox = "mxc"` remains strict, and command failures do not trigger backend fallback.

## Testing

Add coverage for preference resolution, startup readiness without rewriting configuration, local and remote backend selection across environment updates and child threads, and workspace-write permission context in an agent turn.

GitOrigin-RevId: b51178f0371d38ebb58e41af54a068fca67fa316
2026-09-22 21:57:52 +00:00
vkg-oai 78fdcd2311 Overlap agent metadata reads when resuming a V2 root (#47369)
## Why

Restoring persisted V2 agent identities reads descendant metadata serially, making each storage read wait for the previous one.

## What changed

Read up to eight descendants concurrently while registering identities in graph order, preserving path and nickname reservation order. Skip identities already registered and continue restoring after individual read failures.

## Testing

Add a cold-resume regression test that gates child metadata reads to verify overlap, completes reads out of order to check deterministic path reservation, and injects a read failure. It also verifies that child runtimes remain unloaded until requested.

GitOrigin-RevId: ae90f24875966be83208884937621a6a9eb0d848
2026-09-22 21:42:11 +00:00
Owen Lin e7bbc79f48 Resume model context from the latest compaction boundary (#47365)
## Why

Resuming a compacted thread should use the compaction and its newer records without depending on older turn contexts or restoring stale state from before the compaction.

## What changed

- Stop paginated model-context scans at the newest compaction with `replacement_history` and `window_number`. Fall back to full replay if the newest compaction lacks either field.
- Align reconstruction with that boundary and restore `last_started_turn_id`, previous turn settings, and the multi-agent version from compaction resume metadata. Allow newer completed turns to override the saved settings.
- Keep canonical session metadata alongside the bounded replay and use the same scan boundary for subagent rollout migration.

## Testing

Add coverage for cold resume after mid-turn compaction, bounded/full replay equivalence, missing companion state, settings precedence, and incomplete-compaction fallback.

GitOrigin-RevId: f836464bb5cadd9be4a4e05b5d1679223713fc87
2026-09-22 21:17:08 +00:00
viyatb-oai 54487a5b61 Bound inbound exec-server requests across client transports (#47362)
## What changed

- Enforce an 8 KiB encoded-message limit for requests, unrecognized notifications, and malformed messages received by exec-server clients over stdio, WebSocket, relay, and Noise relay transports.
- Allow process output, exit, close, and HTTP request body notifications up to 2 MiB. Keep responses and errors subject to existing transport limits, and preserve executor-side request limits.
- Read stdio stderr in chunks of at most 8 KiB.
- Drop outgoing server-request `tracestate` values larger than 512 bytes while preserving `traceparent`.

## Testing

Add regression coverage for oversized requests across transports, malformed messages, requests wrapped in `RawValue`, fragmented Noise messages, large responses, streamed notifications, and trace-context preservation.

GitOrigin-RevId: 3fb87b6dc334296985ef40983d7276acfe9b9796
2026-09-22 21:07:20 +00:00
viyatb-oai c6ad6f33eb Restrict Windows sandbox default object access to the logon session (#47361)
## Why

Shared filesystem capabilities must not grant access to another logon session's processes, threads, or IPC objects. A shared account's implicit owner rights can also allow another logon to rewrite an object's DACL.

## What changed

- Grant full access in the token's default DACL only to the runner's logon SID, removing grants to Everyone and capability SIDs.
- Add an `OWNER RIGHTS` entry granting only `READ_CONTROL` to suppress the owner's implicit `WRITE_DAC` access.
- Close the new token handle if default DACL or privilege setup fails.

## Testing

Add a Windows `AccessCheck` regression test verifying that process memory, thread creation, termination, query, and DACL modification rights remain available to the creating logon but are denied to a simulated other logon sharing the same owner and capability.

GitOrigin-RevId: 94608466ee1b461fe10db1866e80b3988119bdfc
2026-09-22 20:46:58 +00:00
Felipe Coury 7db578fca6 Preserve user prompt URL destinations across terminal widths (#47360)
## Why

User prompt URLs only received explicit hyperlink destinations when they required forced wrapping, leaving other URLs without those annotations.

## What changed

Annotate web URLs before wrapping user messages so their full destinations survive both adaptive wrapping and forced splitting of oversized URLs.

## Testing

Add a regression test and snapshot at widths of 120, 60, and 24 columns, checking URL destinations, line width limits, and matching display and transcript output, including a prompt with an image placeholder and a parenthesized URL.

GitOrigin-RevId: fccae7b76a3613776d7a663c41e699ebad7eebc1
2026-09-22 20:34:21 +00:00
Dmitriy Kovalenko 722dae7afd Color paths and URLs in codex doctor by check status (#47358)
## What changed

Highlight recognized paths and URLs in check descriptions and details in red for failed checks and cyan otherwise. Extend path recognition on Windows to drive-absolute, UNC, Win32, and NT DOS paths.

## Testing

Add Windows and non-Windows color snapshots covering successful, warning, and failed checks, punctuation, and backtick-quoted paths with spaces. Assert that descriptions and details remain unchanged when color is disabled.

GitOrigin-RevId: e8f9982505aa155fd312b12f91a71271effeb35e
2026-09-22 20:20:06 +00:00
Felipe Coury 3ebfe7b300 Reserve spacing after recaps at the transcript tail (#47355)
## What changed

Reserve a blank row below a trailing recap when the transcript viewport has room. Keep this spacing in layout rather than selectable content, and omit it when a completed or live message follows the recap.

## Testing

Add snapshots covering recap tail spacing across terminal sizes, with and without a next action, and with completed or streaming follow-up messages. Verify that reflowed history retains a single separator between a recap and the following message.

GitOrigin-RevId: f9552931fac4eabd7d72c2b312ffba717257e9e1
2026-09-22 20:11:14 +00:00
Rennie 559264d92e Preserve invalid_prompt as a distinct error classification (#47353)
## Why

`invalid_prompt` responses were classified as generic invalid requests, losing the server's specific error classification.

## What changed

Add `InvalidPrompt` variants to the API and core error types and serialize the core protocol classification as `invalid_prompt`. Recognize the code in HTTP 400 responses, wrapped WebSocket errors, and SSE `response.failed` events while preserving server messages and keeping the error non-retryable. Map it to `other` in the app-server v2 protocol.

## Testing

Extend coverage for typed error mapping, missing and blank messages, protocol conversion, and guardian retry handling. Exercise HTTP and SSE failures in core integration tests, asserting the error message, serialized classification, and a single request without retry.

GitOrigin-RevId: 5d9a299a013b06158a4dc27a4054f3dbc5fd0f4d
2026-09-22 20:07:50 +00:00
Henry Levy 8edfca892d Reuse cloud skill catalogs across turns until invalidated (#47350)
## Why

Cloud skill discovery ran on every turn, even when the Apps resource generation and authentication scope were unchanged.

## What changed

- Reuse warning-free catalogs, including empty catalogs, while their authentication scope and Apps resource cache key remain current.
- Refresh after invalidation and retry failed or partial discovery on the next turn.
- Reject discovery results if the Apps resource cache key changes during discovery.

## Testing

Update lifecycle tests to verify cached turns avoid catalog listings and skill reads, while connection and authentication changes trigger refreshes. Update the referenced-resource test to verify partial discovery retries on the next turn without an explicit MCP refresh.

GitOrigin-RevId: ac47d5202d76703c4946afef3b1a48eaf05b54c2
2026-09-22 19:58:52 +00:00
Alex Daley 9124e23e2c Move plugin recommendations into developer context (#47349)
## What changed

Emit `<recommended_plugins>` with the `developer` role and append it to the shared developer message after other context. Retain recognition of legacy user-role recommendations in existing rollouts.

## Testing

Add a startup context snapshot and assertions that recommendations share the developer message with permissions instructions. Update core and app-server tests to check developer-role recommendations, including across successive model requests.

GitOrigin-RevId: 0326ff347e86ec38b948f93e39e90e6a88a8730c
2026-09-22 19:51:33 +00:00
Owen Lin 5121aeff13 Overlap subagent spawn persistence and clean up cancelled children (#47348)
## Why

Forked subagent startup serializes history persistence and spawn-edge writes. Cancellation during startup can also leave a provisional child behind.

## What changed

- Defer copied-history durability so it can run alongside spawn-edge persistence, while still awaiting both before submitting the child's initial input.
- Commit agent and residency reservations and notify clients only after initial input is accepted.
- Guard provisional children so cancellation or startup failure removes and shuts them down, discards their stored state, and closes their spawn edge after any pending edge write finishes.

## Testing

Add coverage for cancellation at the child-history durability barrier, checking child termination, removal, and edge closure. Extend fork-context tests in legacy and paginated history modes to verify inherited context can be read from storage after spawn acknowledgment without flushing the live child first.

GitOrigin-RevId: e02dda57efc32b7237bb7af0ce5e5844922890c3
2026-09-22 19:39:18 +00:00
Celia Chen df30941072 Add GPT-6 Sol and Luna to Amazon Bedrock catalogs (#47347)
## What changed

Add `openai.gpt-6-sol` and `openai.gpt-6-luna` to the Bedrock catalog, including `global.` and `us.` variants for Bedrock Runtime. Make GPT-6 Sol the default and provider fallback model, preferring its global variant for Runtime. Retain the existing models and update model picker ordering.

## Testing

Extend catalog and provider tests to cover the new models, metadata, ordering, and default selection. Update thread-start tests for supported model preservation and fallback behavior, and refresh Mantle and Runtime model picker snapshots.

GitOrigin-RevId: 5ce646e384353ae26cdfc4ea4e7c049ac61e698c
2026-09-22 19:38:06 +00:00
Keyan Zhang d93909a939 Skip stored title lookups for ephemeral forks (#47342)
## What changed

Skip the thread store title lookup when initializing an ephemeral fork, leaving its thread name unset.

## Testing

Add a regression test that forks an ephemeral thread from history and verifies that the in-memory thread store's `read_thread` count does not increase.

GitOrigin-RevId: 81180c4a836c932584d2cb94c0816eae33b04af3
2026-09-22 19:00:27 +00:00
pmccrary-oai 04fc75adbe Add conditional turn interruption that preserves pending input (#47340)
## Why

Callers need to interrupt a specific active turn without discarding queued input. Tool callbacks must be able to await the interruption decision without blocking task cancellation.

## What changed

- Add `CodexThread::interrupt_if_no_pending_input` and `Op::InterruptIfNoPendingInput`.
- Check the turn identity and pending user input or mailbox items before taking the active task. Leave the turn running for stale or abandoned requests.
- Acknowledge the decision before joining cancellation, and unblock pending submissions when the active task is cancelled.

## Testing

Add regression coverage for successful interruption, stale turns, preservation of queued user input and agent mail, abandoned requests, and cancellation while the submission queue is full.

GitOrigin-RevId: 42e31c09369fb070ba1b4b3c64ef45334dd872d8
2026-09-22 18:54:30 +00:00
Felipe Coury 1b1b58f5a5 Move the activity inspection hint into keyboard shortcut help (#47338)
## What changed

- Add “Inspect activity” to the shortcut help’s Session section, using the runtime `focus_activity` binding (`F4` by default) and hiding it when unbound.
- Remove the passive activity footer hint so composer hints remain available. Keep previous, next, details, and back controls while activity is focused, shortening them to fit the available width.

## Testing

Add snapshot coverage for default, remapped, and disabled activity shortcuts. Update footer coverage to verify the absence of passive hints and interactive controls at 20, 32, and 80 columns.

GitOrigin-RevId: 52ca6f4992778cd3cf3eebe163d533e69a8dabeb
2026-09-22 18:51:23 +00:00
andrewgu-oai 49e95cc73f Add GPT-6 Sol and Luna to the model catalog (#47332)
## What changed

- Add `gpt-6-sol` and `gpt-6-luna` catalog entries and refresh model descriptions.
- Offer migrations from `gpt-5.5`, `gpt-5.6-sol`, and `gpt-5.6-terra` to `gpt-6-sol`, and from `gpt-5.6-luna` to `gpt-6-luna`.
- Retarget retired `gpt-5.4` and `gpt-5.4-mini` selections to GPT-6 Sol and Luna, respectively.
- Recommend `gpt-6-luna` in the rate-limit switch prompt.

## Testing

Extend migration tests to cover the new targets, their default reasoning effort, and prompting again after a previously acknowledged migration to an older target. Update model-picker and rate-limit prompt snapshots.

GitOrigin-RevId: d3a093d18ce44a903383504ab8f5cbbc911d602d
2026-09-22 18:17:39 +00:00
Felipe Coury 0a73d55b80 Avoid redundant spacing above the transcript composer (#47331)
## Why

An empty composer hint row already separates activity from the input. Adding another separator wastes transcript space, especially in short terminals.

## What changed

Reserve the extra separator only when copy status text, a follow control, or a fitting hint occupies the shared row and the viewport has room. Recalculate the transcript layout in the same frame when adding that separator, and use a shared timestamp for copy status visibility and expiry.

## Testing

Extend snapshots for running turns with no hint, follow controls in short terminals, and copy status text at narrow widths and limited heights. Update resize assertions to check that the draft and caret remain stable relative to the terminal bottom.

GitOrigin-RevId: a73894063b759ec6b9a25f720e0e8007516109c8
2026-09-22 18:06:15 +00:00
dkovalenko-oai 3b7a8520ef Identify failed SQLite databases in codex doctor output (#47330)
## Why

The generic state integrity failure message does not identify which database needs attention.

## What changed

- Include the paths of all databases that fail integrity checks in a structured issue, shown in text summaries and JSON output, with the existing recovery guidance.
- Redact sensitive details using `: ` as the field-label separator so Windows drive letters are not mistaken for labels and unlabeled sensitive paths are fully redacted.

## Testing

Add coverage for single and multiple failed databases, summary and detailed text output, JSON output, preservation of damaged database contents, and sensitive path redaction on Unix and Windows.

GitOrigin-RevId: ac5fec9473d22b6b137a9fc8a751aba8605d940f
2026-09-22 17:59:02 +00:00
Eric Traut 00d92ad3ee Standardize TUI menu description wording and punctuation (#47329)
## What changed

Remove trailing periods from concise built-in option descriptions and disabled-option explanations, and simplify wording across TUI menus. Share the built-in permission preset descriptions between permission pickers.

Document the convention in `codex-rs/tui/styles.md`, including normal punctuation for descriptions with multiple sentences and preservation of externally supplied descriptions.

## Testing

Update menu assertions and rendering snapshots for the revised copy and line wrapping.

GitOrigin-RevId: 3231d25484178452ab001af5ddc982460d14f94a
2026-09-22 17:58:37 +00:00
Chris Dong 6cfe299849 Preserve image generation request IDs on failure (#47327)
## Why

Failed image requests discarded the `x-codex-imagegen-request-id` header, leaving failure analytics without the request ID.

## What changed

Carry the request ID through `ImageRequestError` and backend errors for image generation and editing. Preserve it on failed image generation items for HTTP errors, response decoding errors, and responses with no image data.

## Testing

Extend the app-server failure test to verify that a request ID returned with an HTTP 500 response reaches `codex_image_generation_event` analytics.

GitOrigin-RevId: 57cddacc0221e5b58877ac375d5eca0afb99d853
2026-09-22 17:37:45 +00:00
viyatb-oai 2c2a42e65d Restrict MCP OAuth authorization endpoints to HTTP(S) (#47326)
## What changed

Reject authorization endpoints with schemes other than `http` or `https` before client registration or authorization URL return. Document this constraint for `mcpServer/oauth/login`.

## Testing

Make existing asynchronous tests wait for cleanup: wait for `ThreadIdle` before injecting user input in the guardian cached-score test, and poll for queue consumption before asserting that dispatched items are gone.

GitOrigin-RevId: e5f6b4c5556234c3cc2aa56910486e892c011116
2026-09-22 17:31:02 +00:00
ningyi-oai 8a577399c7 Keep report reason tags within Sentry limits (#47325)
## Why

Sentry tags cannot contain newlines or exceed 200 characters, but report comments can contain both.

## What changed

Limit the `reason` tag to the first 200 Unicode characters and replace each carriage return or newline with a space. Preserve the full, unchanged comment in the exception body.

## Testing

Add coverage for line endings, the 200-character boundary, and multibyte Unicode comments. A mock upload test checks that the compressed Sentry envelope contains the bounded tag preview and full comment, even when caller tags attempt to override `reason`.

GitOrigin-RevId: e0f0db6a9797a817da2f868727077c948ad82bfb
2026-09-22 17:08:11 +00:00
Owen Lin 286d4ecf44 Persist resume metadata in compaction checkpoints (#47323)
## Why

Compaction companion records do not represent all resume state, including the last started turn and previous turn settings. The selected multi-agent runtime also needs a persisted value when no companion turn context is present.

## What changed

- Add optional `resume_metadata` to `CompactedItem`, recording the multi-agent version, last started turn ID, and previous turn settings. Preserve the distinction between absent metadata and explicitly empty values while retaining compatibility with older records.
- Capture this metadata under the settings persistence lock alongside the compaction checkpoint.
- Rewrite inherited metadata to use the child agent's runtime, and clear previous turn settings when the child must rebuild context.
- Clear pending continuation state before delivering acceptance of standalone settings updates, while holding the persistence lock.

## Testing

Add coverage for metadata round trips with empty values, legacy reader compatibility, checkpoint companion records, inherited fork metadata, and continuation invalidation while settings event delivery is blocked.

GitOrigin-RevId: f30b7feaa7e2fdb5b65fc3c53b37fd7a7fe27903
2026-09-22 16:35:30 +00:00
Eric Traut 5a11c45606 Render TUI Markdown lists with Unicode bullets and checkboxes (#47322)
## What changed

Render unordered bullets as `•` and task markers as `☐` or `☑`, preserving ordered numbering and continuation indentation in streaming and completed Markdown. Add `tui.rendering.lists`, enabled by default; setting it to `false` retains hyphen bullets and textual task markers.

## Testing

Add snapshot coverage for nested, ordered, quoted, and wrapped task lists, plus code and escaped markers. Add character-by-character streaming tests that compare incremental and emitted output with full rendering, with list rendering enabled and disabled.

GitOrigin-RevId: df9209d8c42f277dd2a2d7073ea19a6feb7dd706
2026-09-22 16:34:07 +00:00
Eric Traut 13a966fc65 Honor the system clock preference across more TUI timestamps (#47321)
## Why

Several TUI views hard-code 24-hour timestamps even when the detected system preference is 12-hour time.

## What changed

Use the existing `ClockFormat` preference for rate-limit and spend-control reset times, usage notices, backend banners, reset-credit expiration times, analytics timestamps, and expanded session details in the resume picker. Capture the preference when constructing views and preserve existing timezone handling, including analytics' UTC labels.

## Testing

Add coverage for midnight, noon, and next-day reset labels in both clock formats, plus 12-hour analytics rendering with UTC labels. Update snapshots for status, banners, usage notices, reset-credit details, and expanded sessions, including narrow-width layouts. Pin test fixtures to explicit clock formats for deterministic output.

GitOrigin-RevId: 73c36d603ddc4eb7800614650a14c6f2961f8b70
2026-09-22 16:23:59 +00:00
Eric Traut 2c087a0cc2 Fix Escape navigation in read-only agent sessions (#47320)
## Why

In read-only sessions with an external writer, `Esc` could enter prompt backtracking or be consumed by a scrolled transcript instead of returning to the agent command center.

## What changed

- Exclude external-writer views from prompt backtracking and let `Esc` navigate away from scrolled transcripts. Active search and selection still consume `Esc` first.
- Close the legacy transcript overlay without starting a backtrack preview or changing the retained draft.
- Allow `Esc` to open the agent command center while disconnected, showing a stale-list notice with reconnect status instead of requesting a refresh.

## Testing

Add regression coverage for normal, scrolled, detailed, and offline read-only views, command-center snapshots, and retained-draft preservation when closing the legacy transcript overlay.

GitOrigin-RevId: e2623d25dd4b4beea13b6f517932280168113dce
2026-09-22 16:16:15 +00:00
Eric Traut a3275210bd Match agent status symbols to the selected row style (#47319)
## Why

Status symbols in the agents overview retained their status color when selected, making their styling inconsistent with the rest of the selected row.

## What changed

Apply the row's selection style to its status symbol while preserving status colors for unselected rows.

## Testing

Extend rendering tests to assert and snapshot selected status symbol styles across status variants, and verify that an unselected idle symbol retains its cyan color.

GitOrigin-RevId: a5163841bed80d6d43e7c62a7596c6e48b9dc886
2026-09-22 16:15:02 +00:00
Eric Traut d6093d3228 Offer explicit recovery for incompatible background servers (#47318)
## Why

Automatic daemon launches could silently fall back to embedded mode when shared feature settings differed from the session's requirements. Changing those settings affects other clients, and restarting the server may interrupt active or queued work.

## What changed

- Offer interactive choices to run without the daemon, restart with the required settings, or cancel. Default to cancel and require explicit confirmation for restart.
- Allow restart only for managed daemons with a feature mismatch, then recheck compatibility once. Noninteractive required-daemon failures return an error with `--no-daemon` guidance; optional attachment retains its fallback behavior.
- Preserve saved feature overrides on startup and require confirmation before applying requested shared-feature disables, including on fresh starts.
- Merge confirmed settings under the lifecycle lock, persist changes after the old process stops, and avoid restarting when the saved overrides already match.

## Testing

Add recovery-menu snapshots and confirmation tests, compatibility tests for required and optional attachment, daemon ownership and settings-preservation tests, and CLI terminal tests for cancellation, embedded fallback, confirmed restart, and disabling shared features.

GitOrigin-RevId: d50a6cf7e476b9647237431e8fc0fc6041ed17db
2026-09-22 16:07:38 +00:00
Eric Traut 7e6c4c20fd Enable /import in remote and local daemon sessions (#47317)
## Why

`/import` was unavailable in remote sessions and when connected to the local app-server daemon. Shared servers also broadcast import completions from other clients, which must not clear this client's pending import or report its completion.

## What changed

- Allow external setup migration through the connected app server in both session types.
- Detect setup using the active thread's working directory, or the remote working-directory override before a thread starts. Use home-only detection when no remote directory is available.
- Track the returned `import_id` and only clear the pending import and report completion for a matching notification.
- Skip refreshing configuration from local disk after import completion in remote workspaces.

## Testing

Add shared-transport coverage in embedded and remote modes for detection with and without a working directory, retrying failed imports, rejecting overlapping imports, and matching interleaved completion notifications queued before the import response.

GitOrigin-RevId: 864ed9fe87e5c554da79907ed80a01f0c9948392
2026-09-22 16:06:30 +00:00
Charlie Marsh 44b857c00e Clean up legacy Guardian thread metadata in SQLite (#47303)
## Why

Guardian prompts are synthetic review context, but legacy thread metadata can duplicate them in titles, previews, and first messages. Keep SQLite metadata small while retaining rollout JSONL as the canonical record.

## What changed

Add a migration for Guardian threads that:

- Replaces blank or prompt-derived titles with `Guardian review`.
- Preserves nonblank names and distinct nonblank titles, using the title as the name when no name exists.
- Sets `preview` to `Approval review` and clears `first_user_message`.

## Testing

Add a migration test covering prompt-derived and blank titles, custom titles and names, and unchanged metadata for a non-Guardian worker thread.

GitOrigin-RevId: 65b5ff5200a39a19fb11f494de6dca7710ff6cc6
2026-09-22 15:05:27 +00:00
Charlie Marsh 4f6c106cdd Use compact display metadata for Guardian review threads (#47302)
## Why

Guardian review threads use synthetic approval prompts as user messages. Deriving thread titles and previews from those prompts exposes large, unhelpful summaries in thread listings.

## What changed

- Default Guardian threads to the title "Guardian review" and preview "Approval review" across metadata creation, rollout reads, and resume.
- Skip synthetic user messages and goal updates when deriving Guardian display metadata, leaving `first_user_message` unset for new threads.
- Preserve custom names, including legacy indexed names, when listing, reading, resuming, and migrating threads to paginated history.

## Testing

Add regression coverage for compact metadata, resume without session metadata, custom names before and after migration, and app-server persistence, listing, and rename/resume behavior.

GitOrigin-RevId: 42aa707db20c3e57ffa5fd4c91ee313710be10d7
2026-09-22 15:02:54 +00:00
jif 5c07856e25 Separate local agent runtime state from controller handles (#47301)
## What changed

Extract `LocalAgentRuntime` from `LocalAgentControl` to hold the shared registry, residency state, execution limiter, rollout budget, service tier, instruction provider, and thread-manager bindings. Keep session identity on the controller handle.

Store the runtime in `SessionServices` and use it to bind controllers for child startup, resume, delegation, and guardian reviews. Route ownership checks and residency handling through the shared runtime, preserving registry identity across handles. Update existing test fixtures to keep the controller and runtime paired.

GitOrigin-RevId: 846094657cbdf736da3149f0a1c96b4e01423dfe
2026-09-22 14:48:28 +00:00
jif c6c09fe29f Consolidate agent operations in the AgentControl implementation (#47292)
## What changed

Move `spawn`, `send`, and `inspect` into the `AgentControl` implementation for `LocalAgentControl`, removing the forwarding methods and the `spawn_request` module. Update tool handlers and existing tests to use the trait methods, and remove redundant boxing at spawn call sites.

Preserve spawn validation, message attribution, runtime loading, and queue-only delivery semantics.

GitOrigin-RevId: 6027d4d97d0dfb6763dc97ef92a2d7ef58de945d
2026-09-22 13:47:56 +00:00
felixxia-oai d9ac1f02ed Update the Guardian extra-policy snapshot for retained instructions (#47287)
## What changed

Update `extra_policy_reaches_guardian_review` to expect a retained user
instructions section before the transcript, including the source-order notice
and the original user request. Adjust the subsequent snapshot item numbers.

GitOrigin-RevId: 9e57f9bb7cdc9318787d083bf4350143a1353287
2026-09-22 13:17:13 +00:00
jif 89a7298aff Add regression coverage for message board unsubscribe persistence (#47281)
Verify that unsubscribing from a message board thread remains effective
after posting to that thread and resuming the session. The runtime test
checks that replies from a child agent produce no `CHANNEL_POST` notices
while unsubscribed and that explicit resubscription restores delivery.

Use gated streaming responses to keep the recipient active during each
reply and drain worker completion messages before checking notices.

GitOrigin-RevId: fe2695a46722a94e6fca86a3d3bd49c0b8bb7ee7
2026-09-22 13:02:44 +00:00
felixxia-oai 279ba89415 Enable Guardian thread context by default (#47275)
## What changed

Mark `guardianv2.thread_context` as stable and enable it by default for synchronous and asynchronous Guardian reviews. Keep it independent of the Guardian v2 `enabled` toggle and preserve explicit configuration and profile overrides. Update the configuration schema documentation to match.

## Testing

Update coverage for default configuration and sender user messages, review prompt snapshots, history retention across compaction, and checkpoint provenance. Assert that later user input invalidates an in-flight review's authorization. Keep legacy transcript budgeting coverage by explicitly disabling thread context in that test.

GitOrigin-RevId: 19afd34d7bfc0ee36bbf878089c68b732a21bc6a
2026-09-22 12:43:11 +00:00
felixxia-oai 99784bd09b Allow Guardian sync review across compaction hash differences (#47272)
## Why

Thread-owned Guardian review rejected usable parent compaction checkpoints when the reviewer's `comp_hash` differed or was unknown, even though the synchronous reviewer can consume those checkpoints.

## What changed

Remove the synchronous reviewer's compaction hash compatibility check and the associated hash plumbing. Pass usable checkpoints to the backend for payload validation, while continuing to fail closed on unusable checkpoints and review errors.

## Testing

Update compaction and resume tests to expect retained evidence with different, missing, or empty reviewer hashes, while preserving rejection of empty checkpoint content.

GitOrigin-RevId: bbc4f5a2e697f832f815dcf8bda4d4a652f06b8a
2026-09-22 12:37:11 +00:00
jif 16bb1b9d7e Implement AgentControl for LocalAgentControl (#47271)
## What changed

Add an adapter that delegates the shared controller interface to existing local agent operations, including lifecycle management, message delivery, status observation, budget accounting, and shared settings.

Align the trait signatures and documentation with local behavior: separate advisory capacity checks from execution tracking, preserve best-effort completion reporting, and return optional guardian evidence. Use `SessionId` for controller identity and replace paginated queries with loaded-agent listing by path prefix, removing the obsolete types and exports.

GitOrigin-RevId: 15bb7135e0f180d207390f6f2e75f63b9058816a
2026-09-22 12:19:05 +00:00
jif ac7634b9f7 Stream agent snapshots from local status subscriptions (#47267)
## What changed

- Return `StatusSubscription` streams of `AgentInfo` snapshots from local status subscriptions, including agent metadata and configuration.
- Emit the initial snapshot before subsequent coalesced updates. Use a weak thread reference and retain the last observed configuration so published final updates remain available after the runtime is dropped.
- Update completion notifications and `wait_agent` to consume snapshot streams, propagate subscription errors from `wait_agent`, and fall back to the latest status when a stream ends.

## Testing

Update the shutdown subscription test to verify that shutdown before the first poll preserves the initial `PendingInit` snapshot followed by `Shutdown`.

GitOrigin-RevId: beb46952cbcc9bddf65a4d6603fea939d5ace8b9
2026-09-22 11:44:00 +00:00
victor-openai a1f40f3f13 Expose hosted plugin extensions in app-server summaries (#47263)
## What changed

- Request installed-plugin metadata with `includeExtensions=true` and carry optional `extensions` through the cache into `PluginSummary`.
- Add typed declarations for global, settings, thread, and file entrypoints, quick actions, settings tools, icons, and search mention providers. Update JSON schemas and TypeScript and Python bindings.
- Accept supported snake_case aliases and emit camelCase fields. Discard incompatible extension declarations without invalidating the installed-plugin inventory.

## Testing

Add an integration test covering extension metadata preservation, field normalization, and unknown entrypoint and quick-action types across live and cached `plugin/installed` reads. Update pagination assertions to require `includeExtensions=true`.

GitOrigin-RevId: b73b0d13c151a30dc1fb9cda70b5cd6d7e3e2441
2026-09-22 11:29:58 +00:00
jif d3e5840932 Subscribe authors to message-board channels created by posting (#47259)
## Why

Posting to a new channel subscribed its author to replies on that post, but not to new discussion roots in the channel. The creator could therefore miss notifications for subsequent discussions.

## What changed

Subscribe the author to the channel in the same transaction that creates the channel and its first post. Document this behavior in the API and the `new_channel_name` tool parameter.

## Testing

Update coverage to verify that channel creators receive notifications without explicit targeting and that posting to an existing channel preserves an explicit unsubscribe. Adjust thread-deletion test expectations for the additional persisted subscription.

GitOrigin-RevId: 5553ebc9f9b51456ab48886e9871733e93370a2b
2026-09-22 11:10:53 +00:00
jif 3d5cdc51d0 Test spawn settings reporting after child removal (#47258)
## What changed

Add a V1 spawn regression test that removes the child from the thread manager during startup, before spawn reports its settings. Verify that the completed spawn event retains the role-configured model and reasoning effort, nickname, and role even when the child can no longer be looked up.

Also verify that the child receives its initial input with the effective settings and the parent receives a successful spawn result.

GitOrigin-RevId: 5e94e3ddb0feda0eaaa86e7539ef8c6720176f88
2026-09-22 11:10:29 +00:00
jif 0160eb3497 Preserve explicit message-board unsubscribes when posting (#47257)
## Why

Posting to a discussion automatically subscribed its author, undoing an explicit unsubscribe and restoring unwanted reply notifications.

## What changed

Persist explicit opt-outs so posting follows a discussion by default but leaves unsubscribed agents opted out until explicitly subscribed again. Keep active subscriptions in the existing table for compatibility with older readers, and remove opt-outs when deleting a board. Update the API and tool descriptions to explain the behavior.

## Testing

Extend the local board test to cover reopening an older database, preserving opt-outs across reopen and subsequent posts, legacy subscription queries, explicit notifications without resubscribing, explicit resubscription, and board cleanup.

GitOrigin-RevId: 8b8f7f50cea5041541b8d93067c52db18cdde85c
2026-09-22 11:07:21 +00:00
jif fdd89e78ac Return agent snapshots from close_agent (#47252)
## What changed

Return an `AgentInfo` snapshot captured before shutdown, including metadata for known unloaded agents. Use the snapshot's status and metadata in the tool's completion event and its status in `previous_status`, replacing the separate status subscription.

Preserve the pre-close status for error reporting when shutdown removes the target before a descendant fails to close. Propagate unexpected thread lookup errors before attempting shutdown.

GitOrigin-RevId: bdbd877aaf0389e830d6a7e84a5e14bb7d47277a
2026-09-22 10:58:32 +00:00
jif c117207a6f Drop descendant channel posts from retained remote compaction v2 history (#47249)
## Why

Remote compaction v2 excluded descendant progress messages from retained history but kept `CHANNEL_POST` messages from those same agents.

## What changed

Treat descendant `CHANNEL_POST` messages like `MESSAGE` progress updates when selecting history to retain after remote compaction v2.

## Testing

Extend the remote compaction test to verify that a child channel post is included in the compaction input and omitted from the follow-up request.

GitOrigin-RevId: 204bf44b8cddf1e6dc1e48234f51d4ac2aaf2e9f
2026-09-22 10:44:00 +00:00
victor-openai 3b50349e1a Add explicit app and account targets to MCP resource reads (#47248)
## What changed

Allow `mcpServer/resource/read` to specify `target: {connectorId, linkId}` for direct hosted app reads without tool discovery, when supported by the backend. Require an explicit `linkId`: a string selects an account, while `null` requests no-auth access subject to backend policy.

Restrict direct targets to `codex_apps` and reject empty connector IDs, empty link IDs, and synthetic link IDs. Preserve originating app/account scope when `originCallId` and `threadId` are supplied, and retain discovery when `target` is omitted.

Update protocol schemas and TypeScript and Python models, preserving required-but-nullable `linkId` semantics in Python code generation.

## Testing

Extend resource-read tests to check target metadata with and without a thread, including explicit no-auth targets and omitted targets. Add Python model tests for string and null `linkId` values and rejection of a missing `linkId`.

GitOrigin-RevId: 8cf5595fbdd937193aeb529901fc95299f6e18ad
2026-09-22 10:42:50 +00:00
jif c46aa58a7b Centralize agent resume handling in LocalAgentControl (#47244)
## What changed

Add `LocalAgentControl::resume_agent` to reuse an existing thread or restore it from its rollout when lookup returns `ThreadNotFound`. Return the agent's current status, metadata, and configuration snapshot.

Route the `resume_agent` tool through this method, replacing its status-based resume check and separate restoration helper.

GitOrigin-RevId: 2ae0572a030f169eca1760ba0aff1fb9e2ab6651
2026-09-22 10:27:19 +00:00
jif acc20df49f Prevent V2 agent eviction from racing with queued messages (#47240)
## Why

Accepted inter-agent messages can still be waiting in the submission queue when a worker appears idle. Evicting that worker can lose the queued work, while cancelling an eviction caller can leave shutdown unfinished and allow delivery to a closing runtime.

## What changed

- Pin V2 recipients until queued submissions are handled or dropped, and verify that delivery targets the registered runtime.
- Move `Submission` into core so it can carry the residency guard through queue handoffs.
- Give eviction exclusive access to each runtime and keep it counted against capacity until removal. Run teardown in a separate task so it completes even if its caller is cancelled, and remove registry and residency entries together.

## Testing

Add a regression test covering queued follow-up delivery, eviction refusal while mail is pending, cancelled eviction completing teardown, rejection of late delivery, and capacity reuse after removal.

GitOrigin-RevId: d6de3d68cb6b911942e9ddfc05c65b3741b796b2
2026-09-22 09:50:48 +00:00