Repository navigation
Refresh fork stable from rust-v0.160.0 - #193
Merged
Merged
Conversation
…7758) ## Why The 32 KiB per-result cap and 128 KiB aggregate budget discard tool metadata even when the outgoing request has room to retain it. ## What changed - Remove the per-result capture cap and raise the aggregate executed-tool metadata budget to 2 MiB. - Apply a 15 MiB soft budget to serialized HTTP requests and WebSocket messages, using the actual WebSocket delta. Trim optional result metadata on the wire copy while preserving ordinary content and logical history. - Prioritize `openai/resource_access` metadata during trimming, and include `overage_bytes` in omission markers. - Record bytes removed by metadata budgets in `codex.tool_metadata.shed_bytes`, tagged by stage. ## Testing Add coverage for HTTP and WebSocket message boundaries, resource preservation, residual marker removal, unchanged history, and shedding metrics. Update direct-tool and code-mode tests to verify metadata survives beyond the previous limits. GitOrigin-RevId: ed00996b77945300f60db1e52eff22b4de2707c1
## What changed Use the model catalog's `send_user_message_async.parameters` override for the `request_user_input_async` tool schema. Fall back to the bundled schema when the override is absent or invalid, logging a warning for invalid overrides while preserving the catalog description. ## Testing Extend integration coverage for catalog schemas, empty and invalid overrides, and schema updates during mid-turn model changes. Update the asynchronous question-and-answer scenario to verify that requests carry the catalog schema while work continues and the user's answer arrives. GitOrigin-RevId: c51a90d3266daaba1e7001aa4026964f84dfb206
…nai#47797) ## Why Passing extra descriptors to a PTY previously selected behavior intended for inherited escalation sockets: no EOF on stdin close, different signal exit statuses, and no default `SHELL`. Launch attachments need ordinary PTY behavior and must survive execution even when marked `FD_CLOEXEC`. ## What changed - Add `ChildFds::Attached` alongside `ChildFds::Inherited` to distinguish launch attachments from legacy inherited descriptors. - Preserve ordinary EOF, default `SHELL`, and signal exit status behavior for PTY attachments. - Allow explicitly supplied close-on-exec descriptors through pipe and PTY launches without changing the parent's descriptor flags, using child-side flag updates and macOS spawn inheritance actions. - Update existing callers to use `ChildFds::Inherited`. ## Testing Add Unix coverage for attachment accessibility, unchanged parent descriptor flags, default `SHELL`, and signal exit statuses. Extend the PTY stdin-draining test to cover attachments and EOF delivery. GitOrigin-RevId: 864aedc6c5717d8b43c9d71057c9f54409834509
## What changed Promote `write_stdin_approval` to stable and enable it by default. ## Testing Update the stdin approval suite to rely on the default feature setting. Adjust the background network approval test to account for terminal input review before network access and explicitly wait for the network assessment. GitOrigin-RevId: 1bb449f6d9ecf4ee451e84f95f839a6744877e8b
…i#47808) ## What changed - Add `ThreadManager::with_agent_control_factory` to select a host-owned controller asynchronously using the final thread ID for new and cold-resumed threads. Keep local control as the default, reuse live controllers on warm resume, and preserve parent controllers for internal sessions. - Fail startup on factory errors or when a provided controller's identity does not match the session identity. - Defer root service-tier updates to host controllers until thread registration succeeds, preventing failed starts from changing settings on a shared controller. GitOrigin-RevId: 095afbecfee5d47329038d2a97d0cc0081f181df
…#47811) ## Why Explicit user goal edits can restrict permitted actions, such as “Inspect only; do not publish.” Guardian needs these edits as authorization evidence even though they are recorded as contextual messages. ## What changed - Add `UserGoalUpdate` and a recording API for objective, status, and clear updates without scheduling a model response. - Use host annotations to retain goal updates in Guardian review history and root authorization evidence, and invalidate cached authorization when updates are recorded. - Omit oversized objectives whole and mark their evidence incomplete so truncation cannot turn a restriction into a grant. - Keep item injection from updating shared model and multi-agent metadata. ## Testing Extend authorization, retained-context, and review snapshot tests to cover goal-edit cache invalidation, root goal visibility from child threads, and restrictive goals reaching Guardian alongside managed policies. GitOrigin-RevId: 17b99d9fa8c1620840d6f408d79b405a78a778f8
…ai#47813) ## Why The list-voices barrier can consume the sleep completion event that `any_new_input_interrupts_sleep` needs to observe. ## What changed Enqueue agent mail directly in the test so the subsequent wait can observe sleep completion. Keep the `TestCodex` fixture alive for the duration of the test by cloning its `codex` handle instead of moving it out. GitOrigin-RevId: 957165c2f20cc4d76df763cd41fd99816b477be3
Use `notify_one()` instead of `notify_waiters()` in `terminating_initial_exec_command_rechecks_initial_response_state` to retain the release notification if the termination waiter has not registered yet. This prevents the test from timing out due to a missed notification. GitOrigin-RevId: d233ffc50e016eb75752fd360a4d846de0063683
Wait for an assistant item to start before resuming a running paginated thread, ensuring the user message has reached live history. Emit the initial response events before the gate and keep completion gated during resume. Increase the memory dual-write test's consolidation timeout from 10 to 60 seconds to allow Git workspace and agent process startup under contention on Windows CI runners. GitOrigin-RevId: 4d74d04955c88a9c208a809f639fe14fdb2ebf37
## Why New user input during a Guardian review invalidated an in-flight approval and aborted the pending action, even when the input was only a status inquiry. Review the action again against the latest authorization evidence so it can proceed or be denied based on the updated instructions. ## What changed - Treat stale authorization as a retryable review error within the existing attempt budget and shared deadline. - Refresh authorization evidence for each attempt while keeping the pending action fixed, and record evidence from the completed attempt. - Preserve cancellation and history-reset aborts, and deny approval if stale authorization exhausts the retry budget. ## Testing Add and update coverage for parent status updates, authorization revocation, repeated updates, cancellation, history resets, and retry deadlines. Verify that refreshed reviews see the latest input and that the pending action executes exactly once only after approval. GitOrigin-RevId: c683e2efb6f07840b99d0d34acf0d38c9ddfe9bd
## What changed Add a `TestCodexBuilder::with_thread_manager` hook for configuring the thread manager before test threads start, and register an integration suite using a test `AgentControl` implementation. The tests verify: - Controller factory calls for new roots, forks, and cold resumes, with reuse for warm resumes and shared session identity for internal sessions. - Child session identity, persisted parent lineage, message-board authorship, and routing of child reloads through the host controller. - Preservation of the controller's service tier when child threads start or root starts are rejected. - Dispatch of `spawn_agent`, `send_message`, and `list_agents` to the host controller, including propagation of its errors to tool results. GitOrigin-RevId: bc6a6c6dbcde9ecc3ce15456aaf7a0610a14eceb
…47824) Raise `max_concurrent_threads_per_session` from 3 to 4 in the test configuration so the root, worker, grandchild, and sibling can all remain resident until explicit shutdown. GitOrigin-RevId: 564fd7bd64d2a91c160437f7346c7e17a30a5f2a
## Why Login clears the recommendation cache after its RPC response, allowing thread startup to race with cache invalidation in the external login tests. ## What changed Wait for `account/login/completed` and assert a successful notification before starting the thread. This keeps thread startup and the background refresh on the same cache generation in both variants of the recommended plugin test, with `tool_suggest` enabled and disabled. GitOrigin-RevId: 7be46dacd947b30a28c83176dc2e3b5f730005f1
…47830) ## Why Asynchronous Guardian scoring omitted the target environment's denied-read restrictions, and cached score authorization did not include that permission context. A score from one environment could therefore be reused for an action in another environment with different restrictions. ## What changed - Share permission resolution between synchronous review and asynchronous scoring, including resolving `write_stdin` targets from the owning terminal session. - Include environment identity and denied-read paths/globs in async scoring context and cached score authorization. - Fall back to synchronous review when permission evidence cannot be resolved or exceeds the async limit of 3,000 bytes, rather than omitting restrictions. ## Testing Add regression coverage for rejecting cached scores with different environments or denied paths, passing the target environment's restrictions to the classifier, and rejecting oversized async permission evidence. GitOrigin-RevId: 14b6f3454bbea458be037560eb1da47d22874df1
## Why Cold Rosetta translation and cache invalidation from hard-linked executables can interfere with timed CLI tests. Sampling the clock twice also makes local retry telemetry report a delay shorter than the selected backoff. ## What changed - Warm CLI fixtures with `--version` on macOS x86_64 before timed checks, and use copies or Unix symlinks to avoid invalidating the shared executable's Rosetta cache. - Use one clock sample to calculate the response retry deadline and recorded delay. - Include the retry telemetry event in delay-range assertion failures for the headerless rate-limit stream test. GitOrigin-RevId: fc573bfff912e999cf74b94a1c6e7ae1be07974b
## Why Native clipboard setup and writes can block, preventing the TUI from processing input or closing overlays while a copy is in progress. ## What changed - Route clipboard copies through one session worker that retains native clipboard ownership. Keep terminal escape output on the UI thread. - Show pending and busy status messages, reject additional copies without queuing them, and ask users to retry image paste after an active copy finishes. - Abandon setup after five seconds and prevent late delivery. Keep the worker busy until the blocked call returns, and bound shutdown waiting for clipboard handoff. - Match completions to their originating requests so stale results cannot clear newer selections or unexpectedly resume transcript following. Retain selections on automatic copies, failures, and unconfirmed delivery. ## Testing Add regression tests for blocked backends, overlay exit, copy and paste ordering, setup expiry, bounded shutdown, completion status messages, and preservation of replaced or moved selections. GitOrigin-RevId: 4ba1f8da258b9d0700b0edec9ac0ba699f536785
…ai#47851) ## Why Unchanged scheduled heartbeat instructions should not become fresh authorization evidence that supersedes a later human override or floods Guardian review context. ## What changed - Capture heartbeat provenance per input, including when steering an active turn, and persist it in history and retained context. - Coalesce unchanged instructions for each automation at their original acceptance order. Preserve changed instruction versions and ordinary human messages. - Represent repeated heartbeats as references to earlier instructions in Guardian transcripts, while tracking the latest input turn separately for trusted skill selection. - Limit coalescing to recognized, bounded heartbeat envelopes with host-provided provenance. ## Testing Add regression coverage for human overrides across repeated and steered heartbeats, instruction changes, checkpoint restoration, transcript references, envelope parsing, and latest-turn trusted skills in delegated reviews. GitOrigin-RevId: 31e444ddb685a1a618be26d3cc32fb562296946b
…ai#47852) ## Why Platform proxy resolution holds the system proxy cache mutex, so checking the cache could block a Tokio worker while another lookup was in progress. ## What changed Use `try_lock` for cache reads, treating contention as a cache miss so async callers on Windows and macOS wait through the existing asynchronous resolver path. ## Testing Add a Windows/macOS regression test that verifies resolution yields while the cache is locked and completes after release. Adapt the cached-route test to tolerate concurrent cache writers, and isolate the unavailable-decision cache test from shared cache contention. GitOrigin-RevId: d61da8d37f81b84637e51bf30e4b26091d5fde24
## Why Image and audio estimate cache misses computed values while holding the cache mutex, blocking access to unrelated keys during initialization. ## What changed Add `BlockingLruCache::get_or_init` using `Arc<OnceLock<V>>` and migrate the image and audio estimate caches to it. Initialization and same-key waits run in a Tokio blocking region after releasing the cache mutex. Callers share initialization while an entry remains cached; eviction can allow another initialization, so factories must be deterministic. ## Testing Add a concurrency test covering access to other keys during initialization, eviction of an in-flight entry, and successful completion of both the evicted initializer and its replacement. GitOrigin-RevId: 079226a58828b854eddc2b501079527bcbe5e603
## Why Checking installed plugin roots performs filesystem work while holding the loaded plugins cache mutex, blocking lookups for other cache keys. ## What changed Store cache entries in `Arc`s and release the mutex before validating installation paths. After reacquiring the lock, check the cache generation and entry identity to reject entries invalidated or replaced during validation. Preserve stale-entry eviction and most-recently-used ordering. GitOrigin-RevId: cb5a5f7ec52cba852e6bb9da03a8e214cc19727d
## Why `render_ref` already holds a read lock on `sign_in_state`. Acquiring another read lock in `render_continue_in_browser` can deadlock when a writer is waiting. ## What changed Pass the borrowed `ContinueInBrowserState` from `render_ref` into the browser sign-in renderer instead of reading the lock again. ## Testing Update the existing narrow-width browser sign-in test to exercise `render_ref`, retaining checks for the full OSC 8 authentication link, device-code guidance, and cancellation footer. GitOrigin-RevId: ba83e212d510627be9dfd068c8d7318da32a1749
## What changed - Resolve remote sandbox modes, writable roots, and denied read paths/globs using the executor's filesystem context, displaying paths in its native format. Preserve local filesystem resolution for local environments. - Resolve remote read denials individually so missing executor facts omit only the unresolved entries. - Apply a shared 32 KiB budget to displayed permission paths/globs, omitting whole entries and warning that all restrictions still apply, including omitted read denials. ## Testing Add coverage for remote Windows writable roots and read denials, missing executor path facts, and whole-entry omission with multibyte paths under the shared budget. GitOrigin-RevId: c61e7ddc8fa569dbc25e9990d90357c42315188f
## What changed Add `otel.log_guardian_assessments`, disabled by default and requiring an OTLP HTTP or gRPC log exporter. Emit `codex.guardian_assessment` when a synchronous Guardian review finishes, including review identifiers, status, risk level, user authorization, and rationale. Include `allow` or `deny` outcomes only for completed model assessments, not review errors, timeouts, or cancellations. Cap exported rationales at 64 KiB on a UTF-8 character boundary and record their original byte length and truncation status. Use the log-only route to exclude assessment payloads from trace export, local state logs, and bug-report log buffers. Cached V2 approvals are not included. ## Testing Add coverage for configuration gating, enabled and disabled denial logging, terminal statuses and outcomes, UTF-8 rationale truncation, export routing, and bug-report log buffer exclusion. GitOrigin-RevId: dcbb5b429c8726a5a5c80ff82f9d625e81796ede
…penai#47871) ## Why The PID reservation test could race with the backend's read on Windows by deleting the PID file from its cleanup task. The guardian heartbeat snapshot and environment normalization also needed to match the current permission-context wording. ## What changed - Release the reservation lock and let `stop()` remove the stale PID file, then assert that the file is gone. - Update the guardian heartbeat snapshot and normalization pattern to use `The active permission profile for environment`. GitOrigin-RevId: d9cadae0e5d36cb2e1ab0517e2d7121cf2d0715d
…openai#47873) ## What changed Record `codex.thread.tools.namespaces_total` and `codex.thread.tools.fragment_bytes` histograms through session telemetry. Tag samples by `stage` (`before` or `after` the 4 KiB cap) and `kind` (`snapshot` or `delta`). Measure bytes after description normalization and XML escaping, including the `<tools>` wrapper, with explicit fragment-size buckets. Delta counts include only changed entries, and unchanged state emits no samples. ## Testing Extend rendering tests to verify snapshot and delta metrics, omission counts, byte sizes with Unicode and XML escaping, and no samples for unchanged state. GitOrigin-RevId: 26543585e2bea54bff6d63263faa9a6ca5dca379
) ## Why Local `apply_patch` permission checks can treat a macOS system alias and its canonical spelling as different locations, sending writes covered by temporary-directory grants for unnecessary approval. ## What changed - Normalize trusted top-level aliases in local policy roots and patch targets, reusing a prepared matcher for permission requests and patch safety checks. - Share alias normalization with Seatbelt and the macOS executor sandbox while preserving mutable symlinks and missing descendants. - Preserve read-only and deny precedence, protected metadata restrictions, and remote URI matching. Propagate normalization failures from fallible permission checks. ## Testing Add macOS regressions for multi-file patches with missing parent directories through both direct `apply_patch` calls and shell interception, asserting automatic approval and file contents. Add unit coverage for alias restriction precedence, mutable symlink preservation, missing descendants, and remote permission isolation. GitOrigin-RevId: 0822ff951eaab728cb1ad91281745fa1b8809f15
## Why Paste input classification and asynchronous flush deadlines need to share a clock, including when Tokio time is paused in tests. ## What changed Use Tokio's clock for chat composer paste timing and startup draft newline tracking, converting to `std::time::Instant` where existing composer helpers require it. ## Testing Run the existing startup draft multiline paste test with `start_paused = true`. It checks that non-bracketed pastes preserve newlines without submitting the draft. GitOrigin-RevId: 73bac963204473d85e7395781e0df966ecc92801
## Why SQLite write failures can leave persisted logs incomplete, while log snapshots taken before collection miss errors raised during that collection. ## What changed - Report SQLite flush failures directly to the in-memory log buffer without re-entering tracing, using an error category and batch size instead of raw error details. - Track whether the log writer has lost a batch and make app-server diagnostic uploads use the memory buffer when SQLite logs are incomplete. - Refresh log bytes after flushing and querying SQLite so the same submission includes collection failures, while preserving captured metadata and thread identity. ## Testing Add regression tests for failure reporting without recursion, subsequent write recovery, metadata preservation, and healthy and failing SQLite collection. Add an upload integration test that captures attachments locally and checks failure diagnostics, memory-buffer fallback, and omission of raw SQLite error details. GitOrigin-RevId: 51b0c4b69c977d9f4e74f2f245a9fd90fdb13761
## Why Failed SQLite writes leave diagnostic logs incomplete. Notify users before they close Codex so they can submit logs or run `codex doctor`. ## What changed - Add a best-effort warning on the first log write failure in standalone and in-process app servers, while continuing to retain failure diagnostics in memory. - Handle failures that occurred before the in-process warning reporter was attached. - Tailor the warning's guidance to whether submitting logs is enabled. ## Testing Add coverage for warning deduplication, both guidance variants, retained diagnostics after the notification sender is dropped, and SQLite flush failures before and after reporter attachment. Extend log upload integration coverage and add a TUI warnings snapshot. GitOrigin-RevId: 12a74126d13c3568430e539a180cca47fa931fa9
## Why Diagnostic uploads through the app server do not include the TUI client's diagnostic buffer. Attach those diagnostics when users consent to uploading logs. ## What changed - Stage the most recent 1 MiB of client logs as `client-logs.txt` on the app-server host and append it to `extra_log_files`. - Skip staging without log consent and list the optional attachment in the consent dialog. - Continue uploading the report if staging fails, noting the omitted logs in the report reason. Attempt to remove the staging directory after both successful and failed uploads. - Make app-server filesystem helpers usable by background requests. ## Testing Extend submission tests to cover log truncation, preservation of existing attachments, consent gating, staging failures, cleanup after upload failure, and error display. Update consent dialog snapshots to include the client log attachment. GitOrigin-RevId: 9790834d52772c08a147ee7c176cbbc2aa029d5f
## Why Repeated plugin discovery and loading reparse unchanged manifests and repeat warnings for invalid fields. ## What changed - Share a manifest cache through `PluginStore` across marketplace listing, plugin loading, capability inspection, and tool suggestion metadata. - Reuse successful parses by plugin root, manifest path, and content digests, including the Codex overlay. Reread files on each load so manifest edits and overlay changes or removal remain visible. - Bound the cache to 128 entries and bypass caching for inputs larger than 64 KiB. Retry failed parses and share entries across store clones while keeping independent stores isolated. - Reuse loaded manifest data when loading apps and MCP metadata. ## Testing Add unit coverage for parse reuse, warning deduplication, revision invalidation, repair after parse failures, equivalent Windows paths, store isolation, and oversized inputs. Add an app-server regression test that verifies repeated `plugin/list` requests observe manifest and overlay revisions in one running server. GitOrigin-RevId: ed082cd7d198015cd8ed35db7f2af74e13f49915
## Why Each call to `PluginsConfigInput::remote_plugin_service_config` created a new HTTP client pool, preventing connection reuse across service configurations. ## What changed Share one lazily initialized, route-aware pool across a `PluginsConfigInput` and its clones. Newly constructed inputs retain separate pools, while service configurations continue to use the current endpoint and product SKU and requests use the supplied authentication. ## Testing Add tests for lazy initialization, pool sharing across repeated calls and early clones, isolation between new inputs, and requests using updated endpoints, product SKUs, and authentication with the shared pool. GitOrigin-RevId: 3e929c34052798779a4f153e4db03b3f75b6f87d
…penai#49102) ## Why Changing an existing database from `FULL` to `INCREMENTAL` auto-vacuum requires a writer lock and can block pool initialization. SQLx also retries connection initialization failures, masking the original error as `PoolTimedOut`. ## What changed Preserve existing auto-vacuum modes when opening writable pools, while continuing to initialize empty databases with incremental auto-vacuum. Return the first connection initialization error directly to the caller, retaining SQLx's normal error handling for later lazy connections. ## Testing Add regression tests for fresh database settings, opening an existing `FULL` auto-vacuum database under a write lock, and preserving the WAL conversion lock error while allowing a subsequent open to succeed after the lock is released. GitOrigin-RevId: b586c68e43a5a0d3b47268378716919d01b749cf
) ## Why Hash-based sharding does not account for differences in test duration. Use estimated test time to balance the Windows Bazel workload across shards. ## What changed - Add checked-in duration weights and a deterministic selector that assigns the longest targets first to the least-loaded shard. - Assign every queried target exactly once, default missing weights to one second, and ignore stale weights. - Run queries and selection in the foreground so failures stop the job before tests run with a partial target list. - Emit LF-delimited target labels for Git Bash and report estimated shard loads on stderr. ## Testing Add seven passing selector tests covering deterministic coverage and balancing, missing and stale weights, invalid inputs, duration-file overrides, and CLI output. Run them on the first Windows CI shard. GitOrigin-RevId: d415ae093bfe57794ee53a2eb9d712022202dad8
## Why Reconnecting paused all recovered input, including queued messages that had never been sent. Those messages can resume automatically once any uncertain submissions are resolved. ## What changed - Track unsent and unconfirmed messages separately. Reconcile submitted prompts and steers using exact client message IDs from restored history, buffered events, and later receipts. - Remove confirmed submissions from the recovered queue and resume unsent input after replay. Keep uncertain submissions paused without resending them, and show a notice identifying the message whose delivery could not be confirmed. - Preserve pauses for unavailable conversations, pending compact/review requests, and existing input recovery failures. - Simplify reconnect status text and remove blanket disconnect/reconnect transcript notices. ## Testing Update reconnect integration tests and snapshots for automatic queue resumption. Add coverage for matching and unrelated receipts, missing history, late confirmations across navigation, pending compaction, and preservation of image-failure recovery pauses. GitOrigin-RevId: d0b9aa43c4019d472985d12bbce8ba9bbfb9253b
## Why The command center seeded only ten recent sessions, with no way to browse older history from the task list. ## What changed - Add a keyboard-selectable “Show more” row that discovers up to ten more tasks, with loading and retry states that remain accessible during search. - Retain per-source cursors and buffered rows across requests, merging interactive and non-interactive history by recency without discarding existing tasks on failure. - Refill vacancies after tasks are archived or deleted, and prevent stale refreshes from restoring removed tasks. - Limit routine detail refreshes to recent and loaded tasks, plus explicitly targeted threads, as retained history grows. ## Testing Add regression coverage for pagination across mixed sources, cursor retries without row loss, automatic refill, queued pagination, and “Show more” navigation, loading, search, and retry rendering. GitOrigin-RevId: 0bfcc970c9adf0c8d509b275a92ecf01c29595ad
## What changed - Publish released mouse selections from both transcript views to X11 `PRIMARY` as plain text, even when copy-on-select is disabled. Preserve configured `CLIPBOARD` copying when it is enabled. - Paste `PRIMARY` into the editable fullscreen composer on middle-click, including while a transcript selection remains active. - Limit support to local Linux X11 sessions, excluding Wayland, SSH, tmux, WSL, and VS Code terminals. - Retain the latest deferred selection publication and order it before a pending `PRIMARY` read, while giving explicit copies priority. Cancel stale deferred work when its selection or paste target is invalidated. - Clarify that scrollback mode uses native terminal copy, paste, and scrollback. ## Testing Add regression tests for selection publication with copy-on-select enabled and disabled, publication-before-read ordering, explicit-copy priority, cancellation of deferred work, and middle-click paste invalidation. GitOrigin-RevId: 6ba7bddffda60183b7f9ad5cd69a97da8a4a8dcd
Set `chatgpt_base_url` to the supplied mock server URI in `make_remote_compaction_session`. GitOrigin-RevId: de5c6e208fd104cbe07a8873e7e33c108dac7a57
## Why Sessions can share an analytics client while using different product SKUs. Analytics requests need per-thread attribution to reflect each session's configuration. ## What changed - Register each thread's `apps_mcp_product_sku` and send `X-OpenAI-Product-Sku` on analytics requests grouped by product, without changing authentication. - Send product groups concurrently while preserving event order within each group. - Flush buffered tool events before changing or evicting their product attribution, and clear attribution when a session disables analytics. - Bound retained thread registrations and concurrent product groups. Drop attribution when registration cannot be queued or a batch exceeds the product-group limit. ## Testing Add tests for shared-session attribution, clearing attribution on resume with analytics disabled, buffered events across product changes, queue overflow recovery, registry limits, and concurrent delivery with preserved event order. GitOrigin-RevId: 25a98788cd44d4a85f97ee87aadf3a6909607f6a
Clarify in the `requires_openai_auth` field documentation and configuration schema that credentials use the backend selected by `cli_auth_credentials_store`, rather than always being stored in `auth.json`. Also clarify that `env_key` specifies the environment variable containing the API key. GitOrigin-RevId: e65753a72258e43b24c4e40b51ff26830c5b3756
## Why Responses stopped by `content_filter` previously followed generic stream-error retry handling without guidance about the block. Retried requests need instructions to explain the limitation and offer a permitted alternative. ## What changed - Recognize content-filter failures as a distinct error while preserving retryability and the existing public error representation. - Append developer guidance to the conversation after each sampling block, retaining delivered output and using the existing retry handling. - Support a model catalog override through `model_messages.content_filter_guidance`. Missing, null, blank, or values exceeding 512 UTF-8 bytes fall back to bundled guidance. - The bundled guidance tells the model to avoid reproducing or working around blocked content, briefly explain the limitation, offer a permitted alternative, and continue unrelated authorized work. ## Testing Add a scenario and request-history snapshot covering repeated blocks, catalog guidance on each retry, retained partial output, and eventual completion. Add error-mapping assertions for retryability, public error classification, and error text. GitOrigin-RevId: ba0c201b3a5a3acf5cfa971332027240e0690225
…i#49127) ## Why Skills available from both cloud and executor providers consume duplicate catalog space, leaving less room for descriptions of unique skills. ## What changed - Prefer model-visible cloud skills over executor listings with the same `plugin:skill` name before allocating the metadata budget. - Preserve aliases from the full visible executor inventory so filtering duplicates does not renumber remaining packages. Continue choosing full locators when they fit the budget better. - Keep executor packages available through `skills.list` and `skills.read`, and retain executor listings when cloud skills are disabled. ## Testing Add regression tests and a model-request snapshot covering description retention, stable aliases across turns, executor availability changes, package reads, and full-locator selection after deduplication. GitOrigin-RevId: 477e4cf16b8968dbe61438dd5af1eca9cbfa78c8
…penai#49130) ## What changed Move content-filter guidance recording from the sampling loop into `handle_response_stream_error`. Pass `StepContext` so the handler can resolve model-specific guidance and record it before retry decisions for sampling requests. Keep remote compaction excluded from guidance recording and update callers and the existing retry-deadline test to use the new signature. GitOrigin-RevId: 030bde1d4f1597fc4f3971ad837478e5304c5aa9
## Why Providers with `model_catalog_url` could advertise bundled models absent from their catalog or reuse stale models after a failed refresh. Model metadata could also match by prefix or namespaced suffix instead of the provider's exact model ID. ## What changed - Suppress bundled model fallback and merging for explicit provider catalogs, including when discovery is disabled. - Require unique, non-empty catalog slugs and match metadata by exact model ID. - Serialize explicit catalog refreshes and invalidate in-memory and persisted catalog entries after fetch failures, preventing stale cache reuse. - Report a clear configuration error when startup has no available model, while allowing an explicitly configured `model`. ## Testing Add regression coverage for exact model matching, hidden catalog entries, cache invalidation across restart and recovery, invalid slugs, and empty-catalog startup with and without an explicit model. Update app-server model-list expectations and verify the TUI configuration error. GitOrigin-RevId: ac323a94178e3c48df8d4a159a86fdbac20b03a2
…ai#49136) ## What changed Render macOS Option shortcuts as `⌥t` and `ctrl+⌥t` instead of `⌥+t` and `ctrl+⌥+t`. Keep `+` separators after text modifier labels such as `ctrl`, `shift`, and `alt`. ## Testing Update key-label and chord assertions and UI snapshots to expect the compact labels across shortcut help, navigation hints, and tooltips. GitOrigin-RevId: 7d52088ebce3dfa3f8bdad65eb159ca0fead8a31
…49138) ## Why Turn error hooks receive only a `CodexErrorInfo` category, which omits backend metadata such as usage-limit reset times and rate-limit snapshots. ## What changed Add borrowed `CodexErrorDetails` to `TurnErrorInput` and pass the original details through turn and compaction error notifications, alongside the existing error category. ## Testing Add coverage for usage-limit metadata during sampling, manual compaction, and post-turn compaction, including preservation of completed answers and existing error events. Extend lifecycle tests to verify that an `InvalidImageRequest` retains its details when surfaced as `BadRequest`. GitOrigin-RevId: 6f2058992126da0f69508ef51998e7581557deea
…penai#49144) ## Why Forwarding local defaults as request overrides can replace server defaults or saved thread settings for reasoning summaries and verbosity. ## What changed Only forward `model_reasoning_summary` and `model_verbosity` as shared thread request overrides when their winning configuration layer is a session flag or an explicitly selected user profile. Use the effective values from that layer, and omit values whose winning source is ordinary user or project configuration. Preserve the existing reasoning-summary defaults for new embedded threads. ## Testing Add coverage for profile, project, and CLI precedence. Extend outbound model request tests to verify that remote-mode thread start and resume preserve server reasoning summary and verbosity settings despite conflicting local values. GitOrigin-RevId: 5e14254a51ed7506118a46847bb7466ab58908ef
…penai#49145) ## What changed Omit the reasoning summaries setting from the model details when connected to a remote server or local background server. Continue displaying it when no server connection is present. ## Testing Expand status snapshots to cover no server connection, a remote server, and a local background server, including the reasoning summary setting visibility in each case. GitOrigin-RevId: f7213e7ad7439107705461ccf4e070501729113b
Replace the trailing-slash removal loop in `normalize_base_url` with
`trim_end_matches('/')`, preserving existing behavior.
Add regression coverage for unchanged URLs, single and repeated trailing
slashes, empty and slash-only inputs, and ChatGPT URLs with and without
`/backend-api`.
GitOrigin-RevId: db71e80c4dcaac33b308a45684b14e7edbd71528
…enai#49153) ## Why Copying text selected within a blockquote adds Markdown quote markers that are not part of the selected content. ## What changed Return plain text for selections containing only quoted content, preserving literal `>` characters and selected whitespace. For quoted tables and task lists, remove quote prefixes while retaining table reconstruction and checkbox states. Selections spanning quoted and unquoted content continue to preserve Markdown structure. Preserve the existing logical source when marking list separator lines as omitted from Markdown copying. ## Testing Add coverage for partial and nested blockquote selections, quoted tables and task lists at narrow and wide widths and after rewrapping, and copying a mouse-selected blockquote. GitOrigin-RevId: 5ac0c8c47a77937e5a35c376d8908065217ad2dc
## What changed - Skip folder trust prompts for locally discovered projectless directories without a saved trust decision. Apply workspace-write permissions and granular approval defaults only when local execution, configuration, and managed policy allow them. - Prompt for Windows sandbox setup when needed before enabling implicit workspace-write permissions. - Restore saved task permissions on resume unless explicitly overridden, and keep ordinary turns from overwriting the server's saved permission profile. Track explicit approval reviewer choices separately from restored permissions. - Let `/cd` request folder trust with a “Keep current directory” option. Recheck task activity and background terminals before switching, and enforce destination permission requirements. ## Testing Add regression coverage for projectless defaults and session transitions, explicit permission overrides, saved profile preservation, trust discovery, destination policy conflicts, and the directory consent and Windows sandbox prompts. GitOrigin-RevId: cf74f5a90245f2aee96caa80d76de64da6ec1ebd
## Why Client provider defaults can override the app server's configured provider and hide its sessions from resume and fork history. ## What changed - Omit implicit provider overrides from thread start, resume, and fork requests so the server can resolve its defaults. - Use the server's effective provider for named history lookup, `--last`, and resume and fork pickers, while honoring explicit CLI and selected-profile choices. - Respect managed provider requirements when resolving history filters and preserve the active session's provider when forking it. ## Testing Add app-server regression tests for provider defaults, explicit choices, configuration changes, selected profiles, and managed requirements. Add CLI coverage for resume and fork pickers and `--last` with local daemon and embedded servers, plus a picker rendering snapshot. GitOrigin-RevId: a077758b13a5e55552b52e5532ad4bebe86dce7e
…49164) ## Why Background helpers launched from a detached Windows process can allocate console windows. Job Object launches and containment fallbacks need to preserve console suppression as well. ## What changed - Add `codex_utils_process::background_command` to set `CREATE_NO_WINDOW` on Windows, and use it across background subprocess launches, including Git, plugins, authentication, diagnostics, and sandbox helpers. - Centralize console suppression in Job Object launches. Keep `CREATE_NO_WINDOW` when retrying without containment, and clear `CREATE_SUSPENDED` so the fallback child can run. - Preserve console inheritance for interactive shell launches and interactive AWS authentication refreshes. ## Testing Add Windows regression tests covering console-free launches from detached parents through standard and Tokio commands, stdout/stderr capture, successful containment, Job Object creation and assignment failures, and sandbox setup refresh helpers. GitOrigin-RevId: b2c238fa7d4f9fbd868e5adf7d4be9958ff01e6c
Read `model_provider` from the effective configuration's nested `config` field in `history_model_provider`, retaining the `openai` fallback. GitOrigin-RevId: 06a8b3da1b499e673f80b8827951020c469c3970
…nai#49386) Backport openai#49308 onto the frozen 0.160.0-alpha.6 content commit c248f6d for the Windows console flashing issue openai#48074. That base already contains openai#49164, so only the missing patch is included. This does not advance the baked candidate to current main or publish stable 0.160. The cherry-pick applied cleanly and its stable patch ID matches upstream. `git diff --check` passes. Native Windows validation on this exact candidate is still pending. Keep this PR in draft pending review, required checks, and focused unelevated-sandbox smoke evidence for external processes (whoami.exe, cmd.exe, Git, nested PowerShell), alongside built-ins, with and without the managed daemon. Record exact candidate SHA, CLI/daemon versions, CODEX_HOME, configuration, command output, exit codes, duration and visible console observations. The unresolved hang report at openai#48074 (comment) is not proof these changes caused a regression, but requires investigation before treating the candidate as validated. Co-authored-by: Eric Traut <etraut@openai.com>
…es (openai#49763) Bring the frozen 0.160 candidate into parity with the fixes delivered on the 0.159 maintenance line, without advancing it to main. Includes clean cherry-picks of openai#49318 (bundled model catalog), openai#49339 (Bedrock catalogs), and openai#49715 (optional account-security setup reminders). Both Windows console fixes are already present in the target and are not duplicated. All three stable patch IDs match upstream. The catalog changes are applied incrementally to the frozen candidate. This line includes the upstream catalog-dedup snapshot update; the 0.159 backport omitted that snapshot because its test was absent there. Server-side banner eligibility and rollout remain unchanged. Validation: clean application on 917ab70 and whitespace checks passed. Exact-backport CI is pending. Local Bazel validation is currently blocked before compilation by the environment's V8 download certificate-chain error. This prepares a frozen alpha hotfix candidate, not a stable 0.160 release. --------- Co-authored-by: Celia Chen <celia@openai.com> Co-authored-by: dennyku <dennyku@openai.com>
- Browse older tasks in the agent command center with a keyboard-accessible “Show more” action. (openai#49106) - Select transcript text and paste with middle-click in fullscreen mode on supported local Linux X11 terminals. (openai#49112) - Start sessions outside a project with workspace defaults when policy permits, and restore saved permissions when resuming. (openai#49160) - Added opt-in Guardian review capabilities to retrieve earlier user instructions and include context from agent handoffs. (openai#49036, openai#49057) ## Bug Fixes - Unsent queued messages now resume after reconnection once uncertain submissions are resolved, avoiding duplicate sends. (openai#49105) - The terminal UI now preserves server provider, reasoning-summary, and verbosity settings and shows the correct sessions in resume and fork history. (openai#49144, openai#49161, openai#49171) - Fixed Windows sandbox PowerShell fallbacks and long-path permission repairs, and suppressed unwanted console windows from background helpers. (openai#49019, openai#49058, openai#49098, openai#49164, openai#49386) - Subagents now retain environments that are still starting and receive their configuration or preparation failure. (openai#49075) - Prevented SQLite stalls during connection setup and logging, and surfaced initialization errors instead of masking them as timeouts. (openai#49032, openai#49102) - Explicit provider model catalogs no longer include unsupported bundled models or reuse stale entries after refresh failures. (openai#49135) ## Documentation - Clarified how provider credentials use the configured storage backend and how `env_key` identifies the API-key environment variable. (openai#49118) ## Chores - Reduced repeated plugin-loading work by caching parsed manifests and reusing HTTP connections for remote plugin requests. (openai#49099, openai#49100) - Added background reclamation of unused log database space to reduce disk usage. (openai#49069) ## Changelog Full Changelog: openai/codex@rust-v0.159.0...rust-v0.160.0 - openai#48983 Avoid full metadata rewrites for thread timestamp updates @jif-oai - openai#49000 Isolate the memory startup metadata test from Git enrichment @jif-oai - openai#49019 Use a compatible PowerShell fallback for the Windows MXC sandbox @iceweasel-oai - openai#49028 Use the numeric ioctl value in the macOS sandbox policy @aionescu-oai - openai#49031 Clarify ChatGPT sign-in success copy @bc-openai - openai#49032 Avoid SQLite stalls from connection setup and stderr span logging @jif-oai - openai#49036 Add opt-in conversation history retrieval to Guardian reviews @felixxia-oai - openai#49037 Show the Plan mode cycling hint in the fullscreen status line @fcoury-oai - openai#49038 Preserve encrypted agent messages in Guardian reviews @felixxia-oai - openai#49041 Copy selections within inline code as plain text @fcoury-oai - openai#49043 Update Pro plan display names in the TUI @etraut-openai - openai#49057 Add handoff-aware root context for Guardian reviews @jif-oai - openai#49058 Fix Windows sandbox ACL repair for long runtime paths @darius-oai - openai#49060 Update Guardian messaging snapshots for native agent messages @dkovalenko-oai - openai#49065 Update Guardian handoff snapshot for separate agent messages @cassirer-openai - openai#49067 Keep configuration values out of Windows sandbox policy events @zm-oai - openai#49069 Reclaim unused SQLite log database pages in the background @dkovalenko-oai - openai#49073 Surface realtime voice catalog failures in the TUI @etraut-openai - openai#49074 Propagate Cargo package versions to Bazel Rust targets @tamird - openai#49075 Preserve pending environments when spawning subagents @sayan-oai - openai#49076 Avoid collecting unused Git metadata in skill analytics @tamird - openai#49079 Update and centralize TUI subscription labels @etraut-openai - openai#49082 Skip remote Git discovery for Guardian diff paths @jif-oai - openai#49084 Track app-server running turns incrementally @tamird - openai#49089 Render follow-up directive labels in the TUI and copied responses @etraut-openai - openai#49093 Simplify startup promotions to platform-specific desktop app tips @etraut-openai - openai#49096 Update `h2` from 0.4.16 to 0.4.19 in Cargo and Bazel lockfiles @cassirer-openai - openai#49097 Notify lifecycle extensions of compaction usage limits @xli-oai - openai#49098 Resolve Windows sandbox PowerShell fallbacks on the exec server @zm-oai - openai#49099 Cache parsed plugin manifests across plugin workflows @dkovalenko-oai - openai#49100 Reuse the HTTP connection pool for remote plugin requests @dkovalenko-oai - openai#49102 Preserve SQLite vacuum modes and surface pool initialization errors @bc-openai - openai#49103 Balance Windows Bazel test shards using duration estimates @jgershen-oai - openai#49105 Resume unsent TUI input after reconnecting @etraut-openai - openai#49106 Add history pagination to the agent command center @bc-openai - openai#49112 Add X11 primary selection and middle-click paste support @fcoury-oai - openai#49114 Point remote compaction tests at the mock ChatGPT server @OLI-OAI - openai#49117 Attribute analytics requests to each thread's product SKU @papayo-oai - openai#49118 Correct provider authentication storage documentation @celia-oai - openai#49119 Add recovery guidance to content-filter retries @won-openai - openai#49127 Deduplicate cloud and executor skill listings before budgeting @TAFOYA-OAI - openai#49130 Move content-filter guidance into the shared Responses retry handler @won-openai - openai#49135 Treat explicit provider model catalogs as authoritative @andrewgu-oai - openai#49136 Remove the plus separator after Option symbols in TUI key hints @bc-openai - openai#49138 Expose original error details to turn lifecycle contributors @bryanashley - openai#49144 Preserve server reasoning summary and verbosity settings in the TUI @etraut-openai - openai#49145 Hide reasoning summary settings in `/status` for server connections @etraut-openai - openai#49147 Simplify cloud task base URL normalization @akira-oai - openai#49153 Omit blockquote markers when copying quoted selections in the TUI @bc-openai - openai#49160 Support projectless TUI sessions with workspace defaults @etraut-openai - openai#49161 Honor app-server provider defaults in the TUI @etraut-openai - openai#49164 Suppress Windows console windows for background subprocesses @etraut-openai - openai#49171 Fix model provider lookup for TUI history @etraut-openai - openai#49386 [0.160] Backport remaining Windows console fix to frozen alpha.6 @andrewgu-oai - openai#49763 [0.160] Backport maintenance-line catalog and security reminder updates @andrewgu-oai
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.
Refresh fork
stablefrom upstream release tagrust-v0.160.0(commita956835d020762cb2b570053af06f643a11c0ecc), based on prior stablec92b5f0e2f7fc30616907728996e253c059c7ed7. The review commit has those two parents and contains tree372fc1fb53d4a20aa23942b8d404ff5b7789a6d2. Forkmainwas not merged.Fork contract audit
All maintained fork surfaces were classified. None was intentionally dropped.
codex-rickdistribution, versioning, and release laneMcpOAuthencrypted-file passphrase keep the stable-signed executable Keychain ACL policy.MemoryExtraction.PluginSummary.extensionsmetadata is retained; live backend acceptance ofincludeExtensions=trueremains unverified.0067is unchanged. The upstream archive-sort0058SQL is byte-identical to shipped0067and is not applied twice.There were 198 textual conflict paths. Conflict audits covered the app-server/API/MCP/config/protocol/SDK wire slice (22 paths) and the core runtime slice (23 paths), with remaining manifest, persistence, telemetry, daemon, and packaging resolutions checked against the maintained contracts. No intentional fork surface was dropped. Reqwest 0.13.4 retains the fork-valid
rustls/streamfeature names.Reconnect adopts upstream retry only when the queued operation is proven unsent. Managed reload/handoff still resumes the exact thread without replaying prompts or tool calls, and uncertain submissions remain quarantined. The previously reported reconnect notice and Guardian encrypted-content findings are resolved.
Validation and review
just test -p codex-core hard_serialized_output_cap_omits_mediapassed (1 selected test).just test -p codex-tui reconnect_restores_history_permissions_and_resumes_unsent_inputpassed (1 selected test).python3 -m unittest discover -s .github/scripts -p test_select_windows_bazel_targets.pypassed (7 tests).just fix -p codex-core,just fix -p codex-tui, and finalUV_CACHE_DIR=/Users/rick/.cargo/uv-cache just fmtpassed.cargo shear --deny-warningspassed on tree75dfc62aac699400385373f5341d1dc6f3f8c4e1;just fix -p codex-coreand finaljust fmtpassed on that source.Limits
The two local managed-daemon restart/shutdown proofs could not complete in this sandbox: the daemon socket is fixed at
/private/tmp/codex-daemon-501, which the sandbox hides, so child startup times out before connecting. Those proofs remain for unsandboxed CI. The full workspace suite and private-infrastructure-only jobs were not run locally. No upstream product/runtime behavior was intentionally skipped. Live hosted acceptance ofincludeExtensions=trueis unverified; existing mock responses do not prove backend support.