Commit Graph
11924 Commits
Author SHA1 Message Date
Dmitriy Kovalenko 007f668c34 Respect turn filesystem permissions during executor skill discovery (#59291)
## Why

Direct executor skill discovery used unrestricted filesystem access, bypassing the turn's permission context. Cached catalogs also needed to account for changes in filesystem access within a turn.

## What changed

- Bind selected capability roots to callback-scoped filesystem access through `AccessedSelectedCapabilityRoot`.
- Pass accessors built with the turn's granted permissions into skill preparation and discovery, removing the executor skill provider's environment lookup and unrestricted accessor.
- Include filesystem access keys in the direct discovery cache so permission changes trigger rediscovery.

## Testing

Extend tests to verify that restricted discovery returns no skills when sandbox access is unavailable, restoring access restores discovery, and changing or restoring access invalidates the catalog cache.

GitOrigin-RevId: 0f7aa7646f65923f65f0cfc0b387d94bd7f2db05
2026-11-04 02:00:01 +00:00
Felipe Coury db3c44414c Add directional conversation focus shortcuts in workspace mode (#59287)
## What changed

- Add configurable `focus_pane_left` and `focus_pane_right` actions, defaulting to `leader left` / `leader h` and `leader right` / `leader l`.
- Move focus to the parent or open side conversation without reopening a hidden pane. Preserve the current interaction when no neighbor is available, and accept fresh typing after a no-op shortcut while suppressing reported key repeats.
- Expose the actions in the keymap picker and configuration schema, and prevent workspace-only pane bindings from claiming keys in classic mode.

## Testing

Add regression coverage for pane navigation, preserved transcript selection and search, fresh typing after a no-op, key capture, and binding conflicts and limits.

GitOrigin-RevId: 7f7629d15cffcd35d1353b36c5c9208dbb1034e8
2026-11-04 01:40:12 +00:00
Dmitriy Kovalenko 0a944f8ce2 Enable unified image budgeting by default (#59282)
## What changed

Mark `unified_image_budget` stable and enable it by default. Supported models now use unified image preparation with `original` detail, and `view_image` omits the `detail` parameter from its advertised schema.

## Testing

Update image input, MCP output, history replay, and tool schema expectations for the new default. Keep explicit coverage of the disabled feature and models that do not support original image detail.

GitOrigin-RevId: 2d6fc8019149fcf18b5813db2d2082ba95de2241
2026-11-04 01:24:36 +00:00
Dmitriy Kovalenko 0b21a5b526 Respect filesystem permissions when discovering repository skills (#59280)
## Why

Repository skill discovery must reflect current filesystem access, including newly approved grants and narrower permissions. Previously listed skills can remain in conversation history after a turn-scoped grant expires, so catalog updates need to tell the model when availability changes.

## What changed

- Discover repository skills through the selected executor's permission-aware filesystem accessor and refresh snapshots when the working directory or access changes. Use the current step's snapshot for skill selection and invocation.
- Preserve repository boundaries even when project markers are hidden by read restrictions, and report unsupported sandbox backends as skill-loading errors.
- Track grant-dependent catalog entries and emit availability notices when skills disappear or return, even when the metadata budget is exhausted.
- Resolve implicit skill paths through their owning filesystem and exclude remote repository skills from local implicit command attribution.

## Testing

Add coverage for turn and session grants, grant expiry and restoration, hidden and newly created repository markers, cached read denials on Windows, unsupported remote sandboxes, and executor-backed implicit skill paths.

GitOrigin-RevId: ac1af483e73e3130524aeeabe218630435054028
2026-11-04 01:15:38 +00:00
Dmitriy Kovalenko 526f6099f6 Preserve filesystem authority when loading skills (#59279)
## Why

Skill discovery and metadata loading used raw filesystem handles with unrestricted reads, and cache keys distinguished filesystems without accounting for captured permissions.

## What changed

- Pass borrowed `EnvironmentAccess` accessors through skill root resolution, discovery, canonicalization, and metadata reads.
- Include captured permissions in skill snapshot and empty remote root cache keys.
- Add fixed-path watches to `EnvironmentAccess`, falling back to live discovery when read restrictions prevent using unsandboxed executor watches.
- Keep user and plugin roots under host filesystem authority independently of the selected repository executor.

## Testing

Extend remote root cache coverage to verify that changing captured permissions triggers a fresh scan and that restricted accessors decline unsandboxed watches.

GitOrigin-RevId: 97d4bfdfcba78a93fc8845773c6397d4364494e3
2026-11-04 01:13:54 +00:00
Dmitriy Kovalenko afefd0ba95 Enforce current filesystem permissions when reading repository skills (#59278)
## Why

Cached repository skill metadata must not authorize reads after access is revoked or a skill file or directory becomes a symlink to a denied location.

## What changed

Read repository skill instructions through a current environment accessor for the filesystem that discovered them. Reject reads when no matching accessor is available, and cache filesystem identity instead of retaining unrestricted read access.

## Testing

Add regression coverage for revoked permissions, file and directory symlink replacements, and missing or mismatched filesystem accessors.

GitOrigin-RevId: 8dad83b7c7893e0d66e2fe1c0c240715db582005
2026-11-04 01:12:49 +00:00
cooper-oai f39e45e4a6 Support API workload identity authentication (#59275)
## Why

Workload identity authentication assumed every token exchange resolved to ChatGPT, preventing API service accounts from using the same flow.

## What changed

- Accept `wif_product: "api"` responses with organization, project, and service account metadata. Preserve ChatGPT compatibility when `wif_product` is omitted.
- Resolve API workload identity tokens as API key authentication and apply login restrictions to the resolved product. Read the actual login status during TUI startup instead of assuming ChatGPT.
- Preserve auth ownership across token renewal for the same API identity, and reject product or identity changes during refresh.
- Redact API keys from debug output.

## Testing

Add coverage for both exchange products, malformed metadata, assertion rotation and unauthorized recovery, identity changes, login and workspace restrictions, and CLI login status under both forced login methods.

GitOrigin-RevId: f4fc4da74b86e4a9ae47b28221d3e065500f5b6e
2026-11-04 00:52:58 +00:00
ioanbudea-OAI c141c31323 Preserve requested approval reviewers across policy overrides (#59272)
## Why

A model requirement can force `auto_review` even when the requested reviewer is `user`. Persisting or sending that effective value back as an explicit choice loses the original selection, so removing the requirement cannot restore it on resume.

## What changed

- Retain `requested_approvals_reviewer` separately from the effective reviewer in configuration and thread settings, with a fallback for older histories.
- Restore the requested reviewer on resume while applying current model requirements and reviewer allowlists.
- Let ordinary TUI turns, continuations, retries, and forks inherit the server's reviewer instead of echoing its effective value as an explicit request.
- Preserve a worker's requested reviewer when reloading it rather than inheriting the sender's selection.

## Testing

Extend resume coverage for explicit `auto_review`, removal of a model requirement, and a tightened reviewer allowlist. Update TUI assertions for omitted reviewer overrides and verify worker reload preserves its reviewer.

GitOrigin-RevId: d8c9c3a7b89e55e63f0e8ae210d6a87cb5547933
2026-11-04 00:31:24 +00:00
Hung 1685f2d621 Use measured durations to budget uploaded audio (#59268)
## Why

Uploaded audio always reserved 12,000 tokens per file, even for short clips. This could discard recordings during compaction that would fit within the retained-message budget.

## What changed

- Add optional audio duration metadata to attachments and cache measured durations per session, resolving metadata for new input and replayed history.
- Use measured durations for history estimates and compaction budgets at 10 tokens per second, rounded up and capped at 12,000 tokens. Keep the full budget for missing or unusable metadata.
- Bound metadata lookups to 250 milliseconds per batch with up to eight concurrent requests, and record accepted input before lookup so interruption preserves the batch.

## Testing

Add coverage for duration rounding and fallback estimates, mixed measured and unknown audio, retention through compaction and cold resume, and interruption during metadata lookup.

GitOrigin-RevId: 26fe320c7024944d9d4c371d5fdcda84442b5cc5
2026-11-04 00:19:12 +00:00
Dmitriy Kovalenko b34808060a Normalize loading bullets in the safety recourse snapshot test (#59263)
GitOrigin-RevId: 8c900fede2eb7eba58404e78b2d736a358c82ec8
2026-11-03 23:58:08 +00:00
taohong-oai db14d7508d Report auto-review overhead in turn critical-path analytics (#59260)
## What changed

Track Guardian compaction and review turn execution within each tool's auto-review interval, and expose `critical_path_auto_review_overhead_ms` in turn analytics. This measures the portion of `auto_review_ms` outside observed Guardian turn execution; it is a subset, not an additional duration.

Freeze review observations when the review or tool invocation ends. Report unknown overhead as `null`, including when denial reconsideration runs an unobserved follow-up turn.

## Testing

Add coverage for shared compaction and review observations, cached reviews, unfinished reviews, reused tool call IDs, and execution timing with child critical-path capture enabled or disabled. Extend analytics and app-server tests to check the new field.

GitOrigin-RevId: a63dec2a75571a3167c8c3f0c1d21e11e4a8d050
2026-11-03 23:49:01 +00:00
viyatb-oai 444359fa2d Refactor sandbox request preparation by backend (#59258)
## What changed

Build a `SandboxExecRequest` before applying backend-specific command wrapping. Extract Linux wrapping into `wrap_linux` and route Windows restricted-token requests through `prepare_legacy_windows_request`. Return unsandboxed requests before preparing native sandbox paths.

GitOrigin-RevId: afe3bcb444c222e9e0af9a556fe580eee074e34c
2026-11-03 23:37:58 +00:00
Eric Traut b59f2e27a0 Preserve prompt contrast when terminal colors are unavailable (#59257)
## Why

Submitted prompts need readable foreground and background colors when the terminal does not report its default colors.

## What changed

- Use a contrasting gray pair for truecolor and 256-color terminals when default colors are unavailable. Keep terminal defaults for 16-color terminals and unknown color support.
- Preserve voice markers, inline element accents, and asynchronous reply code colors when applying prompt styles to native history.

## Testing

Add contrast coverage for each color level and terminal rendering regressions for inline elements and asynchronous reply code colors. Update prompt snapshots to cover the fallback colors.

GitOrigin-RevId: dcda0fc3e2b12a5dc9046322a4d82c61986e3ecd
2026-11-03 23:36:55 +00:00
Eric Traut d582332d03 Add OSC 777 notifications and improve approval notification text (#59256)
## What changed

- Support `tui.notification_method = "osc777"` with a `Codex` title and tmux passthrough.
- Replace control characters in OSC notification bodies and escape semicolon delimiters for OSC 777. Limit Ghostty bodies to 255 bytes, preserving UTF-8 boundaries and adding an ellipsis when truncated.
- Remove the 30-grapheme command limit from approval notifications, strip shell wrappers, and describe terminal input and network access requests explicitly.

## Testing

Add coverage for notification method selection, OSC 777 output with and without tmux, control character handling, Ghostty truncation, and approval notification text.

GitOrigin-RevId: e15fa7fdb007c38a148217f6aa0bbcc5e7371f9e
2026-11-03 23:36:34 +00:00
cooper-oai 8f32b72151 Bind reusable backend clients to runtime authentication (#59255)
## Why

Reusable clients need fresh authentication for each request while preserving the credential source and transport policy selected when the client was created.

## What changed

- Add runtime-aware backend client construction and per-request authentication. Allow token refresh within the original credential source, reject credential replacement, and validate destination and account/organization selectors.
- Let runtime authentication finish persisting rotated tokens when the requesting task is cancelled.
- Apply asynchronous authentication to file creation and finalization requests, generating fresh assertions while keeping credentials off blob uploads.
- Preserve direct sandbox routing without enabling legacy custom-CA fallback for protected clients that reject redirects.
- Exclude login account metadata from model cache identities when provider bearer credentials override the login, and record authentication selection outcomes and duration.

## Testing

Add regression coverage for credential refresh and replacement, organization selection, destination restrictions, transport policy preservation, cancellation during token rotation, credential stripping on redirects, and file upload authentication in both runtime authentication modes.

GitOrigin-RevId: d045595e869dfcdfd9f705a6228cf0eb4c2d2c12
2026-11-03 23:35:00 +00:00
Anton Panasenko 1176913a6f Add stdin bearer authentication for exec-server registration (#59254)
## Why

Allow remote exec-server registration to use credentials independently of Codex login while retaining the usual local configuration and plugins.

## What changed

- Add `--registration-bearer-stdin` to read one newline-terminated bearer and use it for remote registration.
- Validate the bearer, require HTTPS or HTTP loopback for the registry, and disable process dumpability on Linux before reading the credential.
- Document the option and its distinction from rotating credentials via `--executor-credential-stdin`.

## Testing

Add integration coverage for registration with the supplied bearer across desktop sign-in states, rejection of non-loopback HTTP registries, and restricted process environment access on Linux. Update CLI help snapshots.

GitOrigin-RevId: da99492270c5dc6bb5e0cac41947e9c999a72b75
2026-11-03 23:22:28 +00:00
Eric Traut f2e0bf2d62 Clarify TUI reconnect status for HTTP 429 stream errors (#59253)
## What changed

For live, retryable `ResponseStreamDisconnected` errors with HTTP status `429`, replace `Reconnecting... <attempt>` with `Server is busy, reconnecting <attempt>` in the TUI status header.

## Testing

Update the stream recovery test to assert `Server is busy, reconnecting 2/5` and verify that the previous status is restored when streaming resumes.

GitOrigin-RevId: 7fb97f61b856a830565b86ec1bac2ef8608875b8
2026-11-03 23:22:03 +00:00
taohong-oai 79dcb11c90 Track automatic review overhead in critical-path durations (#59251)
## What changed

Add `ReviewExecution` observers and an optional `auto_review_overhead` subcomponent to `PathDurations`. Compute overhead by subtracting the union of observed child execution intervals from automatic review time, clipping intervals to the selected path segments and requested window.

Track concurrent and retried submissions, preserve unknown attribution for incomplete or unobserved execution, and allow observations to be sealed against late callbacks.

## Testing

Add unit coverage for overlapping execution, window clipping, human waits, cached reviews, losing parallel paths, canceled submissions, and sealed observations.

GitOrigin-RevId: 73ebe5ed9100a6598f28099ba46cc6d76578d8d9
2026-11-03 23:01:57 +00:00
iceweasel-oai 61506432d6 Expand Windows deny-read globs without invoking ripgrep (#59250)
## What changed

Use the `ignore` crate to snapshot matching files and directories in-process, replacing the external `rg` scan and fallback walker. Remove scanner discovery from MXC sandbox dependency checks.

Keep case-insensitive matching and configured scan depth limits. Skip directory links below the scan root while following explicitly linked roots, and continue past missing or inaccessible entries.

## Testing

Update resolver tests to cover child directory links, linked scan roots, dangling links, and literal brackets in glob patterns.

GitOrigin-RevId: e7f02d4db1fd42958adc212bb54055710fa2e536
2026-11-03 23:00:54 +00:00
taohong-oai d5830f6fc6 Expand per-turn critical path capture and split inference timing (#59245)
## What changed

- Report sampling and compaction separately as `critical_path_sampling_ms` and `critical_path_compaction_ms`, retaining `critical_path_inference_ms` as their combined compatibility total.
- Enable critical path capture for subagent and Guardian turns when `CriticalPathTiming` is enabled, while continuing to exclude memory consolidation sessions.
- Preserve capture across incoming agent messages and support direct `spawn_agent` and `wait_agent` calls. Attribute these calls to the parent's tool time and keep child work on the child's own turn.

## Testing

Add runtime coverage for independent parent/child timing, incoming agent messages, Guardian turns, feature gating, and memory consolidation exclusion. Update phase accounting and analytics tests to cover the new fields and millisecond truncation.

GitOrigin-RevId: 09d4c0b853e817216bed173e4404d0d782de97ec
2026-11-03 22:29:33 +00:00
iceweasel-oai 3abe09d017 Mark deny-path parent directories created by the Windows MXC launcher (#59240)
## What changed

Create an empty `.chatgptcreated` sentinel in each missing deny-path parent directory created by the Windows MXC launcher. Leave existing directories and sentinel contents untouched, including when another process creates a directory first.

Reject deny-path parents that use the reserved `.chatgptcreated` name, accounting for case and trailing dots or spaces, before creating directories. If sentinel creation fails, attempt to remove the newly created directory so preparation can be retried.

## Testing

Extend Windows policy tests to cover sentinel creation, preservation of existing directories and sentinel contents, and rejection of reserved directory names before any parents are created.

GitOrigin-RevId: 640a1f3e05c118cca357643745e0d3b437354ffb
2026-11-03 21:59:05 +00:00
Alex Kira a47a518928 Honor Guardian's additional-context setting for tool outputs (#59239)
## What changed

Tag untrusted additional context rendered as tool outputs with history metadata and apply `guardian_include_additional_context` when building Guardian review history. Preserve this metadata across session resume and apply the current session's setting to restored review checkpoints.

Keep ordinary tool outputs in review history and preserve the acting model's additional-context payload.

## Testing

Add coverage for inclusion and exclusion after restart, restored checkpoints after compaction, and asynchronous Guardian review. Verify both line and JSON transcripts and check that metadata does not alter the acting model's request.

GitOrigin-RevId: 8ba270a6aac16398c88db3282e9d666702f462fe
2026-11-03 21:54:52 +00:00
Alex Kira 6f53fbfb5b Register the Guardian additional-context feature flag (#59238)
## What changed

Add `guardian_include_additional_context` as a stable feature enabled by default, with a corresponding `GuardianIncludeAdditionalContext` enum variant. Document its purpose as including standalone additional-context tool outputs in Guardian review history, and expose the boolean flag in the configuration schema.

GitOrigin-RevId: 505132e5916bd7b3f1d6d80c2219051912ad8271
2026-11-03 21:53:57 +00:00
Hung 3780a5f750 Budget retained file audio during remote compaction (#59237)
## Why

Remote compaction did not charge retained file audio against its token budget, allowing audio-heavy history to exceed the intended limit.

## What changed

- Charge file audio using `FILE_AUDIO_TOKENS_ESTIMATE`, independently of image budgeting.
- Retain the newest media content that fits, keeping images and audio together with their adjacent labels and preserving content annotations. Stop at oversized media instead of backfilling older content.
- Share media-label detection with user-input event mapping.
- Add download timeouts and a Debian mirror fallback for the musl build's `libcap` source archive.

## Testing

Add unit coverage for audio budgeting in both image-budget modes, atomic media labels, and truncation boundaries. Add integration coverage showing that compaction retains the newest five of seven file-audio items within the retained-message budget, including a mixed-media case.

GitOrigin-RevId: 4b7cd69f53966461fdeec14096712671d480187b
2026-11-03 21:53:26 +00:00
Hung f1b0721c88 Enable uploaded audio with durable rejection recovery (#59234)
## Why

Uploaded audio was rejected even for audio-capable models. Invalid or expired recordings also need to be excluded from later requests so users can continue the conversation.

## What changed

- Accept uploaded audio when the selected model supports audio; otherwise, preserve valid sibling input and report the unsupported attachment before inference.
- Track successful audio decoding by model and provider, and attribute provider rejections against the exact submitted request. Preserve attachments when attribution is ambiguous.
- Persist confirmed rejected file IDs across compaction and resume, omitting them from future requests without rewriting retained user history.
- Check audio availability before remote compaction and retry once without an unambiguously rejected recording. Include guidance to remove or replace affected attachments in audio errors.

## Testing

Add unit and scenario coverage for uploaded audio across follow-up turns, compaction, cold and paginated resume, model switching, ambiguous rejections, expired files, and queued or interrupted input.

GitOrigin-RevId: e701901e7b1c0865c9f2a5918197215f549b06c0
2026-11-03 21:24:16 +00:00
viyatb-oai 5667598c8d Use resolved filesystem permissions in Windows sandbox policies (#59233)
## What changed

Use `resolve_for_enforcement` when preparing Windows restricted-token and elevated sandbox overrides, preserving read-only carveouts at volume roots. Expand deny-read ACL targets from the resolved permissions.

Use the same resolution in MXC policy preparation when volume roots do not require materialization, while retaining special handling for symbolic root denies.

## Testing

Add regression coverage for read-only carveouts in a volume-root workspace. Extend the Windows package smoke test to verify that a helper-created log matching a deny glob cannot be read while a neighboring allowed file remains readable.

GitOrigin-RevId: cee0834444464b3a7b0c8dbeecb8abcd5828b4b0
2026-11-03 21:23:50 +00:00
Dmitriy Kovalenko 8da8b0c7f7 Fix test fixtures for Bazel sandboxes and Windows voice runtimes (#59231)
## What changed

- Resolve Linux sandbox test binaries with `cargo_bin` and canonicalize the helper path used by the managed proxy filesystem policy so Bubblewrap can re-execute it.
- Restrict the rollout ownership test to supplementary groups mapped in the Linux user namespace, skipping when no alternate group is available.
- Exclude `gstcoreelements.dll` from the Windows startup-only voice fixture so handshakes succeed while runtime initialization still fails for missing plugins.

GitOrigin-RevId: 618376705c49d6ee3eea09f0d089b2eff4623fd2
2026-11-03 21:22:21 +00:00
yuning-oai 0ed9d6fa4b Handle budget_reached as a terminal session budget error (#59228)
## What changed

Map provider `budget_reached` errors to `SessionBudgetExceeded` for HTTP 400 responses and streaming failures. End SSE streams immediately on this error, ignoring retry headers and later completion events, and display `budget reached` in the TUI.

## Testing

Add coverage for HTTP error classification, immediate SSE termination without retries, WebSocket error delivery and subsequent request recovery, and TUI error rendering and task-state cleanup.

GitOrigin-RevId: 6a62d699cdb9cb446214cacfacd0c9ed68bf21a6
2026-11-03 21:02:34 +00:00
felixxia-oai 86cfa90536 Revalidate Guardian denials when parent authorization changes (#59225)
## Why

Parent input can change authorization while a Guardian assessment is in flight. A denial based on stale context must be retried, just as an approval is, so newly granted authorization can take effect.

## What changed

Revalidate both verdicts before publishing reviewer checkpoints or recording failed-review records. Discard invalidated assessments so they do not persist in reviewer history or count toward the denial limit.

## Testing

Extend authorization-refresh regression coverage for approval arriving during a denial and repeated stale denials. Verify refreshed reviews omit invalidated assessments and stale denials produce neither denial-limit errors nor failed-review records.

GitOrigin-RevId: c699178bc3b5e2d8b075279b00967a4e09fc533c
2026-11-03 21:00:31 +00:00
Dylan Hurd 1f8bf31b8f Use the public managed-features constructor in the guardian config test (#59217)
Update the reviewer configuration test to call
`ManagedFeatures::from_configured_with_warnings` and pass
`parent_config.startup_warnings`, avoiding the crate-private
`from_configured` constructor.

GitOrigin-RevId: 2ba41ba6918e1007b3af013b7146940d919e4560
2026-11-03 19:58:14 +00:00
Felipe Coury 6b2a2757de Add shortcuts to focus the main composer and side conversation (#59208)
## What changed

- Add configurable `focus_main_composer` and `focus_sidebar_content` actions, with default `leader c` and `leader s` bindings in workspace mode.
- Let users return to the main composer while keeping the side pane open, or focus the side conversation and hide it when already focused.
- Clear transcript search, selection, and activity focus when returning to the main composer, including when hiding the side pane.

## Testing

Extend tests for focus switching, blocked thread switches, offline composer focus, key capture, and binding conflicts.

GitOrigin-RevId: da624ce7e00a63c4f13870e55c4bc95f09b32cc4
2026-11-03 18:55:44 +00:00
Benjamin Carlsson 781d89b91e Add cloud client message submission and turn interruption (#59201)
## What changed

Expose `add_user_message` for plain-text input using the existing thread configuration, with explicit `StartIfIdle`, `Steer`, and `Queue` modes and typed admission outcomes. Expose `interrupt_turn` to interrupt a specific turn without removing queued input.

Distinguish local validation failures from unknown remote outcomes, require successful final gRPC status, and avoid automatic retries. Preserve client message identity and raw admission payloads; report duplicate admissions by original turn ID without implying current lifecycle status.

Document reconciliation requirements and extend the attach example to submit an optional message while draining events.

## Testing

Add wire-fixture tests for admission variants, request encoding, malformed responses, local validation, redacted diagnostics, uncertain RPC outcomes, final gRPC status requirements, and dropping pending submissions without retrying or interrupting.

GitOrigin-RevId: 1def92de3fc5ca8c1f89431b7ea29b9b80d64600
2026-11-03 18:11:16 +00:00
jamy-OAI ac558e2a32 Resolve saved Daybreak preferences against advertised model programs (#59192)
## What changed

Add `SavedDaybreakChoice` and `ModelAccessPrograms::select_saved` to resolve an optional saved preference. Enabled selects an advertised Daybreak program, disabled selects an advertised standard program, and unset or unsupported choices return `None`.

## Testing

Extend selection tests to cover enabled, disabled, and unset preferences across advertised program combinations, preserving the preference for Daybreak Blue over Red.

GitOrigin-RevId: 1c7ab3fe1d3a48ad64519bfedfe27de90838516c
2026-11-03 16:33:17 +00:00
cooper-oai 079e17a422 Wire shared runtime authentication through threads and API clients (#59177)
## What changed

- Share a lazily registered runtime across threads, model discovery, and extension clients when `runtime_agent_instances` is enabled, while honoring each thread's authentication mode and credential owner.
- Bind model catalogs to the effective provider and authentication context while preserving cache policy and live API-key discovery settings.
- Resolve credentials, routing, and transport policy together for each request. Preserve proxy and TLS settings, validate runtime account selectors, and prevent pooled connections from crossing runtime identities.
- Accept supported ChatGPT subdomains when selecting the registration environment.

## Testing

Add integration coverage for shared runtime registration, dual-header and assertion-only modes, disabled and third-party providers, credential replacement, subagents, and delegated review. Add coverage for catalog cache policy and runtime-aware connection reuse.

GitOrigin-RevId: 99dd9d987c29c93597a648f6586f98ac6a932c3c
2026-11-03 15:02:57 +00:00
jif f7167ac895 Move agent message board cleanup into the app server (#59167)
## What changed

Move permanent agent message board deletion from `codex-core` into the app server's thread-store cleanup callback. Keep board cleanup active when the board feature is disabled, and run it before optional Guardian evidence-board cleanup.

Remove the message board extension dependency from `codex-core` and retain `codex-message-board` only as a development dependency. Update the core test harness to install the app server's cleanup callback.

GitOrigin-RevId: 61813bbdcd8b57073b8c249e1f771e3fb0ea061e
2026-11-03 14:15:56 +00:00
jif bfdbf01bfa Move agent message board host integration to app-server (#59162)
## What changed

Move the board host adapter and `install_agent_message_board` from `codex-core` to `codex-app-server`, using public core runtime interfaces. Update extension registration, test callers, dependencies, and installation documentation to use the new location.

Format `CHANNEL_POST` notification payloads in the host adapter and retain recognition of legacy board notices in core. Expose `MULTI_AGENT_V2_NAMESPACE_DESCRIPTION` for host extensions to share with native tools.

GitOrigin-RevId: 679b5751de102bff80e6b9d4b0728a84fbdedd85
2026-11-03 13:38:59 +00:00
jif c0d2a6fac4 Clarify token-count and screen-ownership arguments in tests (#59161)
GitOrigin-RevId: 90687303b7a36d1da9b5233b3fe24fbf02abc7ce
2026-11-03 13:38:35 +00:00
felixxia-oai 6163584549 Move Guardian unit tests into their owning crates (#59159)
## What changed

- Move approval-request and prompt-composition tests from `core` to `guardian-reviewer`.
- Move transcript collection, budgeting, and approval-reason truncation tests to `guardian-context`, removing the test-only rendering helper from `core`.
- Move the managed-feature reviewer configuration test to `guardian-v2`.

GitOrigin-RevId: 1886a10cd6aba07b7ca2bcce28d45e0a698111a6
2026-11-03 13:32:14 +00:00
jif 4a971492e7 Expose thread APIs for message board access (#59154)
## What changed

- Add `CodexThread` methods for reading the registration source, resolving agent references, and reading the configured clock.
- Replace the board-specific thread lookup with public `ThreadManager::get_thread_with_extension`, which requires matching typed extension data and never loads a missing runtime.
- Update the local message board host to use these APIs and thread startup metadata instead of accessing session internals directly.

GitOrigin-RevId: 143b798cc710e079e20be59a84d05738a3bc6a0b
2026-11-03 13:17:38 +00:00
jif f05aa41da6 Route message-board notifications through agent mailboxes (#59139)
## Why

Board notifications were skipped when recipients had no active turn accepting mailbox delivery. Queue them through the ordinary agent-message path so idle recipients can receive them in a later turn.

## What changed

- Submit board notices as `Op::InterAgentCommunication` with `trigger_turn` disabled, preserving normal mailbox scheduling without reopening finalized answers.
- Hold a residency guard through dispatch of submitted agent messages to coordinate delivery with agent eviction.
- Update board tool descriptions to describe the host's notification queueing and wake policy.

## Testing

Update local and HTTP board scenarios to cover queued idle notices, delivery after a finalized answer, and mailbox delivery before a pending tool call. Extend residency coverage to verify that submission waits for the eviction gate and queued messages survive eviction.

GitOrigin-RevId: a77137fc40932f5903852e14742483844e07c9bc
2026-11-03 12:33:26 +00:00
felixxia-oai 3b5483307d Parse Guardian review responses once (#59136)
## What changed

Introduce `GuardianReviewResponse` to retain both the parsed assessment and the original response text. Reuse the stored result for authorization checks, denial reconsideration, review record capture, and final assessment extraction instead of reparsing the response.

Preserve raw text for review records and keep invalid responses as completed turns so history and session reuse remain unchanged.

## Testing

Extend review record coverage to wrapped denials and invalid responses, and verify that invalid assessments remain retryable while missing assessments do not.

GitOrigin-RevId: 50c19e788a8d57f951c6140d66306b3538515adc
2026-11-03 12:20:21 +00:00
Oystein Eftevaag 9630fcfc13 Clarify test failures and annotate a backend registration invariant (#59131)
## What changed

- Replace `unwrap()` calls with descriptive `expect()` messages in rollout budget and web search scenario tests.
- Add a targeted `clippy::expect_used` exemption in `BackendSessions::set_preference_key`, documenting that preference keys are assigned only after backend registration.

GitOrigin-RevId: 5ff63e9abb4ea728371874ed121043e9e00438a0
2026-11-03 12:08:52 +00:00
Felipe Coury eb15d3a0f5 Add a shortcut to hide the focused side conversation pane (#59130)
## What changed

Add `tui.keymap.global.hide_pane`, defaulting to `leader -` in workspace mode. Hiding a focused side conversation returns to its parent while retaining the conversation, drafts, and view state for reopening.

Expose the action in the workspace keymap picker, validate binding conflicts, and suppress held shortcut keys after switching focus.

## Testing

Add coverage for hiding and reopening at split-pane and narrow widths, preserving conversation state, shortcut availability, key capture, and repeat/release handling.

GitOrigin-RevId: 6897c34b208041e6f90ae0e18c781eebd62566bd
2026-11-03 12:08:29 +00:00
jif fc39cfcacd Add context to Guardian test setup failures (#59125)
Replace `unwrap()` with descriptive `expect()` messages when enabling denial reconsideration and setting the read-only permission profile in Guardian tests.

GitOrigin-RevId: 9e5e32ac94889e063d5a721fa6fde8e5c871747d
2026-11-03 11:43:00 +00:00
jif d39349009a Remove a redundant permission profile clone in exec policy tests (#59124)
GitOrigin-RevId: 1297ea399335f6b6703e06f8509b2c5cc9d2c46d
2026-11-03 11:40:16 +00:00
jif 86b2eca691 Allow dangerous-command review when sandbox approvals are disabled (#59120)
## Why

Setting granular `sandbox_approval` to `false` also blocked approval requests for dangerous commands such as `rm -f`, even when they requested no additional permissions. Reviewing a dangerous command should remain possible within the existing permission profile.

## What changed

Allow heuristic dangerous-command approval requests with `sandbox_approval = false` when execution stays within current permissions. Do not propose reusable execution-policy amendments for these approvals, since reusable allow rules can bypass the sandbox on later calls.

Keep escalation requests, explicit policy rules, and Windows execution without required sandbox protection subject to their existing approval restrictions. Clarify the meaning of `sandbox_approval` in the protocol and generated schemas.

## Testing

Add coverage for POSIX and Windows approval decisions, approval and denial of deletion commands, preservation of read-only restrictions, and separate dangerous-command approval after turn-scoped or session-scoped write grants.

GitOrigin-RevId: 90adc137c7b7d3f3ee68efb1f6bea531229e7834
2026-11-03 11:14:59 +00:00
jif cb2b5857c2 Preserve Guardian denials when reconsideration times out (#59118)
## Why

A timeout during denial reconsideration replaced an already completed Guardian denial with a timeout outcome, losing the original assessment.

## What changed

Keep the original denial when reconsideration times out, including its risk level, user authorization, and rationale. Discard the review session while preserving cancellation behavior.

## Testing

Add a reconsideration timeout scenario that verifies the original assessment and denial rationale are preserved and the requested file write remains blocked.

GitOrigin-RevId: 448a6d2d1e779c58076091384fe1215b8c02bde2
2026-11-03 10:54:25 +00:00
jif 62d650d527 Preserve worker permissions across sibling-triggered reloads (#59115)
## Why

Waking an evicted worker from a sibling should preserve the worker's effective permissions, including runtime grants, denials, and network restrictions that a profile name alone cannot reconstruct.

## What changed

Retain the worker's effective configuration during eviction. On sender-driven reloads, restore its permissions and approvals reviewer while keeping the current wake configuration for other settings.

## Testing

Add regression coverage comparing loaded and reloaded workers with read-only, named, and legacy permission settings. Verify that worker permissions, active profiles, and network policies survive sibling wakeups and that parent and sender permissions remain unchanged.

GitOrigin-RevId: ffc353154535362cfbfbbe2b7fc43e08b42cf9b9
2026-11-03 10:44:27 +00:00
dpatel-oai 33ffb6f905 Normalize saved chat settings after model catalog refreshes (#59111)
## Why

Existing chats can retain reasoning effort and service tier selections that a refreshed provider catalog no longer supports.

## What changed

- Apply fresh provider catalogs to saved settings in open and resumed chats, and normalize incoming settings before capturing the next turn.
- Replace unsupported ranked reasoning efforts with the highest supported level at or below the selection. For unsupported `ultra` or `persistent` selections, use the model's supported default when available. Reset unsupported `priority` and `ultrafast` service tiers to `default`.
- Retire incompatible reasoning effort pins using each step's captured model metadata, preserving running steps and the live pin during compaction.
- Publish catalog updates only from successful provider responses for the current identity, and refresh retained originator catalogs through the periodic refresh worker.

## Testing

Add coverage for setting correction, reasoning effort pins, resumed chats, stale queued settings, retained history, refresh failures, identity changes, and isolated originator notifications.

GitOrigin-RevId: 2ef4605c4acba98db3fe9d0328e2752084e900a2
2026-11-03 10:01:36 +00:00
jif a805143486 Add opt-in reconsideration of Guardian denials (#59107)
## What changed

Add the disabled-by-default `guardian_denial_reconsideration` feature to reconsider a synchronous Guardian denial once before publishing the final decision. The follow-up uses the same review session, evidence, model settings, and original deadline, without compacting the retained context.

Only a valid second assessment replaces the denial. Invalid or failed follow-ups keep the original denial and discard the review session; cancellation and timeout retain their normal outcomes.

Allow a custom developer message through `auto_review.experimental_denial_reconsideration_prompt`, limited to 1,000 UTF-8 bytes. Omitted or blank values use the built-in prompt, which grants no new authorization and preserves the security policy.

## Testing

Add scenario coverage for feature gating, unchanged approvals, reconsidered approvals and denials, invalid assessments, failed follow-ups, custom prompts, and retained context. Extend cancellation coverage to reconsideration and config tests to prompt normalization and byte-limit validation.

GitOrigin-RevId: 61c45d5a948e3e5684c4b4048d6e90fd3f1f2476
2026-11-03 09:51:25 +00:00