Integrate current upstream Codex snapshot with Every Code contracts - #465
Merged
Conversation
This was referenced Jul 23, 2026
## What changed - Resolve shell and unified-exec commands against the trusted plugin roots loaded for each turn. - Add optional `pluginId` and safe plugin-relative `scriptPath` fields to command execution items and legacy execution events, and propagate them through app-server notifications. - Include the attribution in command execution analytics while rejecting absolute, unsafe, and unattributed script paths. ## Testing - Cover attribution for cached curated and remote plugin scripts from command execution through core and app-server events. - Verify analytics serialization and unsafe-path filtering. GitOrigin-RevId: 02fac3a233284ccfc6642fa502a95f1881dba83d
## Why Reporting key event types can leak an exit-shortcut release into the parent shell in iTerm2 and can cause tmux's `xterm` extended-key format to lose Shift+Enter. ## What changed - Select keyboard enhancement flags using the detected terminal and tmux extended-key format. - Disable event-type reporting for iTerm2 and tmux's `xterm` format while retaining alternate-key reporting. - Preserve event-type reporting for other terminals and tmux's `csi-u` format so repeat events remain distinguishable. ## Testing Added unit coverage for iTerm2, Kitty, unknown terminals, and both tmux extended-key formats. GitOrigin-RevId: 03a6b9d5443f626da5279413a14933af2a0ec3e5
## Why Delegated HTTP requests need to honor the same outbound proxy policy as the Codex process that starts the exec server. ## What changed - Pass the configured `HttpClientFactory` through local and remote exec-server startup and use route-aware client pools for delegated HTTP and local MCP requests. - Preserve per-request timeouts and follow-or-stop redirect behavior while keeping request URLs and sensitive response headers out of diagnostics. ## Testing - Cover configured system-proxy routing across the exec-server transport. - Cover both redirect policies and verify that success and failure logs do not expose request or response secrets. GitOrigin-RevId: 4af6aec1d265c4db62dfcb6e1fb076fb31736137
## Why After a remote plugin install refreshes the Apps tool catalog, a later MCP runtime publication must not restore the catalog from the previous connection. ## What changed - Rebuild the MCP runtime with fresh connections when hard-refreshing Apps tools, using the latest desired runtime configuration. - Refresh the Apps catalog on the newly published connection so subsequent runtime updates retain it. ## Testing Extend the remote plugin install test to verify that both newly available and missing Apps tools remain consistent after an unrelated runtime configuration refresh. GitOrigin-RevId: 5b675d53d56379ab67fab09512fc2ad0ffcb8535
## What changed - Add optional `plugin_id` and `script_path` fields to execution approval and guardian assessment events. - Propagate validated plugin attribution through delegated approvals, guardian-reviewed command items, app-server notifications, thread history, and rollout traces. - Preserve attribution on both started and completed command items, including declined commands. ## Testing - Extend core, app-server, thread-history, and rollout-trace tests to cover plugin attribution propagation and serialization. GitOrigin-RevId: 723684d010cab04142918d7a95e06ed95d008da1
## Why Paginated threads allow only one app-server process to write at a time. Archive and delete operations must not mutate a thread or its spawned descendants while another process owns any of them. ## What changed - Acquire paginated writer locks for the full archive or deletion set before changing rollout files, including descendants whose rollout has not materialized yet. - Add a batch archive store operation so ownership conflicts are detected before any thread in the subtree is archived. - Return ownership conflicts as JSON-RPC invalid-request errors and document the behavior. ## Testing - Cover archive and deletion conflicts for owned threads and descendants, including unmaterialized rollouts. - Verify deletion still removes rollouts with unreadable metadata. GitOrigin-RevId: f62a3e0c1ee2631cea48dd9145b588a1486e2425
## What changed - Parse the `browser_use.disable_auto_review` setting from layered `requirements.toml` configuration. - Return the setting as `browserUse.disableAutoReview` from `configRequirements/read` and publish it in the generated JSON and TypeScript schemas. ## Testing - Add an app-server RPC test covering the Browser Use requirement. GitOrigin-RevId: 5749d5bc17bcc5b582bf7ed59b8e5b72d6c8f7fc
…penai#35034) ## Why Noise environment registry requests need to follow the exec server's effective outbound proxy policy without exposing registry URLs or response headers in HTTP diagnostics. ## What changed - Build the registry client from the supplied `HttpClientFactory` and use a route-aware API client with redirects and request logging disabled. - Defer construction of the Noise connection provider until the outbound HTTP policy is available. - Map route-aware request failures into registry errors while retaining timeout detection across response body reads. ## Testing Add coverage for system-proxy routing, sensitive registry metadata redaction, stalled response-body timeouts, and prepared Noise configuration validation. GitOrigin-RevId: d312dfe037f72732085bf38109af44df76ed0b53
…35036) ## Why Guardian review commands can run without the proxy-port environment used to configure the parent session. Reconciling persistent Windows sandbox settings for those commands can discard the parent's proxy configuration. ## What changed - Add a session-level Windows sandbox proxy-settings mode and use `Preserve` for guardian review sessions while keeping `Reconcile` as the default. - Carry the mode through unified exec and the exec-server sandbox context to Windows process launches. - In preserve mode, reuse the proxy settings recorded by the existing sandbox setup marker. ## Testing Added coverage for guardian session configuration, exec-server transport, and preserving an existing setup marker when proxy-port environment variables are absent. GitOrigin-RevId: 214655c6e6d97360906431773dc0de0fdda2db6e
## What changed - Record `codex.apps.read.duration_ms` when `app/read` returns a response. - Tag the duration by the request's `include_tools` value. - Move the `app/read` handler into its own request-processor module. GitOrigin-RevId: e1563cd41c72ad03e7f5d5d33cd8a3b35e27984b
## What changed - Add `GuardianV2` to the feature registry for automatic approval reviews. - Expose it as `features.guardianv2` in the configuration schema. - Keep the under-development feature disabled by default. GitOrigin-RevId: 92fa107e3ff1396a75a28a071353743a7bb48c43
## What changed - Add a default-on `tools.update_plan.enabled` configuration option. - Omit `update_plan` from the visible and registered tool sets when the option is disabled. ## Testing - Cover configuration resolution and tool registration for the disabled setting. GitOrigin-RevId: c13aa463a6911956fca9f0ef5b74841b543798c4
## Why Remote environment connections need to honor Codex's effective outbound proxy policy, including when a rendezvous connection reconnects. ## What changed - Pass the configured `HttpClientFactory` into remote environment transports and use `WebSocketConnector` for exec-server and rendezvous WebSockets. - Resolve proxy routes asynchronously so these connections can use the configured system proxy. - Add connector options that preserve Tungstenite's default TLS behavior and enable `TCP_NODELAY` for latency-sensitive rendezvous traffic. ## Testing - Verify prepared remote environments connect through a configured system proxy. - Verify initial and reconnected encrypted relay peers use the system proxy. - Cover default TLS selection and opt-in `TCP_NODELAY` behavior in the WebSocket client. GitOrigin-RevId: 8a8da2116e37cb3a891269d0c0b037986fecdd3c
## What changed - Rename `ReqwestHttpClient` to `RouteAwareHttpClient` to reflect that delegated HTTP uses Codex's shared route-aware transport. - Use `codex_http_client` response and error types plus transport-neutral `http` and `url` types, removing the exec server's direct `reqwest` dependency. ## Testing - Cover fragment stripping and Unicode hostname normalization for delegated HTTP requests. GitOrigin-RevId: 8b0fc60a76004feb57198bfb4afb1371c9ceb1bd
## What changed - Add the disabled-by-default `deferred_tool_world_state` feature, which exposes deferred tool namespaces and their descriptions to the model in a `<tools>` world-state section. - Emit added and removed namespace updates as tool availability changes, bound the rendered context size, and persist nonempty state across thread resumes. - Omit empty tool state while retaining deferred tool discovery through `tool_search`. ## Testing - Cover initial, unchanged, removed, recovered, empty, and resumed namespace state, along with description truncation and rendered-size limits. GitOrigin-RevId: 867e599666dc3569eb0789ba78aaa40254253a6f
## Why Deferred tool world state already advertises the available tool sources, so repeating them in the `tool_search` description adds redundant context. ## What changed - Omit the source listing from `tool_search` when `DeferredToolWorldState` is enabled while preserving the tool discovery instructions. - Include the source-listing mode in the tool search handler cache key so the description is rebuilt when the feature state changes. ## Testing Added coverage for source omission, cache invalidation when the feature is toggled, and the resulting request payload. GitOrigin-RevId: f7dc0c4f3351a7c7daadec936b26a080202730bc
## What changed - Include CLI snapshot files in Bazel test runfiles. - Restrict the Windows sandbox binary test target to Windows. - Label boolean and optional arguments in the affected CLI tests. GitOrigin-RevId: c248396c51d881c38856739d7d9b653dcde1823e
## What changed - Add a `--listen` option that accepts `stdio`, `stdio://`, or a `ws://IP:PORT` endpoint, while retaining stdio as the default. - Serve the existing length-prefixed protocol in binary WebSocket messages, with isolated connections, shared host limits, and a `/readyz` endpoint. - Reject browser-origin handshakes and contain malformed frames to the affected connection. ## Testing - Cover listen URL parsing and complete-frame encoding and decoding. - Exercise readiness, cell execution, tool callbacks, large frames, concurrent connections, malformed frames, and origin rejection through the WebSocket listener. GitOrigin-RevId: 01c8be4c6256b8ce4a3a0002440dcb3294e5f887
…t-428 # Conflicts: # codex-rs/app-server/src/connection_cleanup.rs # codex-rs/app-server/src/lib.rs # codex-rs/app-server/src/message_processor.rs # codex-rs/app-server/tests/suite/v2/connection_handling_websocket.rs
## What changed - Add `--code-mode-host ws://...` and `wss://...` support to `codex app-server`, gated by the `code_mode_host` feature. When omitted, app-server continues to start a local host. - Share one remote WebSocket connection across the process's threads, using the configured HTTP client's proxy and TLS policy and preserving the existing framed host protocol. - Reject invalid host URLs, bound WebSocket frame sizes, close connections cleanly, and return an error when a connection exceeds 1,024 pending delegate calls without disconnecting it. ## Testing - Cover CLI validation, WebSocket protocol execution and shutdown, connection sharing across app-server threads, and delegate-call capacity recovery. GitOrigin-RevId: 715e82d4d9db1e7e2f91b754a777dcab504e2ae4
## What changed - Recognize root `plugin.json` files using the Agent Plugins 1.0 schema and map their portable metadata, `skills/`, and `mcp.json` into Codex plugin manifests. - Apply Codex-specific apps, hooks, and interface settings from the inline `com.openai` extension, with `.codex-plugin/plugin.json` as a fallback overlay. - Preserve legacy manifest precedence when a root `plugin.json` is unrelated, and reject unsupported Agent Plugins schema versions. - Add a direct-child skill discovery mode that excludes nested skills and paths resolving outside the plugin root. ## Testing - Cover manifest metadata, validation, extension precedence, legacy fallback, and direct-child skill path boundaries. GitOrigin-RevId: eab24139f13a5cc5cb3ad3fb444d8e904511aca6
Restore hermetic app-server integration keyring
8 tasks
Close execution and agent convergence contracts
Keep codex exec alive for Background Review
Restore binding skill-routing contracts
…-428 Finalize upstream convergence proof set
14 tasks
cbusillo
marked this pull request as ready for review
July 29, 2026 14:28
This was referenced Jul 29, 2026
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.
Why
Codex Lab needs a refreshable, upstream-first integration candidate without silently discarding contract-backed Every Code behavior. This branch repairs the original upstream-tree anchor loss by restoring product lanes forward, adding executable compatibility proofs, and enforcing an explicit convergence guard and waiver ledger.
This is still a draft integration candidate. It is suitable for CI and review staging, but it is not merge-ready or release-ready. Permanent cutover remains gated by #343.
Candidate Identity
5450effdb1d6c51308bf8d0b7cc46f860d1de853.origin/mainthrough82ffbe8cae7dc68a400ea5d4f29f7bcd42b18c8f.openai/mainthrough61a44880a85d2fd0d8770908dea5733495e571c8.e48f82b0a7804ae823a5631dc9791e2589fab5b1; the current head adds sixteen reviewed CI-remediation commits, which together cover Cargo shear, Bazel compatibility/argument comments, sample config drift, formatting, V8 artifact routing, Windows cfg hygiene, PID liveness, POSIX-only Windows test gating, Linux ARM archive resource control, full-CI timeout budgeting, deterministic cross-platform expectations, Windows path parsing and text normalization, image-codec CI performance, Windows ARM capacity tuning, bounded auto-review persistence, session/auth durability, stale-waiver cleanup, native Windows ARM archive execution, authenticated provider model refresh, MCP/OAuth expectation drift, bounded Windows capture drains, and hosted-runner test isolation.Scope and Review Shape
Measured at gate commit
2fd8cf5109(tree-identical toe48f82b0a7), the full diff againstorigin/main@82ffbe8caeis 3,260 files, +399,677 / -139,409 across 1,507 commits. The sixteen later CI-remediation commits add to those totals and are reviewed separately. Most of that is upstream lineage, so this cannot be reviewed meaningfully as one flat diff. Review should follow the staged restoration merges, the contract matrix indocs/convergence-contracts.md, and the guarded-path/waiver artifacts.The current convergence artifacts record:
intentionally_owned, 25red_manual_review.pending_restore, 4upstream_deletion_adopted, 1converged_with_upstream.These numbers are not a claim that all fork behavior survived. Relative to
origin/main, this candidate deletes 166 paths: 94 match upstream's own deletions betweenb89ce9a2and4462b9de, and 17 of the remaining 72 carry explicit waiver entries, leaving 55 deletions that are neither upstream-driven nor waiver-documented. None of those 55 fall within the guard's 326 recorded paths, so a green guard attests only to its guarded lanes. Examples include a deleted fork CI lane (.github/workflows/ci.yml,.github/extended-checks.json, andscripts/github/decide_extended_checks.py), the thread-history projection files and0002_projection_integrity.sqlmigration,apply_patch_validation, the Odoo #360 proof trio, local/convergence tooling, skill-provenance files, and an older checked-in convergence evidence snapshot. Some appear superseded or intentionally retired, but each still needs an explicit routing decision before undraft.Additional guard limits to keep visible:
4462b9deef, andownershipBaseline.currentstill namesd96308e5e9, where only 36 of today's 51current_treerows were expanded. The remaining 15 were added ate48f82b0a7without advancing that pin. The guard was last expanded ate48f82b0a7(266 to 326); the gate merge and sixteen later CI-remediation commits delete no path and add one non-guarded doctor snapshot, so the guarded path set has not moved. The current head removes the now-stalemulti_agents_spec_tests.rswaiver and two stale models-manager waivers, and passes the guard at 326 guarded / 58 waived, but the recordedbaselineBlobprovenance remains stale and the guard does not prove equivalence against later upstream refreshes.Restored and Hardened
approx_bytes_for_tokens), enforced on escaped output so the whole item stays below the 10K per-item ceiling, with adversarial metacharacter and multibyte tests.CODEX_LAB_HOMEconsistency on Unix and Windows.Validation
Focused validation on the candidate and its reviewed gate trees includes:
codex-app-server-protocol: 296/296 passed.codex-corerealtime/external-agent preflight coverage: 26/26 passed.codex-mcp-server --lib: 15/15 passed.cargo build --profile ci-app -p codex-cli --bin codex-lab.cargo shear --deny-warningsis clean; external-agent migration 139/139 (upstream crate content; fork behavior remains waived underAGENT-1), home-dir 4/4, and Code Bridge protocol 17/17 passed;codex-thread-manager-samplechecks successfully.rust-ci-fullexplicitly consumes exact-version, checksummedopenai/codexartifacts because it publishes nothing, whilerust-release.ymlkeeps the fork-owned fail-closed default.openai/codexV8 inputs as lint/build jobs, and Linux ARM64 archive builds were reduced to two Cargo jobs after three hosted runners shut down at the same final-link phase. Both are remediations whose current-head proof is full-CI run30213661303, which has not completed./*param_name*/annotations, and two full sweeps reported zero argument-lint diagnostics across the 769 targets that built successfully. Targets that did not build were outside that lint result. The sole remaining sample compile error was fixed through a sharedConfigdefault constructor and verified by Cargo check.just fix -p codex-auto-review, and final formatting.just fix,just fmt, workflow syntax validation, and targeted Prettier all passed.just fix, andjust fmt; the earlier image utility suite remained 13/13 and itsci-testprofile check passed.just fmt-check, targeted workflow Prettier,cargo metadata --locked --no-deps,just bazel-lock-check, whole-repo Bazel query,git diff --check, workflow syntax validation, and the convergence guard (326guarded /60waived). The repo-widepnpm run formatcommand still flags unchangedcodex-rs/browser/src/js/virtual_cursor.js; the same failure reproduces from the prior pushed head3bfe89b366and is outside this correction diff.The combined MCP integration invocation now passes all three affected tests after its expected user agent was aligned with the server's wire-compatible version source. Focused tests also pass for provider-authenticated model discovery, OAuth fallback storage, prompt caching, rollout/reasoning resume, remote-control reconnect, persisted auto-review scope, thread rollback, sandbox summaries, temp-root identity, TUI status/title surfaces, command-popup snapshots, browser proxy discovery, and git-root handling. Scoped Clippy,
just fix,just fmt, Cargo metadata, targeted Prettier, workflow syntax validation,git diff --check, and the rusty_v8 Bazel checksum check are green. A local cross-Windowscargo checkcould not complete on macOS because the host lacks MSVC C headers (assert.h), so hosted Windows CI remains the source of truth for the Windows-only reader and ConPTY changes. The repository-wide local suite was not re-run because the earlier attempt exhausted the local volume while linking after generating 171.4 GiB of artifacts. GitHub full CI has not yet completed successfully on this branch; replacement current-head run30218796900is active. No broad-suite result currently backs this candidate.Final Opus Gate
Independent Opus reviews covered every newly exposed full-CI failure class, including provider auth, MCP versioning, OAuth namespace storage, native Windows ARM archives, browser launch/proxy behavior, ConPTY semantics, Windows sandbox capture, Linux ARM temp-root contamination, and the final combined diff. The final diff review returned SHIP for its second half; the first half found one deterministic import-order blocker, which was fixed before the successful
just fmtgate. No review considers this branch merge-ready.Tracked merge-readiness debt includes:
pending_restorewaivers and the additional unrecorded deletion audit above.IDENTITY-1: six paths are waived pending the canonical identity decision — the candidate README is still the upstream OpenAI README, and the TUI status-card surface (card.rs,helpers.rs,rate_limits.rs, its credits-and-limits snapshot, andstatus/tests.rs) remains reverted to upstream.MODEL-1: ten of the eleven guardedcodex-rs/models-managerpaths, includingmodels.jsonand default-model logic, are waived and run upstream until the catalog comparison lands; onlyBUILD.bazelis unwaived.AGENT-1: external-agent config, agent-jobs and multi-agent v2 handlers, restore paths, and external-agent migration remain absent or reverted;auto_review/guardian_revieware guarded but not yet accepted evidence.--ignoredrun. Browser launch retry classification and proxy-isolation behavior remain covered by ordinary unit tests.legacy_tty_job_terminates_and_preserves_descendantsis explicitly ignored because nested PowerShell startup under legacy ConPTY is unreliable on hosted Windows; non-TTY capture preservation and ordinary ConPTY I/O remain covered, but this lifecycle case needs a deterministic native helper before it can rejoin blocking CI.RELEASE-1release/install smoke remains outstanding; offline tests cannot prove external release authority.rust-v*signing paths remain unrecorded fork-safety debt: Windows Azure Trusted Signing and upstream macOS AKV signing are tag-only and fail closed without fork credentials, but they are outside Cut over to converged Codex Lab baseline and primary harness #343's macOS keychain gate.on-failuretoon-requestbehavior.CI Plan
code/upstream-snapshot-428at5450effdb1.code/upstream-snapshot-428-full-cifast-forwarded to the same SHA.30219151896, Codex Lab app30219151796, V8 canary30219151800, full CI30219149932, and explicitly dispatched Bazel30219215416. At the prior head4ac9473b0d, blocking CI exposed two stale convergence-waiver entries, while the other long-running lanes were superseded by the focused waiver cleanup at this head. At86a844dacf, blocking CI, the app build, and Bazel succeeded; V8 canary was still in progress when superseded, while full CI exposed the deterministic failures corrected in the following commits. The separatesdk-integration.ymlworkflow is postmerge/dispatch-only and is not registered on the default branch, so it cannot be dispatched for this draft branch and remains unvalidated here. Bazel is dispatch-only, exercises hosted macOS/Linux plus Windows paths (including a repository-runner release-build lane), and is not part of blocking CI. Current-SHA failures will be diagnosed rather than hidden by stale runs..sha256verification is unchanged, and no fork release path opts into cross-repository artifacts.Refs #428
Refs #126
Cutover remains gated by #343.