Repository navigation
chore(upstream): sync Codex 0.162.1 - #298
Merged
Merged
Conversation
## Why Fresh TUI threads should use the app server's model settings unless the launch explicitly overrides them. Sending resolved configuration values in `thread/start` turns defaults into explicit overrides. ## What changed - Track explicit launch choices for `model`, `model_provider`, and `model_reasoning_effort`, and omit unselected settings from the initial `thread/start` request. - Preserve accepted model migrations as explicit model and reasoning-effort choices. - Keep explicit profile launches on the existing resolved-configuration path. ## Testing Update startup request tests to cover omitted defaults, CLI model and provider overrides, repeated model overrides, reasoning-effort overrides, accepted migrations, and explicit profiles. GitOrigin-RevId: 4e2661ba42322a80e2b769a55c62f61a576762b0
## Why Concurrent Linux test spawns can inherit writable descriptors for executable fixtures, preventing those fixtures from being executed even after the writing test closes its descriptor. ## What changed Replace direct executable fixture writes and copies across the Rust tests with `codex_utils_cargo_bin::write_executable` and `copy_executable`. These existing helpers complete writes and copies in separate processes on Linux. Remove the empty temporary inode before creating fake bubblewrap executables, and stage tampered bubblewrap bytes in a separate data file before copying them into the executable fixture. Add the required test dependencies. GitOrigin-RevId: c875c83088731a4933ef1574e8d79d8cecc12f54
…50019) ## What changed Add `CODEX_GUARDIAN_DECISIONS_API_KEY` to the non-inheritable environment variables and the HTTP header environment denylist. Case-insensitive filtering removes it from child process environments, including explicit shell policy and command overrides, and rejects its use through `http/request` header `value_env_var`. ## Testing Extend regression coverage for inherited and overridden variables, mixed-case names, and HTTP header rejection before any network request is sent. GitOrigin-RevId: 1adeef814fdccb2d6c77dd68f7a5dfcec0b41cc6
## Why A user restriction such as “Cancel the deployment” can fall outside the recent-message window after unrelated status questions. Guardian reviews need that restriction when assessing delegated actions. ## What changed - Preserve root user messages during handoff relevance filtering, subject to the existing shared message cap. - Apply handoff filtering during heartbeats while retaining saved heartbeat instructions and the active turn's trusted skills. - Mark assistant context as incomplete when handoff filtering omits it, so ordinary user replies are not interpreted without their missing context. ## Testing Add regression coverage for restrictions followed by status questions, bounded user history, omitted assistant questions, and trusted skills across first and repeated heartbeats. Update the delegation request-history snapshot. GitOrigin-RevId: 67f77313572dc54225713cd7cdb90f06b0fbe030
## Why Legacy MCP tool discovery discarded pagination cursors, leaving tools on later pages unavailable. ## What changed Pass `tools/list` pagination cursors to the existing collector in both legacy and modern protocol modes. Legacy discovery now follows subsequent pages and applies the same pagination limits and cursor validation as modern discovery. ## Testing Extend integration coverage to both protocol modes, checking that tools from later pages reach the model and can be called successfully, while catalogs with oversized cursors are rejected. Update the legacy discovery test to expect an error for a repeated cursor. GitOrigin-RevId: a6daa8034d2a403c1f2a5846e385789d8a620af7
## Why Closing Find previously restored the pre-search view, making it difficult to read a match and its surrounding transcript context. ## What changed - Make `Esc` with a nonempty query close query editing while preserving the query, highlighted match, and expanded output. A second `Esc` returns to the latest output; `Ctrl+C` cancels Find and restores the pre-search presentation. - Allow paging through surrounding context and loading older history without losing the query. Keep `Ctrl+N` and `Ctrl+P` available for match navigation, and reopen Find to edit the retained query. - Show context above matches when space permits, preserve match layouts across resizing, and display navigation and history status while reading results. ## Testing Add regression tests and snapshots for retained results, surrounding context, resizing, paging around live output, older-history loading, and footer status. Update interaction tests for the additional `Esc` transition. GitOrigin-RevId: d822956d3c6ffab88fc1665ebdf0c86ccf110899
## Why Starting Find expanded the entire transcript into detailed mode. Searching hidden content should preserve the compact view and manually expanded activities. ## What changed - Search full transcript content, including hidden live output, and temporarily expand only the current matching entry. - Preserve manual disclosure state and retained text revisions while reading or selecting a match. Allow activity controls while reading results. - Use `Enter` or `Ctrl+P` for older matches and `Ctrl+N` for newer matches, with matching footer hints. ## Testing Add regression tests and snapshots for selective expansion, manual disclosures, hidden live matches, retained selections across updates and resizing, and Find in compact transcript overlays. GitOrigin-RevId: 618ee47ba6c3f3a5138c9e3fe0961e7faa3383da
## Why Cygwin records installation timestamps in an unused Java truststore, changing Bazel action cache keys when the same tools are reinstalled. ## What changed Exclude `cygwin/etc/pki/ca-trust/extracted/java/cacerts` from the generated `cygwin` filegroup in `.github/scripts/voice_windows_tools.py`. GitOrigin-RevId: 8fdd910fadba7d977b45718546232652d073cdc8
## Why Environment changes and overlapping catalog refreshes can cause a step to use another step's selected plugins or executor skills. Model context and skill tools need to agree on the capabilities captured for that step. ## What changed - Resolve selected plugins from each step's ready capability roots, honoring disabled plugins, and retain the snapshot with the step's extension data. - Use that snapshot for skill attribution in World State and the first step's active-plugin telemetry. - Return executor skill catalogs directly from refresh so overlapping requests render their own results while retaining thread caches. ## Testing Add regression coverage for overlapping executor catalogs and environment changes during step preparation. Verify that `skills.list` retains the original step's skills, the next step advertises the new skills, and disabled executor and plugin skills remain absent from model context. GitOrigin-RevId: 37d3cbe8c7e062fd06290aa985ada4d3b3462d43
## Why When a turn ends, unsent question answers are recovered into the main composer. Recovering only the answers loses which question each answer belongs to. ## What changed Prepend each recovered answer with its question title as a Markdown blockquote. Separate questions, answers, and existing composer text with blank lines. Sanitize question titles and limit them to 512 bytes at a UTF-8 character boundary, adding an ellipsis when truncated. Keep answer text untruncated. ## Testing Add coverage for bounded titles, multibyte characters, control characters, and multiline question-and-answer submission. Update recovery assertions and snapshots for turn completion, failure, interruption, large pastes, and Vim undo. GitOrigin-RevId: 141dacfb64bcad5fcabc5be217d2340ef7de1eb5
…0054) ## What changed Update `post_sampling_token_estimate_is_disabled_by_always_on_sinks` to register explicit event metadata with the subscriber and assert that its interest is `never`. This replaces the scoped default subscriber and global interest-cache rebuild with a direct check of the configured logging layers. GitOrigin-RevId: 7c4ecd9c4adef148fd222394ad1ad326e8033d95
## What changed - Centralize `windows-sys` at version `0.61.2` in the workspace and migrate dependent crates to it. - Adapt Windows API calls to the updated handle, boolean, and type definitions. Replace custom handle owners with `OwnedHandle` and use `BorrowedHandle` where ownership stays with the caller. - Add explicit wrappers for non-owning Windows handles passed between threads. ## Testing Enable the MCP refresh cleanup test on Windows. Retain process handles to verify that a superseded MCP server stays alive during an in-flight call, exits after cancellation, and leaves the replacement running until shutdown. GitOrigin-RevId: 86f53d9b300d13edff7154f4a7c32e34dacd2919
## Why Bubblewrap consumes and closes the file descriptor for each `--ro-bind-data` mount. Reusing one descriptor across multiple file masks prevents the sandbox from starting. ## What changed Open and preserve a separate `/dev/null` descriptor for each empty-file mask. ## Testing Extend unit tests to verify distinct descriptors for multiple denied files and missing-path masks. Add integration coverage for exact-path and glob deny rules, checking that the sandbox starts, denied files remain unreadable and unwritable, and allowed files remain accessible. GitOrigin-RevId: 85158c83699afd36bb7aca453b2652d777cf65e4
…ion (#50066) ## What changed Add a Decisions sampler under `#[cfg(test)]` for Guardian's optional comparison classifier, without wiring a runtime caller. - Encode text and inline image evidence as a `guardian_risk` choice request using `gpt-6-luna`, accepting only `low` or `high` responses. Reject the complete request when evidence cannot be represented. - Bound concurrency to 16 requests, cancel the oldest unfinished request at capacity, and abort unfinished work when its owning task is dropped. - Enforce a six-second HTTP deadline, an 8 MiB inline image data limit, and a 16 KiB response limit. Keep credentials and wire bodies out of errors. ## Testing Add tests for the HTTP contract, unsupported evidence, inline image preservation and size limits, response validation, oldest-request cancellation, and capacity release when a caller is dropped while awaiting completion. GitOrigin-RevId: e7209ca49a04505acf10ff1aeaca941514589e13
## Why Subagents spawned without forked history do not receive their parent's client-defined dynamic tools, preventing them from using those tools for delegated work. ## What changed Add the disabled-by-default `multi_agent_v2_dynamic_tools` feature flag. When enabled, fresh V2 subagents inherit the parent's dynamic tool definitions and persist them in session metadata. ## Testing Add coverage for V1 and V2 feature gating, tool persistence, and a fresh V2 subagent calling an inherited tool and receiving its result without inheriting parent history. Update TUI assertions and a snapshot to reflect blank-line separation and question text in recovered answers. GitOrigin-RevId: a17a16bf5570f54ce922c1521cffb883022354f2
## What changed Add `StateRuntime::list_thread_attachment_threads` to find threads by exact `attachment_type` and `identity_key`, including threads without previews. Return thread IDs and archive state, with filters for all, archived, or non-archived threads. Order results by thread ID and bind pagination cursors to the attachment identity and archive filter. Add a database index on `(attachment_type, identity_key, thread_id)` to support the lookup. ## Testing Add coverage for exact identity matching, archive filters, pagination, rejection of cursors reused with different lookup parameters, and membership updates after attachment removal or thread deletion. GitOrigin-RevId: 21f32eb0cb1845a82d740d67b374080b6e12eb03
## Why Unread queue-only messages prevented idle agents from unloading, and sending a message to an evicted agent reloaded its session. Pending mail should not require an idle recipient to occupy a loaded thread slot. ## What changed - Retain queue-only mail in an in-memory runtime mailbox when a session unloads. Queue new messages for locally evicted agents without reloading them or starting a turn. - Add `AgentControl::take_mailbox` and `AgentControl::watch_mailbox` so sessions can consume retained mail and react to host mailbox notifications. - Preserve message order across eviction, reload, and subsequent follow-ups. Keep agents with outstanding durable sleep or turn-triggering mail loaded, and discard retained mail when an agent is removed or its tree shuts down. ## Testing Add integration coverage for retaining mail across eviction, sending while unloaded, and ordering messages around a follow-up after reload. Add a host controller test verifying that mailbox notifications wake `wait_agent` and that the message is delivered exactly once. GitOrigin-RevId: 4b55647f9ee9d1aaf3753f0688863bda81617327
…50093) ## Why Reloading an unloaded root from a surviving child can supply the shared instruction wrapper already registered for that root. Replacing its underlying provider with that same wrapper makes instruction loading recurse into itself. ## What changed Reuse the existing wrapper without replacing its provider when both are the same `Arc`. Continue to accept distinct replacement providers. ## Testing Extend regression coverage to reload the root from a surviving child and verify that shared instructions still update. Check wrapper reuse, replacement with a distinct shared provider, and freezing the shared snapshot when switching to a provider that does not share with subagents. GitOrigin-RevId: 7b6b2f9031f206e203f6fa14e1478a36b305ec39
## Why `thread/attachment/list` lists attachments for a known thread. Clients also need to find the threads associated with a given attachment identity. ## What changed Add `thread/attachmentOwner/list` to return owning thread IDs and archive status for an exact `attachmentType` and `identityKey`. Support cursor pagination and an optional `archived` filter, including both archived and non-archived threads by default. Wire the request through the thread store and update documentation, protocol schemas, and generated TypeScript and Python types. The lookup is limited to the configured thread store and reports current membership, not an atomic resource-cleanup check. ## Testing Extend app-server integration tests to cover exact type-and-key matching, multiple owners, archive filtering, and invalid cursor rejection. GitOrigin-RevId: 30f4a20e00243d0023246d465a9b95213b3adeb6
## What changed Add the disabled-by-default `guardianv2_decisions_comparison` feature to run Decisions alongside Guardian V2 snapshot classification using the same policy and evidence. Initialize the comparison sampler with `CODEX_GUARDIAN_DECISIONS_API_KEY`. Publish the baseline score before awaiting comparison results, and keep comparison results and failures from changing approvals. Apply Guardian's input token budget, skip conversation evidence, and cancel comparison work when the baseline classification is superseded. Record success, failure, and skip outcomes with bounded diagnostic reasons, including setup failures. ## Testing Add lifecycle tests covering disabled comparison, disagreeing classifications, backend failures, unchanged published scores, matching policy and evidence, and rejection of over-budget requests before either backend sends them. GitOrigin-RevId: 743d34c8ee440362da94f001058366027b39bd11
## What changed Move footer property construction, mode resolution, hint overrides, quit shortcut hints, and custom footer height calculation from `chat_composer.rs` into `chat_composer/footer_state.rs`. Preserve existing behavior and expose the moved helpers to the parent module where needed. GitOrigin-RevId: 4a23753ac1648352ab19d4bcc3da9f368c48f619
## Why Long drafts need to remain browsable while leaving room for the transcript. Remote image attachments also need to leave an editable prompt row visible. ## What changed - Cap the fullscreen composer, including padding and hints, at two-thirds of the screen, with a minimum of eight rows when the screen allows. - Support mouse-wheel browsing without moving the caret or changing transcript selection, search, or activity focus. Show arrows for hidden prompt rows and hide the cursor when the caret is offscreen. - Resume caret following on editor input, paste, and external edits. - Keep the selected remote image visible while reserving space for prompt text. ## Testing Add regression tests and snapshots for fullscreen scrolling, caret restoration after navigation, paste and external edits, remote image navigation and deletion, resizing at scroll boundaries, and disconnected editing. GitOrigin-RevId: 9a1e4ce14b3b3747e6d136207546327531339258
## What changed Move the voice connection spinner into shared helpers in `codex-rs/tui/src/motion.rs`, keeping its 100 ms animation cadence and static reduced-motion glyph. The helpers handle frame scheduling, and `loading_glyph_with_delay` supports hiding the animated spinner until a specified delay expires. GitOrigin-RevId: c4ebe5e6a33239999aab2f4432c9145432c8f4fd
## What changed Add `codex-cloud-client`, a reusable Rust client for `ThreadService.Resume` and live `ThreadService.Attach` over HTTP/2. Callers supply the native gRPC origin, bearer token, account ID, and `HttpClientFactory`. - Reuse shared proxy, custom CA, and network policy handling for HTTPS. Reject redirects and allow plaintext HTTP only on direct loopback with unrestricted, unmanaged policy. - Preserve notification and server-request protobuf payloads as opaque bytes and expose native gRPC status details while redacting credentials, payloads, and error details from diagnostics. - Bound resume and attach setup to 150 seconds without retrying requests or imposing an idle deadline on live streams. Attach ends on its first error and provides no history or automatic reconnect. - Select Rustls in `HttpClientBuilder::http2_prior_knowledge()` so HTTPS advertises `h2` through ALPN. Include a standalone attach example and documentation of admission semantics and stream behavior. ## Testing Add HTTP/2 fixture tests for protobuf framing, authentication metadata, status trailers, event preservation, malformed responses, stream cancellation, redirect rejection, and diagnostic redaction. Add checks for unsafe origins, network policy restrictions, and TLS `h2` advertisement. GitOrigin-RevId: 55db70438bb5e59272c6995c67a46ced5fa28ff4
## What changed Add `CodexThread::current_turn_model` to return the model slug selected for the named running turn's next step, independently of settings for future turns. Return `None` when the turn ID does not match, the task is cancelled, or the turn is no longer running. ## Testing Extend the step-settings test to verify that the accessor ignores model changes for future turns, reflects active-turn model updates, and returns `None` for a mismatched ID or a completed turn. GitOrigin-RevId: 2cae7c07fa761ed4d64befaa3419a2f9bce4b161
## Why When Codex runs on Unix and launches a stdio MCP server on a Windows executor, explicit remote environment variables activate an allowlist based on Unix defaults. This can filter out Windows runtime and temporary-directory variables. ## What changed Include `SYSTEMROOT`, `TEMP`, and `TMP` in the remote environment allowlist whenever explicit remote variables are requested. ## Testing Extend the environment-filtering test to verify that `SystemRoot`, `TEMP`, and `TMP` survive alongside requested variables while unrequested secrets remain excluded. GitOrigin-RevId: 059c9e23833be66aaf5b65ba5f95013f94f0f792
## What changed Add `codex tcp-tunnel --diagnostics-json` to emit versioned, newline-delimited JSON diagnostics on stderr. Records classify startup, CONNECT, transport, and control failures without exposing credentials, addresses, headers, or raw error messages. Rejected CONNECT records may include a validated `http_status`. Distinguish terminal failures from recoverable stream and transport events, flush terminal records before returning a generic error, and preserve stdout readiness and credential acknowledgments. Keep human-readable diagnostics as the default and document the version 1 schema and consumer fallback rules. ## Testing Add tests for bounded output, error-chain suppression, terminal flushing, control error classification, CONNECT status validation, legacy behavior, and flag parsing. Extend the reconnect test to exercise a rejected CONNECT followed by a successful connection in JSON mode. GitOrigin-RevId: 350f67fe8e3f313e8a6d3bb0fd891952b77647fd
## Why Permission shortcuts checked local configuration while the picker used the connected server's catalog and requirements. Shortcuts should respect the same server restrictions, including model-specific auto-review requirements. ## What changed - Share a cached server catalog between the permission picker and shortcuts. Show the loading picker when no catalog is available and reuse an outstanding fetch. - Clear the cache on session, account, working-directory, or connection changes. - Give discovery RPCs distinct request IDs for each fetch and profile page so repeated requests after timeouts do not collide. ## Testing Add coverage for loading and catalog reuse, managed permission restrictions, and refetching after disconnect. Update timeout coverage to verify that repeated discovery attempts use distinct IDs and each reports a timeout. GitOrigin-RevId: 7d79874294136bfe3a654bb306eb7caf36d4df1e
## What changed Expose `create_worktree`, `get_worktree_creation_status`, and `list_worktrees` through MCP when the worktrees feature is enabled for a trusted local project and attachment storage is available. Support both embedded and local daemon sessions. Create worktrees asynchronously and attach them to the requesting task, with ownership and attachments retained across restarts. Default to the repository's remote default branch unless `ref` is supplied. Keep the task's working directory and execution environment unchanged, and leave uncommitted source changes in place. Reject creation in ephemeral side conversations and explicitly untrusted source projects, reuse pending operations, and reject configured MCP servers that conflict with the TUI tools namespace. ## Testing Add integration and model-request snapshot coverage for creation, polling, listing, attachment persistence across restart, task isolation, trust checks, namespace conflicts, and worker failure reporting. GitOrigin-RevId: b6a57e92cf5f6fc51fd6d4028543d6fabaf5ac49
## Why The per-connection limit of 128 file read handles was checked only after opening the file, leaving pending opens outside the limit. ## What changed Reserve a semaphore permit before polling the file-open future, counting pending opens and registered handles against the same limit. Release capacity when an open fails or is cancelled, or when a handle closes, even if a read still retains the file. Use synchronous handle-table locks that never cross an await, and recheck duplicate IDs after opening to preserve the winning handle during concurrent opens. ## Testing Add tests for stalled-open progress, pending-open admission limits, permit cleanup after failure or cancellation, capacity reuse while a file remains in use, and concurrent duplicate IDs. GitOrigin-RevId: caabf38c74dda5951f2fc75234a7149daaa01263
## Why Submission diagnostics need approval and turn metadata without logging user input, tool responses, commands, paths, or instruction payloads. ## What changed - Log thread and submission IDs, operation kind, and parent/root turn IDs as explicit fields. - Give `Op` and `ThreadSettingsOverrides` selective `Debug` output that retains identifiers, approval decisions, and policy categories while omitting payloads. - Preserve Guardian review identifiers and status when logging approval of a denied-action retry. ## Testing Add an app-server integration test that verifies command approval, Guardian review, and turn policy metadata reach SQLite-backed diagnostic logs with `RUST_LOG=off`. GitOrigin-RevId: 308acb7b70e4849cf31514b11e4d9b46eaf6a09b
## What changed For managed app-server daemons using Unix sockets, raise the soft `RLIMIT_NOFILE` limit to 4096 at startup, capped by the inherited hard limit. Preserve existing higher soft limits and log a warning if the adjustment fails. GitOrigin-RevId: 2ef27370e55cd86a7a62cbc3d47041933b89ac21
## What changed Render web URLs in pending steers, rejected steers, and queued follow-up messages as terminal hyperlinks. Preserve the complete destination when the visible URL is clipped to the preview width. Add `HyperlinkRows` to render already-wrapped rows without changing their spacing or row count, clipping text and hyperlink ranges to the viewport. ## Testing Add regression coverage for complete URL destinations across all three preview sections, plus snapshots for oversized URLs and clipping overflow text and the edit hint in a narrow preview. GitOrigin-RevId: 959df27bba381b1b3895f5a86cc2ecb1419806b1
## What changed Render web URLs in selection labels and descriptions as terminal hyperlinks, preserving their complete destinations when text wraps or is truncated. Carry hyperlink ranges through two-column layouts and keep truncation ellipses outside links. ## Testing Add regression assertions and a snapshot covering wrapped and single-line rows, prefixed labels, descriptions, and wide Unicode characters. Verify that visible URL fragments retain complete destinations and ellipses are not linked. GitOrigin-RevId: 9d50b3ced79cbd29200e48a676445ec169d60758
## Why The hooks browser rendered detail URLs as plain text. Long URLs in hook commands can wrap or be truncated, so their visible text may omit part of the destination. ## What changed Render web URLs in hook details as terminal hyperlinks, preserving the complete destination across wrapped lines and truncated text. Keep truncation ellipses outside the links. ## Testing Add a regression test and snapshot for a wrapped, truncated hook command URL, checking that linked cells retain the complete destination and the ellipsis remains unlinked. GitOrigin-RevId: 488562266bd5ef880c03bf313bc4cfa7d3104c7b
## Why Changing the incremental tools setting on resume should not move tool declarations and base instructions within an existing context window. ## What changed - Determine the current window's tool declaration mode from its history, and apply the incremental tools setting when building a new window after compaction or a context reset. - Use that mode consistently for sampling, remote compaction, startup prewarm, prompt debugging, and Guardian input budgeting. - Preserve tool declarations alongside their comparison baseline in full-history agent forks, including compacted histories; remove them together when rebuilding context. ## Testing Add request snapshots covering legacy resume, migration after remote compaction or a context reset, disabling incremental tools, and tool updates after restart. Extend agent fork and WebSocket startup prewarm tests to cover retained declarations and incremental tools. GitOrigin-RevId: 7c46849a1788027a8435082e4d1f7e7f48d2700c
## Why Skill selection and disabled-path matching need to recognize equivalent Windows paths across case and separator differences while preserving literal spaces, `%`, and `#` in native filenames. ## What changed - Carry `PathUri` through skill metadata, discovery mappings, filesystem lookups, disabled-path sets, and invocation analytics. - Match linked skill mentions and TUI selections by parsed path identity. - Use `LegacyAppPathString` for app-server skill paths and regenerate schemas and SDK types, preserving native path strings on the wire. - Preserve native catalog display paths and ordering. Keep host filesystem probes and configuration writes restricted to host-compatible paths. ## Testing Add regression tests for Windows path identity and disabled-skill matching, literal filename characters, catalog resource reads, native path ordering, and foreign-path analytics normalization. GitOrigin-RevId: c212916dc9fef0e7616542726e107f0d6a313267
…1483) ## Why Rendezvous connection warnings report only a generic WebSocket error, while debug logs include raw error text. Structured diagnostics make failures easier to investigate without logging potentially sensitive error payloads. ## What changed - Generate a request ID for each connection attempt, send it as `x-request-id`, and include it in the connection span and connection, disconnection, and failure logs alongside the attempt count. - Replace raw error logging with typed error categories, I/O error kinds, HTTP status codes, and allowlisted values from `x-codex-rendezvous-rejection-reason`. - Ignore unknown rejection reasons and response bodies. ## Testing Add tests for rejection-header allowlisting, typed I/O failures, and a rejected WebSocket handshake that verifies the request ID header and preserves the HTTP status and known rejection reason. GitOrigin-RevId: a8274fec965bcf5b8453b047c0bb79396cdf6ba4
…(#51491) ## Why A malformed plugin manifest still marks a capability root as plugin-owned. Discovery or metadata failures must not be treated as evidence that a root is standalone. ## What changed - Add `ExecutorPluginProvider::root_ownership` and export `PluginRootOwnership` to distinguish plugin-owned roots from standalone roots before capability parsing. - Use discovery results when conclusive; otherwise probe manifest files at the selected root and its ancestors using the supplied filesystem sandbox. Nested plugin manifests do not establish ownership of their parent root. - Share manifest lookup with plugin resolution and pipeline up to 256 metadata probes while preserving ancestor and manifest priority, including error ordering. ## Testing Add tests for malformed ancestor manifests, discovery failures, ancestor versus nested ownership, concurrent probe ordering, and sandboxed metadata checks without reading manifest contents. GitOrigin-RevId: 3512452cf1df22f52c2a2b422f96c760d98c24ac
## What changed Remove `workspace_roots`, `current_date`, `timezone`, `network`, `personality`, and `multi_agent_mode` from `TurnContextItem` and stop recording them in rollouts. Update the precomputed protocol schema accordingly. Make `summary` optional when reading turn context and write `"none"` as a compatibility placeholder for older readers, rather than persisting the active reasoning-summary setting. ## Testing Update protocol tests to cover omitted `summary` fields and compatibility-placeholder serialization. Extend compaction tests to verify that model requests retain the updated reasoning-summary setting after compaction while the rollout checkpoint records the placeholder. GitOrigin-RevId: d49eabaa1b340be1d79f7f09115281a307ea8a64
## Why Capability discovery needs the roots captured with each environment snapshot. Threads sharing an executor can select different roots, and changing environment order must preserve executor skill aliases. ## What changed - Attach the receiving thread's capability roots when constructing `TurnEnvironmentSelection` at startup and settings updates, including roots loaded from saved history. - Resolve capability roots from environment snapshots while preserving their original order. Retain startup roots so deselecting and reselecting an environment restores its capabilities. - Match inherited configuration by environment and workspace so differences in capability root metadata do not interrupt configuration propagation. ## Testing Add regression coverage for root ordering across environment states and configuration changes, independent root selections on a shared executor, reselection with startup or saved roots, active turn updates, and pending configuration failures reaching child and grandchild threads. GitOrigin-RevId: 4f2e4bb414d27195a6752406117a6050718a1198
## What changed Move full rollout history reading and parsing into one blocking worker for both plain `.jsonl` and compressed `.jsonl.zst` files. Use the shared cancellation-aware line iterator so canceled loads stop before processing another record, while preserving rollout items, thread IDs, and parse-error counts. ## Testing Add regression tests for cancellation between records and equivalent history-loading results across plain and compressed files, including Unicode, CRLF line endings, malformed records, empty files, and invalid UTF-8. GitOrigin-RevId: 65e1bd7ebcdbbd0ab5f560e73b2c7f074f627f8f
## What changed - Use `p` to pin or unpin the selected task, with a configurable `agents.toggle_pin` binding. - Display pinned tasks first in a `Pinned` group, preserving shared section order and applying search and status filters. - Load pins from the shared thread section, including tasks outside the recent-task window, and refresh after pin changes. Disable pinning when the server does not support shared sections. ## Testing Add coverage for shared pin/unpin state, paginated pin discovery and refreshing pins on reopen, shortcut dispatch and duplicate-action suppression, and pinned-group and custom-help snapshots. GitOrigin-RevId: d1a2cab6642d059c3c8df8480b5c59a10c493936
…s (#51502) ## Why A stalled rendezvous WebSocket upgrade can prevent reconnects, while short-lived connections reset reconnect backoff too early. Blocked relay writes also prevent received pongs from clearing their heartbeat deadline. ## What changed - Bound rendezvous WebSocket connection attempts with `DEFAULT_REMOTE_EXEC_SERVER_CONNECT_TIMEOUT`. - Retain exponential reconnect backoff across short-lived connections, resetting it only after a connection lasts at least 120 seconds. - Process pongs during blocked data writes while preserving the in-flight send and its independent write timeout. Prefer queued pongs over an expired heartbeat deadline. - Abort the relay writer when its owning connection task is dropped. ## Testing Add coverage for pongs arriving during blocked writes, missing and queued pongs, independent write timeouts, and writer cancellation. Extend reconnect tests to cover stalled WebSocket upgrades without re-registration and backoff reset after a stable session. GitOrigin-RevId: 0efa350c2b4ada9b89e23df8909063fbb69f33dc
## Why MCP contributors need the complete executor selection to distinguish an unavailable primary executor from a ready secondary. Ready capability roots alone do not preserve pending or failed selections. ## What changed Add `with_selected_environments` and `selected_environments` to `McpServerContributionContext`, and pass the captured selections during thread MCP resolution and model-step plugin selection. Preserve priority order and pending or failed entries. Use `None` for threadless discovery and `Some(&[])` for an explicitly empty selection. ## Testing Add regression coverage for executor ordering with pending and failed selections, environment context in model-step plugin selection, and the distinction between absent and explicitly empty selections. GitOrigin-RevId: 2c1222fae72c7e2c75b2f40abfad3b2048cf9316
## Why Live preferences can be newer than the last successful configuration load. Starting a new thread after a reload failure could overwrite those preferences with stale settings. ## What changed Carry local settings alongside the new-session configuration, retaining the live settings when reloading fails and applying the staged settings when the new thread starts. During resume and agent selection, replace staged local settings only when the directory-trust check actually reloads configuration. ## Testing Add a regression test that changes a live rendering preference, writes invalid `config.toml`, and verifies that loading a new thread's configuration preserves the live local settings. GitOrigin-RevId: 4ac3c70de6d627e1609cc0a5d4ba5df5a61a8b20
… (#51511) ## Why On Windows 10, strict native opens can reject the DOS drive alias itself as a reparse point, preventing no-follow filesystem operations on ordinary drive-letter paths. ## What changed Retry rejected drive-letter opens relative to a verified local volume root. Require the root to resolve to a physical disk volume directory without reparse attributes, and retain `OBJ_DONT_REPARSE` for paths beneath it so junctions remain blocked. ## Testing Add Windows tests for file creation and reading through the volume fallback, opening the drive root, and rejecting junction traversal and creation. Validate accepted volume-root names and verify that named pipes are rejected without establishing a client connection. GitOrigin-RevId: 51ffde4f77d2af45d18dfc4cb026d73a0e69b061
…1512) ## Why Windows temp grants could fall back to host `TEMP`/`TMP` values and bypass read-only or denied subpaths. Sandbox permissions must match the environment passed to the child process. ## What changed - Resolve `:tmpdir` from absolute `TEMP`/`TMP` paths in the completed workload environment, preserving access modes and missing-path rules without falling back to host values. - Deduplicate Windows environment keys case-insensitively in a deterministic order so permission resolution and the child environment select the same value. - Use the resolved temp policy for elevated sandbox overrides across core execution, exec-server, and direct spawning. - Launch direct-spawn sandbox wrappers with the supplied Codex executable, materializing an inner helper only when it is that executable. ## Testing Add Windows regression coverage for temp-only writes, read-only and denied carveouts, mixed-case and duplicate environment keys, unavailable temp paths, and empty or missing write-root overrides. Exercise core execution and direct spawning, and extend exec-server RPC coverage to the elevated backend with temp values set through the environment policy. GitOrigin-RevId: 16b8bd4702cc434fd743a08c75a3e4515780bff3
## Why Agent tree shutdown previously returned a generic error without identifying which operation or thread failed, making cleanup failures difficult to diagnose. ## What changed - Add `AgentTreeShutdown::wait_detailed()` and public report types while preserving the existing `wait()` result and error message. - Record operation, optional thread ID, and either an abandoned teardown guard or a failed phase with a payload-free error category across session cleanup, child spawn cleanup, and resident eviction. - Give each tree a correlation ID, log each failure, and retain up to 64 failures with a count of additional failures omitted. Record failures before releasing tree membership so all completed waiters observe the same report. ## Testing Add unit coverage for aborted and completed teardown, cloned guard context, concurrent and repeated waiters, omitted failure counts, and report formatting without raw error payloads. Extend integration coverage for successful tree shutdown and persistence writer failures, including compatibility with `wait()`. GitOrigin-RevId: 68784af28b63e875b00a55d78729f0cc5b01ac15
## Why Attachment stores need to distinguish uploads from ephemeral threads, which intentionally skip durable persistence. ## What changed Add `ephemeral` to `UploadRequest` and propagate the turn configuration through image preparation for messages, tool outputs, and history replay. Include the flag in debug output while keeping attachment bytes redacted. ## Testing Extend the Guardian context-budget test to assert that a persistent Guardian uploads exactly one image with `ephemeral: false`. Update the attachment debug-output assertion to include the new field. GitOrigin-RevId: 42814c514a571ed6798e4dcf79a22028ee4efc28
## Why Executor config reads omitted the startup `features.prefer_mxc` override, so clients could not see the CLI sandbox preference. ## What changed - Include the explicit CLI `features.prefer_mxc` value in `environmentConfig/read` as a `session-flags` layer, above project config and below legacy managed file and MDM config. - Retain only this preference from startup overrides. - Expose `windows_mxc_allowed_by_config` to share MXC eligibility checks after callers resolve the active permission profile. ## Testing Add CLI and remote executor coverage for preference propagation and filtering, plus a unit test verifying that both legacy managed config sources retain precedence. GitOrigin-RevId: 5ac6f5257f1e807c2f197dcf5dcb2385cedca0ea
## Why User ripgrep configuration can suppress the file list used to construct Linux sandbox deny masks. For example, `--quiet` in `RIPGREP_CONFIG_PATH` can leave files matching deny globs unmasked. ## What changed Pass `--no-config` to the ripgrep invocation that expands denied-file globs. ## Testing Extend the multiple-denied-files regression test with a ripgrep configuration containing `--quiet`, checking that denied files remain unreadable and unwritable while allowed files remain accessible. Skip the ripgrep-specific case when no protected `rg` executable is available. GitOrigin-RevId: 06a6e27e0edec92e79e99af5144b57f86079953f
## What changed Enable `instant_interrupt` by default so new user input can preempt responses and yield foreground code-mode observations. Keep the feature marked as under development and update feature-policy tests to allow this exception. Explicitly disable instant interrupts in core, TUI, and Python SDK tests that depend on responses completing before steering or processing subsequent input. GitOrigin-RevId: a8cab2d6c445bfdbd10b0b2abcf7893d32ee8595 (cherry picked from commit 406b0c4)
## Why Rendering an entire question title as one terminal line removes line endings and misaligns hyperlink source ranges with the visible text. ## What changed Wrap and annotate each logical line of asynchronous question titles separately, preserving blank lines and handling both LF and CRLF endings while retaining complete hyperlink destinations. ## Testing Add a rendering regression test and snapshot covering multiline titles with code fences, Unicode text, and a URL. Check LF and CRLF rendering equivalence and hyperlink destinations at narrow and wide widths. GitOrigin-RevId: ccd7256dbaed91ce98374e52b17d3a1b87645574 (cherry picked from commit eef4719)
…#52648) ## Why A running shared background server owns its feature settings until it restarts. Differences from a client's configuration files or defaults should not trigger a compatibility warning or a restart request. ## What changed - Check shared-service features only when explicitly overridden on the command line. - Exclude overrides superseded by active legacy managed configuration or feature requirements, while supporting older servers without `configRequirements/read`. - Pass only the remaining explicit feature overrides to a requested daemon restart. ## Testing Update compatibility tests for stale daemon overrides, explicit enable/disable requests, managed configuration, and older servers. Extend CLI startup tests to verify the feature overrides persisted after a restart. GitOrigin-RevId: ac92c9c02cd70fa233203ebef1182fd119325dd1 (cherry picked from commit d3f9b22)
- Fixed a TUI crash when asynchronous questions contain multiple lines, preserving line breaks and complete hyperlink destinations. (#51866) - Fixed startup failures caused by differences between a running background server's feature settings and CLI defaults. Compatibility checks now apply only to explicit command-line feature overrides. (#52648) Full Changelog: openai/codex@rust-v0.162.0...rust-v0.162.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
把 Codex
rust-v0.162.1(092d3acd6b)同步到 Zuno main(3617770b2b)。巡检按next策略重放 0.162.0,剩 7 个冲突(#297)。0.162.1 与 0.162.0 都从上游 a028250 切出,0.162.1 只多 2 个修复,所以直接同步 0.162.1,跳过 0.162.0。这是手工解决的候选,需要手工合并。Closes #297
改名重放
沿用 main 上 #293 和 #296 的新规则:
zuno sandbox uninstall的提示;ZUNO_HOME;剩余 7 个冲突
core/tests/suite/personality.rs:上游删掉了BUNDLED_FRIENDLY_TEMPLATE常量和所有用到它的地方,取上游版本。exec_approval_modal_exec.snap、model_migration_prompt_gpt5_codex.snap:随上游删除。前者只是移到了chatwidget/tests/snapshots/…approval_requests…,后者对应的测试已被上游删掉。适配
ext/agent/src/one_shot.rs:resolve_windows_elevated_filesystem_overrides新增了workload_env参数,用来解析子进程的临时目录。照sandboxing/src/manager.rs的写法传入子进程的环境变量。这段代码只在 Windows 上编译,Linux 上看不到,是用cargo xwin check查出来的。快照(上游结构或文字变化后,按 Zuno 文案重新渲染)
code_mode_catalog_messages、compaction、guardian_extra_policy、mcp_resource_messages、mxc、shared_instructions、subagent_inherits_pending_environment等):差异只有 Codex→Zuno 和对应的 hash。insta 头部保持上游原样。startup_draft_full_frames的版本号(v0.162…);clipped_full_access_confirmation、resume_paused_goal_prompt、plugins_popup_marketplace_remove_confirmation;managed_worktree_model_creation里提示词的 hash。zuno__doctor__output__tests__doctor_human_report_environment_rows.snap:上游给 doctor 报告加了 config 一节,zuno版快照同步为与codex__版相同。派生产物
cargo update --workspace;write_schema_fixtures.py跑两次(UV_PYTHON=3.12);codex-write-config-schema。本地验证
cargo check --all-targets通过(排除需要 GStreamer 的codex-voice-host。Zuno 的 CI 不构建它,打包也不带语音资源)。cargo xwin check(x86_64-pc-windows-msvc:zuno、codex-command-runner、codex-windows-sandbox-setup、codex-agent-extension)通过。cargo check --release -p codex-cli --bin zuno、cargo fmt --check、8 个包的clippy -D warnings、边界脚本、Python 工具测试、codex_package测试。DOTSLASH_CACHE后全部通过;queue_only_agent_mail…::reloaded_*用例。在纯上游 0.162.1(同一环境)上,这 17 个也全部失败;3 个reloaded_*用例连跑 5 轮,候选和纯上游都卡在 10 秒的事件超时,表现一致,所以不是 Zuno 引起的。Zuno-Source-Commit: 3617770
Zuno-Upstream-Tag: rust-v0.162.1
Zuno-Candidate-Commit: f94b3c7