Commit Graph
13108 Commits
Author SHA1 Message Date
Eric Traut ba057e4375 Drain queued side-conversation events before switching focus (#59458)
## Why

Pressing `Ctrl-/` immediately after `/btw` must not switch focus before the queued side-conversation prompt is dispatched.

## What changed

Wait for queued app events to drain before reading terminal input when the displayed thread belongs to a parent/side conversation pair, even when side retention is disabled. This keeps queued prompts and transcript updates ahead of focus changes.

## Testing

Extend the side-conversation startup test to toggle focus at the earliest allowed opportunity and verify that the turn starts on the side thread. Also check that a queued request to reopen the side conversation blocks terminal input until handled.

GitOrigin-RevId: cb46636d35de97b02994ed68a32eb971cd7bf6db
2026-11-04 17:23:44 +00:00
Will Emmanuel 031829da6a Carry per-input extension data to user message completion callbacks (#59455)
## What changed

Add `user_input_extension_data` to `TurnInputRequest` and carry it with each queued user input through completion, including inputs that steer an active turn. Expose the data to lifecycle contributors through `on_item_completed_with_metadata`, whose default implementation forwards to `on_item_completed` for compatibility. Keep this data out of model input and preserve the existing serialized input shape when no extension data is present.

## Testing

Add serialization round-trip coverage and extend the concurrent submission test to verify that inputs sharing a client ID retain their own metadata, report completion in the accepting turn, and omit extension data from model requests.

GitOrigin-RevId: f880cf812994a030cb1be9418280ba69e2885808
2026-11-04 17:13:00 +00:00
jif ede589336e Prefer Launchpad for Linux zlib downloads in rules_rs (#59448)
## What changed

Update the `rules_rs` patch to try Launchpad first for the Linux `aarch64`
and `x86_64` zlib packages, retaining the dated Ubuntu snapshot URLs as
fallbacks. Keep the pinned package versions and SHA-256 hashes unchanged.

GitOrigin-RevId: 2582fb2db50eb8fd652ffd02b11e226d106561d4
2026-11-04 16:48:44 +00:00
Eric Traut 65c83ea5a2 Restore the daemon auto-start feature flag (#59447)
## What changed

Honor `features.daemon_auto_start` as a stable, default-enabled setting instead of ignoring it with a deprecation warning. Apply it to interactive daemon auto-start and remote-control daemon eligibility, and accept it in managed feature requirements.

Preserve explicit `false` values when saving the setting, even when the server reports a disabled default. Record the setting and disabled auto-start outcomes in launch telemetry.

## Testing

Update coverage for restarting a discovered daemon with auto-start disabled and for persisting an explicit opt-out when the server default is disabled. Adjust embedded-backend tests to disable auto-start through configuration.

GitOrigin-RevId: cbf079e3e27b4a7e6e802bf8f19dae653dd7472c
2026-11-04 16:46:21 +00:00
Eric Traut 49f2fc2c1e Warn when project instructions exceed the configured byte budget (#59445)
## Why

Project instructions could be truncated or skipped when the byte budget ran out without a user-facing warning.

## What changed

- Report truncated files and skipped files or environments, with guidance to trim instructions or increase `project_doc_max_bytes`.
- Warn when combined instructions exceed the configured budget, clarifying that global and thread instructions contribute to the total but the limit applies only to project files.
- Refresh cached project instructions when `project_doc_max_bytes` changes.

## Testing

Add warning snapshots for truncated files, skipped files and environments, and combined instructions exceeding the budget.

GitOrigin-RevId: 121eebb8ac8891decada2d028c194aa687815466
2026-11-04 16:34:49 +00:00
ioanbudea-OAI 4d62359072 Add opt-in elastic budgeting for synchronous Guardian reviews (#59444)
## What changed

- Add `features.guardianv2.sync_elastic_budgeting` and `sync_elastic_sections` to configure section minimums, per-entry token caps, and optional section maximums. Require and validate section limits when enabled.
- Use the selected budgeting policy consistently for history capture, resume, prompt preparation, and review input budgeting. Keep fixed budgeting as the default.

## Testing

Add configuration validation tests, capture-and-resume coverage for both budgeting modes, and a request-history snapshot verifying retained instructions and transcript section limits.

GitOrigin-RevId: c7b0bdfd3e0e008d75c4d8a204959bcc58eb1bf8
2026-11-04 16:33:22 +00:00
jif 48524f337a Preserve pending agent messages across compaction (#59404)
## Why

Agent messages that arrive after a model request starts must survive compaction until a normal inference request includes them. Compactor output alone does not establish that those messages were delivered.

## What changed

- Persist history sequences and sampling checkpoints in harness metadata, capturing the input prefix for each normal inference request.
- Retain pending agent messages within existing size budgets during local and remote compaction, placing the summary before pending messages and subsequent caller input.
- Preserve sampling progress across history replacement and resume, and drain queued mail after interrupted sampling even when compaction leaves context above the token limit.

## Testing

Add regression coverage for request-boundary sampling checkpoints, pending messages across local compaction and repeated remote compaction with resume, and injected messages that interrupt sampling before mid-turn compaction.

GitOrigin-RevId: 26c04ab96b5a1c3cc1d6625ccc74a0f00201d14c
2026-11-04 13:03:01 +00:00
jif 389d99fa4d Fix missing item ID generators in retained instruction tests (#59403)
Pass `uuid_v7_item_id_generator_for_test()` to the two remaining
`record_user_message` calls in the transcript source-proof and budgeting test
to match the required API signature.

GitOrigin-RevId: d9ea7da605de895e009a67a3ab378111599b5bbd
2026-11-04 13:02:36 +00:00
ioanbudea-OAI fc79b7f53a Honor section limits in elastic Guardian context budgeting (#59401)
## Why

Elastic allocation could shrink section minimums under budget pressure and bypass section maxima when the complete request fit. Instruction deduplication also needs to account for which transcript entries actually survive allocation.

## What changed

- Fund demand-capped section minimums before scaling headroom up to section maxima. Reject requests whose minimum reservations cannot fit after duplicate credit.
- Prioritize required records over optional records within each section, reconsider selections when redistributing packing gaps, and reserve global space for protected content and framing.
- Deduplicate retained instructions only against complete selected transcript sources, keep that proof selected during refills, and reuse the released budget.
- Retain elastic transcript history by byte limits instead of fixed item counts. On non-user byte overflow, evict whole older entries toward half the byte allowance.

## Testing

Add regression coverage for section minimums and maxima, priority selection, shared framing, duplicate-proof refills, and elastic history retention and replay.

GitOrigin-RevId: d73b40b88ba1bdab97a619014577f4a297171413
2026-11-04 13:00:58 +00:00
Dmitriy Kovalenko 021fccb046 Stabilize cross-platform tests and directory-change fork permissions (#59369)
## Why

Tests need to distinguish slow subprocess startup from operation timeouts and wait for asynchronous work before asserting results or cleaning up fixtures.

## What changed

- Synchronize subprocess readiness, queued-turn completion, and matching UI events; allow more time for cold startup and separate startup from shutdown deadlines.
- Adapt Windows fixtures and permission expectations, provide the voice-host test runtime DLL path, and normalize platform paths and animated status snapshots.
- Use current configuration permissions when changing directories in embedded TUI sessions, while retaining saved permissions for remote sessions.
- Allow the release prompt-prefix comparison to accept the exact image-tool description update that removes image detail options, and refresh the corresponding tool snapshot.

## Testing

Extend inherited-session metadata coverage to both legacy and paginated thread history, including persisted history mode and revision-aware resume.

GitOrigin-RevId: 0afb38403fc0adb0d83175344749584f0cdf9979
2026-11-04 09:51:28 +00:00
Ruslan Nigmatullin 71a4c07036 Share context window ID allocation through the agent runtime (#59354)
## What changed

Store a shared `ContextWindowIdGenerator` in `LocalAgentRuntime` and pass it into each session. Use it for both initial context window IDs and subsequent window advances, retaining UUID v7 allocation by default.

Make `AutoCompactWindow` accept caller-provided IDs instead of allocating them directly.

## Testing

Update the window boundary test to verify that advancing installs the supplied ID while preserving the first and previous window IDs.

GitOrigin-RevId: a9da4232fe6ab9a53b75e239cb412ceae0fe3216
2026-11-04 08:13:41 +00:00
Benjamin Carlsson 010520de76 Add managed thread prewarming to the cloud client (#59351)
## What changed

Add `Client::prewarm_default_thread` to prepare an ordinary coding thread in the default managed cloud environment, with optional model and provider selection. Return the thread identity and resolved settings as `ThreadActivation` without a separate activation RPC, preserving unknown thread protobuf fields.

Send prewarm requests once without automatic retries or cleanup, and document that a failed response can leave a prepared thread whose identity the caller did not receive.

## Testing

Add coverage for default and explicit model/provider requests, resolved settings and native thread metadata preservation, and rejection of responses missing sandbox policy.

GitOrigin-RevId: 425ee5ee6bb30ec77ebdd0079955701a7f9704e4
2026-11-04 08:01:23 +00:00
Benjamin Carlsson 3e743d1578 Add cloud thread activation with resolved settings (#59343)
## What changed

Add `Client::activate` to load a cloud thread through `UpdateConfig`, sending only the thread ID and `exclude_turns=true`. Return serializable resolved settings, thread metadata, and history cursors while leaving turns for separate pagination. Preserve the original thread protobuf, including unknown fields.

Validate required fields and thread identity, reject unsupported security policies, and redact sensitive activation data in debug output. Treat activation as a mutation that is never retried, with uncertain outcomes reported through `MutationError::OutcomeUnknown`.

## Testing

Add coverage for activation request encoding, settings and metadata preservation, serialization, compatibility defaults, unsupported policies, debug redaction, invalid input rejection, and explicit successful gRPC trailers.

GitOrigin-RevId: cd925b7a05f518d782e5b4cf188556567dad9e21
2026-11-04 07:26:51 +00:00
Benjamin Carlsson 93b4e5b4c6 Stop TUI voice calls when the OS session locks (#59330)
## What changed

- Monitor session lock state on Linux, macOS, and Windows, checking the initial state before starting audio.
- Abort local media on lock, including while connecting, retrying, or running a parked call, and display why voice stopped.
- Keep lock monitoring across startup retries and ignore stale lock notifications after a call restarts.
- Document lock behavior and platform limitations. After unlocking, users must run `/voice` to start a new call.

## Testing

Add lifecycle tests for already-locked startup, parked-call media shutdown, stale notifications, and locks during retry cleanup, plus a macOS test for password grace-period expiry.

GitOrigin-RevId: fea4b4a7903a48727c546ee3b7bd06e957a9b885
2026-11-04 06:15:53 +00:00
Ruslan Nigmatullin 19438adcb6 Introduce a dedicated context window ID type (#59328)
## What changed

Add `ContextWindowId` as a string-backed protocol type with UUIDv7 generation and parsing. Use it throughout compaction state, rollout reconstruction, token budget context, and request metadata in place of raw UUIDs, preserving the serialized string format and UUIDv7 validation.

GitOrigin-RevId: 786b74fcc331707ca5d6765f429b6e5e322d9328
2026-11-04 06:05:16 +00:00
Eric Traut 3a2788e6fc Restore background terminals from the displayed thread's live state (#59319)
## Why

Replaying a fork's inherited command history can make the TUI show background terminals belonging to its parent thread.

## What changed

Fetch the displayed thread's background terminals after history replay instead of treating replayed commands as live terminals. Read all pages, merge without duplicating tracked processes, and exclude terminals that exit while the request is pending. Clear terminal tracking and invalidate pending restoration when resetting thread state or stopping background terminals.

## Testing

Add a regression test verifying that `/ps` shows a resumed fork's own terminal, excludes inherited commands, and does not restore a terminal that exited during the list request.

GitOrigin-RevId: aca9ae9cde877f03143f8fbeea11affcc34dc372
2026-11-04 05:25:12 +00:00
Ruslan Nigmatullin d84c872464 Route response item IDs through a shared generator (#59312)
## What changed

Introduce `ItemIdGenerator` and pass the runtime-owned generator through sessions, model clients, history, hooks, tool outputs, and memory requests. Keep UUIDv7 generation as the default and replace direct calls to `ResponseItemId::new` with the shared callable.

Preserve existing item IDs and backfill missing or empty IDs through the same generator, including forked history before reconstruction and persistence.

## Testing

Extend coverage for UUIDv7 IDs on user messages, agent messages, and additional tools, and assert that forked model context matches the backfilled items persisted to history.

GitOrigin-RevId: 0dd9ccf0f46f0f1005a6acfc740133b03ce82259
2026-11-04 04:02:00 +00:00
Sean Huang f2b94ef8b5 Switch rusty_v8 to the openai-oss-forks repository (#59299)
## What changed

Update the `v8` Cargo patch and Bazel archive to use `openai-oss-forks/rusty_v8` with a new pinned revision. Refresh both lockfiles, the archive checksum, and the allowed Git source in `codex-rs/deny.toml`.

GitOrigin-RevId: 76cdc8583804e22169275422e2580baffaa1a948
2026-11-04 02:40:55 +00:00
Anthony Tafoya 75aba6768a Add outcome metrics for skill reads and installation listings (#59295)
## What changed

- Record `codex.skills.read.result` and `codex.skills.installations.result` counters with bounded outcome labels for successes and failures.
- Tag both counters with `discovery_version` and installation listings with `source_filter`.
- Make session telemetry available through the step store so skill tools emit metrics with the current step's model metadata.

## Testing

Add coverage for read metrics in both discovery versions, installation listing outcomes and source filters, and extension metrics retaining the current model metadata after a model switch.

GitOrigin-RevId: 0b5418e2b94a89149a20877f32ca2b2e196884e7
2026-11-04 02:29:41 +00:00
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
libcap-v2.75
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
Adam Perry @ OpenAI 943a21829d Set seven-day garbage collection ages for Bazel caches (#59242)
Configure `--experimental_disk_cache_gc_max_age` and
`--repo_contents_cache_gc_max_age` to `7d` in `.bazelrc`.

GitOrigin-RevId: d4d9c652269d56b854ad8d473b83809b76d683e5
2026-11-03 22:14:19 +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 42b5b37638 Suppress macOS warnings in the V8 libc++ Bazel build (#59232)
Add a macOS platform condition to apply `-Wno-pragma-clang-attribute` and
`-Wno-thread-safety-analysis` when compiling V8's libc++ library.

GitOrigin-RevId: daa5355a081e819818ada1f86833159cfa4cf555
2026-11-03 21:23:25 +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
Eric Traut 8960c363c6 Preserve installer stderr when releasing the install lock (#59227)
## Why

Redirecting stderr on `exec` while closing the lock descriptor suppressed subsequent installer warnings, including the warning that an existing npm-managed Codex installation remains installed.

## What changed

Remove the stderr redirection from `release_install_lock` when closing file descriptor 9. Add a regression test asserting that a noninteractive install succeeds and emits the existing npm installation warning.

GitOrigin-RevId: 5a35ccd9bf62afb99cc949892ec724a01e2d9eee
2026-11-03 21:02:06 +00:00