mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +00:00
rust-v0.147.0
391
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
be6e8eac02 |
## New Features
- Install portable Agent Plugins and search across local, personal, workspace, and remote plugin catalogs. (#36544, #36409, #36919, #36796) - Organize conversations into persistent, manually ordered sections and browse long transcripts incrementally. (#35722, #36007, #36380, #36948, #36950) - Enable automatically reviewed approvals with the new `--approve-for-me` CLI flag. (#36373) - Import Cursor-managed skills and synchronize changes to imported Claude and Cursor conversations without creating duplicates. (#36361, #36356, #35623) - Support the opt-in MCP 2026-07-28 protocol, including paginated discovery, multi-round requests, and non-blocking server startup. (#35724, #35725, #35590, #35742) - Enable cached web search and remote conversation compaction for Amazon Bedrock. (#36938, #36981) ## Bug Fixes - Redact secrets and complete bearer tokens from displayed commands and replayed conversation history. (#36893, #36908) - Prevent lost or stalled terminal input when focus returns, MCP servers initialize, or Ghostty handles keyboard shortcuts. (#35649, #35957, #36834) - Correct rendering and cursor positioning for Japanese characters, emoji, hyperlinks, and text near viewport boundaries. (#35960, #35962, #37166) - Properly interrupt Windows background processes and handle Windows filesystem paths consistently. (#35655, #35851, #37129) - Require explicit trust for unfamiliar local projects and enforce managed authentication restrictions before credentials are used. (#36960, #37132) - Harden plugin isolation and deny network access when policy updates fail. (#37027, #36967, #36037) ## Documentation - Improve the bundled OpenAI documentation skill with targeted official-source lookup and clearer guidance for Codex, model selection, and API workflows. (#36014) ## Chores - Upgrade the MCP SDK to 3.0.0, Ratatui to 0.30.2, and V8 to 150.4.0. (#36001, #35959, #35831) - Secure macOS release notarization using Azure Key Vault instead of exporting private signing keys. (#37154) - Remove the deprecated `codex exec --full-auto` flag; use `--sandbox workspace-write` instead. (#36054) - Stop publishing redundant Linux bundle archives; use the standard `codex-package-<target>` release archives. (#36342) ## Changelog Full Changelog: https://github.com/openai/codex/compare/rust-v0.146.0...rust-v0.147.0 - #35590 Expose cached MCP tools before server startup @copyberry - #35594 Recommend longer waits in the v2 wait_agent schema @copyberry - #35595 Allow alpha hotfix versions in R2 releases @copyberry - #35597 Add metrics for extension-rendered skill catalogs @copyberry - #35607 Record metrics for empty skill catalogs @copyberry - #35608 Support model-owned token budget defaults @copyberry - #35621 Skip restored token usage replay for exec resumes @copyberry - #35623 Parse Claude and Cursor session records separately @copyberry - #35642 Make OpenTelemetry provider shutdown idempotent @copyberry - #35644 Preserve thread metadata when rollout files are missing @copyberry - #35649 Preserve TUI input when terminal focus returns @copyberry - #35652 Enable network policy callbacks for remote exec @copyberry - #35653 Test developer instruction inheritance for multi-agent workers @copyberry - #35655 Terminate Windows non-TTY processes on interrupt @copyberry - #35656 Preserve multi-agent settings across config representations @copyberry - #35661 Place host skills before permission instructions @copyberry - #35663 Evaluate character matching over skill routing metadata @copyberry - #35665 Fix the async watcher test harness on Windows @copyberry - #35668 Expose the network proxy spec constructor @copyberry - #35670 Raise the Windows exec yield floor to 10 seconds @copyberry - #35671 Route curated plugins by authentication mode @copyberry - #35675 Prepare MCP and plugin recommendations concurrently @copyberry - #35678 Preserve paginated thread metadata across resumes @copyberry - #35685 Load cloud-managed profiles for `codex sandbox` @copyberry - #35688 Point crossterm patch to the OpenAI OSS fork @copyberry - #35689 Preserve item timestamps in thread history projections @copyberry - #35691 Include empty-preview threads in relationship listings @copyberry - #35693 Refresh the subagent picker in the background @copyberry - #35695 Honor the configured SQLite home in the logs client @copyberry - #35708 Add configurable developer instructions for v2 subagents @copyberry - #35715 Support streaming bodies in route-aware HTTP requests @copyberry - #35717 Reuse route-aware clients for OpenAI file uploads @copyberry - #35720 Upgrade rmcp to 3.0.0-beta.3 @copyberry - #35721 Honor disabled code mode fallback without a process host @copyberry - #35722 Add persisted sections for organizing threads @copyberry - #35724 Add MCP 2026-07-28 discovery support @copyberry - #35725 Complete MCP 2026 client support @copyberry - #35738 Add bounded metadata for executed tool calls @copyberry - #35742 Avoid blocking turns on optional MCP startup @copyberry - #35744 Keep agent registry identities consistent @copyberry - #35766 Emit host skill budget warnings from world state @copyberry - #35769 Share the skills budget across host and executor catalogs @copyberry - #35772 Throttle models cache TTL renewals @copyberry - #35773 Scale skill metadata budgets with context windows @copyberry - #35777 Resolve MCP tool catalogs concurrently @copyberry - #35779 Load thread titles concurrently during session startup @copyberry - #35785 Support self-serve Business ProLite accounts @copyberry - #35787 Gate paginated thread history on the state database @copyberry - #35794 Wait for MCP readiness in the curated sync test @copyberry - #35802 Tag reports with the selected turn's model and effort @copyberry - #35806 Route MCP OAuth through configured HTTP clients @copyberry - #35814 Use configured HTTP clients for all MCP OAuth requests @copyberry - #35818 Advance latest-alpha-cli after release publishing completes @copyberry - #35821 Use the shared HTTP client for TUI network checks @copyberry - #35825 Use the shared HTTP client for announcement tips @copyberry - #35828 Enforce centralized SQLite connection creation @copyberry - #35830 Route WebRTC sideband joins to the Realtime API @copyberry - #35831 Update rusty_v8 to 150.4.0 @copyberry - #35835 Track parent turns for nested Codex requests @copyberry - #35836 Clean up cancelled MCP elicitation requests @copyberry - #35837 Expose plugin eligibility metadata in app-server summaries @copyberry - #35839 Decouple recommended plugins from tool suggestions @copyberry - #35840 Handle legacy MCP discovery prevalidation errors @copyberry - #35843 Tie remote exec servers to their parent stdin @copyberry - #35845 Support plaintext collaboration tool messages @copyberry - #35850 Preserve foreign paths in background terminal listings @copyberry - #35851 Normalize Windows namespace paths in path URIs @copyberry - #35854 Box app-server event payloads @copyberry - #35856 Resolve imported connectors by MCP server name @copyberry - #35857 Add Bazel unit test targets for Rust binaries @copyberry - #35859 Expose plugin installation timestamps in app-server summaries @copyberry - #35870 Include session titles in external agent import history @copyberry - #35874 Mark the primary environment in model context @copyberry - #35875 Allow environment readiness updates in place @copyberry - #35878 Use step environments for MCP file uploads @copyberry - #35886 Show blocked goals as stalled in the TUI @copyberry - #35887 Clean up side conversations in the background @copyberry - #35895 Inherit ready step environments when spawning agents @copyberry - #35937 Let unrelated tools run while MCP servers start @copyberry - #35941 Bound MCP namespace descriptions @copyberry - #35942 Update tests for current tool call and app-server event types @copyberry - #35944 Report direct input capability for listed subagents @copyberry - #35957 Fix TUI input queue handling during MCP startup @copyberry - #35959 Upgrade Ratatui to 0.30.2 @copyberry - #35960 Preserve hyperlink cell widths during terminal diffing @copyberry - #35962 Fix TUI layout for halfwidth Japanese sound marks @copyberry - #35982 Avoid cloning rollout history when truncating forks @copyberry - #35989 Display title-only reasoning summaries in the TUI @copyberry - #35990 Test exec-server compatibility across Codex versions @copyberry - #35992 Group external agent config migration into a module @copyberry - #35997 Remove obsolete rusty_v8 146.4.0 Bazel targets @copyberry - #36001 Upgrade rmcp to 3.0.0 @copyberry - #36002 Resolve MCP file uploads with environment-native paths @copyberry - #36006 Reduce response serialization and rollout scan overhead @copyberry - #36007 Add persisted manual ordering for thread sections @copyberry - #36008 Route pet asset downloads through the shared HTTP client @copyberry - #36011 Share optional MCP startup grace across connection sets @copyberry - #36014 Refine OpenAI docs skill source routing @copyberry - #36020 Avoid cloning ignored analytics notifications @copyberry - #36030 Increase the app-server tracing test stack size @copyberry - #36031 Load cloud-managed servers in MCP CLI commands @copyberry - #36033 Use the shared HTTP client in codex-protocol @copyberry - #36035 Exit the stdio app-server when its connection closes @copyberry - #36036 Allow naming forked chats from the TUI @copyberry - #36037 Deny network access when an allow amendment fails @copyberry - #36039 Limit MCP catalog pagination @copyberry - #36043 Document the Responses API proxy reqwest exception @copyberry - #36045 Distinguish unknown MCP authentication status @copyberry - #36047 Extract MCP environment headers into a local variable @copyberry - #36049 Keep tool-call metrics out of Statsig exports @copyberry - #36051 Avoid overwriting symlinked migration targets @copyberry - #36054 Remove legacy `--full-auto` handling from `codex exec` @copyberry - #36055 Expose MCP read-only hints in tool call items @copyberry - #36076 Remove codex-core's direct reqwest dependency @copyberry - #36078 Route Ollama through the shared HTTP client @copyberry - #36083 Handle fractional rate limits in thread history projection @copyberry - #36092 Correlate image requests and explicit interrupts with turns @copyberry - #36119 Unify tool runtime assembly before router construction @copyberry - #36120 Delegate readiness waits to tool runtimes @copyberry - #36121 Sandbox executor skill resource reads @copyberry - #36124 Respect filesystem permissions during capability discovery @copyberry - #36127 Centralize tool registration and protect host tools @copyberry - #36128 Preserve delegated tasks across remote compaction @copyberry - #36129 Resolve normalized tool name collisions in code mode @copyberry - #36133 Preserve executor workspace permissions for apply_patch @copyberry - #36138 Isolate apply-patch permission test variants @copyberry - #36139 Bound the code mode output termination test @copyberry - #36140 Wait for memory consolidation shutdown before finishing jobs @copyberry - #36146 Stabilize approval scenario tests @copyberry - #36148 Harden the file change approval integration test @copyberry - #36149 Strengthen session file change approval coverage @copyberry - #36165 Stabilize file approval replay test @copyberry - #36166 Make pending realtime sideband test deterministic @copyberry - #36167 Harden the auto-review model override test @copyberry - #36168 Make tool telemetry tag collection synchronous @copyberry - #36171 Test workspace-root patch protection for metadata @copyberry - #36177 Test remote Guardian network approval scoping @copyberry - #36181 Record attempted tool calls in response metadata @copyberry - #36183 Use permission profiles throughout sandbox execution @copyberry - #36184 Coalesce concurrent remote metadata requests @copyberry - #36187 Refresh environment dates from the configured clock @copyberry - #36188 Make thread history projection resilient to malformed rollouts @copyberry - #36191 Label explicit skill injection metrics @copyberry - #36194 Avoid shifting bytes in streaming output buffers @copyberry - #36207 Record normalized sandbox violation events @copyberry - #36212 Precompute app-server protocol exports @copyberry - #36217 Run code mode exclusively through the standalone host @copyberry - #36218 Expose connector candidates in external agent detection @copyberry - #36221 Ignore passthrough metadata when reconciling rollout items @copyberry - #36223 Preserve executor paths in read command actions @copyberry - #36228 Support Enterprise automation account plans @copyberry - #36237 Ignore symbolic slash-tmp permissions on Windows @copyberry - #36239 Refresh precomputed app-server protocol exports @copyberry - #36264 Prefer the bundled resource for the code mode host @copyberry - #36271 Derive report prompt hashes from persisted rollouts @copyberry - #36306 Restrict hosted MCP credentials to local environments @copyberry - #36309 Use the host skill provider catalog in world state @copyberry - #36310 Isolate MCP OAuth credentials by environment @copyberry - #36311 Include skills in debug prompt input output @copyberry - #36327 Preserve discovery order for host skill path aliases @copyberry - #36329 Restrict `shell_command` to a single local environment @copyberry - #36336 Detect connectors used in external agent sessions @copyberry - #36339 Enable skills in the MCP server @copyberry - #36342 Stop publishing legacy Linux bundle archives @copyberry - #36350 Require explicit sandbox permissions with shell justifications @copyberry - #36351 Use model catalog collaboration mode messages @copyberry - #36354 Pass sessions directly to session tasks @copyberry - #36355 Keep MCP tool calls bound to their thread @copyberry - #36356 Sync updates to imported external agent sessions @copyberry - #36357 Use the step-scoped router for tool execution @copyberry - #36359 Consolidate MCP config editing in codex-core @copyberry - #36360 Use MCP bindings as the step tool catalog @copyberry - #36361 Migrate Cursor-managed skills into Codex @copyberry - #36364 Move skill catalog rendering out of core @copyberry - #36365 Add strict automatic review for MCP elicitations @copyberry - #36367 Keep effective tool exposure in the registry @copyberry - #36372 Run native Windows Bazel tests with MSVC @copyberry - #36373 Add an `--approve-for-me` CLI flag @copyberry - #36374 Enable sandboxed V8 for code mode @copyberry - #36378 Load local session pickers from the state DB first @copyberry - #36380 Add thread section management APIs @copyberry - #36384 Load turn summaries with paginated queries @copyberry - #36385 Add acknowledged user message submission to core @copyberry - #36388 Track image preparation details in turn analytics @copyberry - #36389 Enforce single-writer ownership for all thread histories @copyberry - #36393 Avoid redundant filesystem probes @copyberry - #36402 Declare the experimental plugin search API @copyberry - #36408 Allow custom Codex instructions for realtime transitions @copyberry - #36409 Implement remote plugin search @copyberry - #36410 Make user input blocking behavior explicit @copyberry - #36411 Use Git repositories as pre-tool hook test markers @copyberry - #36413 Add a realtime delegation acknowledgement control @copyberry - #36440 Extract exec-server request dispatching @copyberry - #36482 Avoid querying terminal size on every TUI redraw @copyberry - #36485 Increase remote plugin bundle size limits @copyberry - #36507 Retain attempted tool metadata across prompts @copyberry - #36511 Support two-stroke TUI key chords @copyberry - #36534 Raise the MCP catalog item limit to 2,048 @copyberry - #36544 Support portable Agent Plugins throughout installation @copyberry - #36632 Preserve SQLite thread metadata during goal mutations @copyberry - #36635 Expose onboarding hints in login completion notifications @copyberry - #36641 Capture rollout budget units from response usage @copyberry - #36715 Use provider-reported rollout budget units @copyberry - #36716 Deduplicate MCP resource operation handling @copyberry - #36727 Simplify turn metadata state ownership @copyberry - #36729 Correlate code mode tool analytics with model responses @copyberry - #36732 Stabilize the cloud environment HTTP test @copyberry - #36734 Deduplicate MCP resource list handling @copyberry - #36740 Store turn skill state in extension data @copyberry - #36742 Simplify contextual user fragment registration @copyberry - #36744 Store the extension registry directly in its builder @copyberry - #36745 Consolidate apply_patch runtime execution @copyberry - #36757 Wait for patch events before reading shell snapshots @copyberry - #36759 Harden the TUI focus palette regression test @copyberry - #36764 Avoid building code-mode definitions during registration @copyberry - #36769 Stabilize the startup Git enrichment integration test @copyberry - #36770 Stabilize deferred goal fork testing @copyberry - #36771 Harden Linux managed proxy helper lifecycles @copyberry - #36772 Raise the host-owned Codex Apps catalog limit @copyberry - #36773 Derive the active user config layer from the layer stack @copyberry - #36774 Clarify config layer iteration APIs @copyberry - #36779 Stabilize network policy event capture in concurrent tests @copyberry - #36781 Add per-surface MCP tool exposure controls @copyberry - #36782 Add Guardian session reuse and interruption tests @copyberry - #36787 Consolidate model instructions in `ModelMessages` @copyberry - #36792 Gate plugin usage instructions by model capability @copyberry - #36793 Terminate timed-out Git process trees @copyberry - #36796 Add Agent Plugins MCP config parsing @copyberry - #36797 Normalize rusty_v8 checksum manifest line endings @copyberry - #36800 Avoid reinjecting permissions after command approvals @copyberry - #36807 Extract audio preparation into a utility crate @copyberry - #36808 Prefer SQLite names for local session archive commands @copyberry - #36809 Prefer the state database for `exec resume --last` @copyberry - #36810 Add MCP client conformance regression gates @copyberry - #36811 Honor per-environment login shell policy @copyberry - #36812 Add a dual-WebSocket transport for code mode @copyberry - #36815 Identify agents by name in token budget context @copyberry - #36822 Fix typo in approval resolver name @copyberry - #36825 Consolidate approval telemetry context @copyberry - #36830 Time out stalled code-mode host requests @copyberry - #36834 Avoid requesting key-release events in Ghostty @copyberry - #36840 Keep API request metrics out of Statsig exports @copyberry - #36856 Support deferred loading for freeform tools @copyberry - #36857 Support custom tools in namespaces @copyberry - #36862 Consolidate thread spawning behind a request object @copyberry - #36871 Parallelize R2 asset publishing with DotSlash @copyberry - #36877 Move executor skill bundle loading into the skills extension @copyberry - #36880 Move direct executor skill discovery into the skills extension @copyberry - #36882 Preserve complete MCP namespace descriptions @copyberry - #36884 Add host skill root loading @copyberry - #36892 Support leaf models in multi-agent v2 @copyberry - #36893 Redact secrets from app-server command execution items @copyberry - #36895 Handle late MCP startup results after lag timeout @copyberry - #36898 Avoid redundant filesystem metadata probes @copyberry - #36900 Register app tools independently of the connector list @copyberry - #36901 Propagate updated permissions to review threads @copyberry - #36903 Load skill interface metadata in the host loader @copyberry - #36904 Limit RMCP logs persisted to SQLite @copyberry - #36906 Preserve model providers when reloading v2 agents @copyberry - #36908 Improve bearer token secret redaction @copyberry - #36910 Negotiate MCP extensions per app-server session @copyberry - #36912 Read approval policy from the current turn configuration @copyberry - #36913 Move skill policy resolution into `codex-skills` @copyberry - #36916 Centralize app enabled-state evaluation @copyberry - #36917 Test explicit plugin mentions with disabled apps @copyberry - #36919 Merge local plugins into plugin search results @copyberry - #36921 Move the host skills service into the skills extension @copyberry - #36924 Reject implicitly discovered bare Git repositories @copyberry - #36930 Read turn permissions from the current configuration @copyberry - #36935 Trust undecided local projects automatically @copyberry - #36938 Enable cached web search for Amazon Bedrock @copyberry - #36939 Include policy approval reasons in Guardian reviews @copyberry - #36941 Use current session settings for review threads @copyberry - #36943 Move host skill root resolution into the skills extension @copyberry - #36945 Grant the blob size policy job read access to contents @copyberry - #36947 Accept user input when starting idle turns @copyberry - #36948 Paginate transcript history in the TUI @copyberry - #36949 Improve paginated TUI history loading @copyberry - #36950 Paginate TUI transcript history @copyberry - #36951 Harden paginated history handling in the TUI @copyberry - #36952 Add durable per-thread user submission queues @copyberry - #36954 Add tool registry collision policy configuration @copyberry - #36956 Keep image resize notices attached during remote compaction @copyberry - #36959 Track connectors detected in external agent sessions @copyberry - #36960 Prompt before trusting local project directories @copyberry - #36963 Link Codex attribution in pull request bodies @copyberry - #36964 Preserve working directories when importing external sessions @copyberry - #36966 Allow disabling the built-in image viewer @copyberry - #36967 Skip symlinks when installing plugins @copyberry - #36970 Make token budget context identity configurable @copyberry - #36976 Honor explicit-only orchestrator skills @copyberry - #36977 Improve connector detection for migrated sessions @copyberry - #36979 Add Fence auditing to the blob size workflow @copyberry - #36981 Enable remote compaction for Amazon Bedrock @copyberry - #36983 Preserve ChatGPT auth for trusted staging MCP servers @copyberry - #36984 Support configured ChatGPT cookies in HTTP clients @copyberry - #36986 Add process-scoped PSP routing for ChatGPT requests @copyberry - #36987 Add opt-in concurrent exec-server request dispatch @copyberry - #36989 Preserve shared bundled skill caches @copyberry - #36990 Remove legacy collaboration mode variants @copyberry - #36992 Allow injecting model catalog caches @copyberry - #36993 Support `includeTurns` reads for paginated threads @copyberry - #36998 Support deferred custom tools in tool search @copyberry - #37000 Keep shared skill caches fresh across plugin loads @copyberry - #37020 Enforce strict tool name collision errors @copyberry - #37022 Canonicalize default tools under the `functions` namespace @copyberry - #37027 Enforce Agent Plugin runtime boundaries @copyberry - #37031 Apply permission profile updates to future turn environments @copyberry - #37035 Align registry tests with canonical tool names @copyberry - #37038 Use turn environment permissions for tool execution @copyberry - #37040 Use turn environment permissions for context and discovery @copyberry - #37053 Reject conflicting namespace descriptions in strict tool mode @copyberry - #37055 Add safer TUI defaults for cyber models @copyberry - #37066 Preserve longer MCP source descriptions in tool search @copyberry - #37068 Fall back to per-process MCP cleanup on macOS @copyberry - #37083 Consolidate unified exec output state @copyberry - #37101 Reuse stable MCP bindings across sampling steps @copyberry - #37103 Use Luna for API-key Guardian reviews @copyberry - #37109 Bound interactive telemetry shutdown @copyberry - #37114 Add per-session code-mode execution limits @copyberry - #37128 Centralize tool approval handling in `Session` @copyberry - #37129 Make Windows path URI comparisons ASCII-case-insensitive @copyberry - #37132 Enforce managed authentication requirements locally @copyberry - #37134 Report prompt image resizing to the model @copyberry - #37144 Preserve discovery paths for symlinked skills @copyberry - #37145 Gate Apps usage instructions by model capability @copyberry - #37147 Track provisioned environment state across registration @copyberry - #37149 Project orchestrator skills through world state @copyberry - #37151 Coalesce concurrent Git status scans @copyberry - #37154 Use Azure Key Vault for macOS notarization @copyberry - #37156 Test remote environments reported ready before selection @copyberry - #37157 Harden named session lookup in the TUI @copyberry - #37162 Load host skill roots through the skills extension @copyberry - #37166 Keep textarea cursors and rendering inside the viewport @copyberry - #37167 Expose session sources to MCP contributors @copyberry - #37168 Bound remote MCP handshake HTTP requests @copyberry - #37169 Move plugin skill snapshot integration tests into core @copyberry - #37174 Centralize skill invocation helpers in `codex-skills` @copyberry - #37175 Add legacy rollout migration to paginated history @copyberry - #37177 Move explicit skill selection into the skills crate @copyberry - #37178 Preserve image transparency metadata in app-server items @copyberry - #37188 Reserve the `tool_search` namespace for the search tool @copyberry - #37189 Track multi-agent usage hints in world state @copyberry |
||
|
|
cc03518c36 |
Extract audio preparation into a utility crate (#36807)
## What changed - Add `codex-utils-audio` as a workspace crate for canonicalizing audio inputs and estimating their token usage. - Update `codex-core` to consume the new crate while preserving the existing audio preparation tests. GitOrigin-RevId: d719ecc08363ef52778aa37f3df0ca14f7778324 |
||
|
|
51c9ed6d4f |
Add per-surface MCP tool exposure controls (#36781)
## Why MCP tools can be exposed directly, discovered through tool search, or called from Code Mode. Servers need to be able to opt out of any of these surfaces without disabling their tools everywhere. ## What changed - Add `omit_tools_from` to MCP server configuration, accepting any combination of `direct`, `deferred`, and `code_mode`. - Apply the exclusions independently when building direct, deferred, and Code Mode tool surfaces while keeping omitted tools registered for permitted uses. - Remove client-private `_meta` fields from MCP results returned to Code Mode. - Include the new setting in the configuration schema and MCP config serialization. ## Testing - Cover every exposure combination across Code Mode, Code-Mode-only sessions, tool search, direct-only namespaces, and prefixed and unprefixed MCP names. - Verify direct and nested execution paths, parallel-call support, config round-tripping, and `_meta` filtering. GitOrigin-RevId: 12dfcb78bb5c5ecf4d70f38a8b5022792463a27f |
||
|
|
97576b1794 |
Run code mode exclusively through the standalone host (#36217)
## What changed - Move the V8 implementation into a dedicated `codex-code-mode-runtime` crate used by `codex-code-mode-host`, removing the embedded runtime fallback from the Codex process. - Resolve the host executable from the active installation layout and check its availability before selecting tools. - Fall back to direct tools with a one-time warning when optional code mode is unavailable. Keep `code_mode_only` and `disable_in_process_fallback` configurations fail-closed. ## Testing - Cover host discovery for standalone and package layouts, including missing hosts and symlinks. - Verify direct-tool fallback, one-time warnings, and fail-closed code-mode-only behavior. GitOrigin-RevId: 5aa3c6f1db148b2231fc24089a2ee0e2b00dbddb |
||
|
|
acd540f158 |
Precompute app-server protocol exports (#36212)
## Why Normal app-server protocol builds do not need the `ts-rs` and `schemars` implementations used to generate schema exports. ## What changed - Embed compressed stable and experimental TypeScript and JSON schema exports, and serve the existing export APIs from those artifacts. - Use no-op schema derives in non-test builds while keeping the real generators available for fixture regeneration and tests. - Move schema fixture regeneration behind a Python helper and update `just write-app-server-schema --experimental` to refresh the experimental embedded exports. ## Testing - Verify embedded exports match freshly generated stable and experimental schemas. - Verify export options and on-disk output remain compatible. GitOrigin-RevId: e8536338b457e6eec34bdf29ec0684144bd13734 |
||
|
|
a05bcda3db |
Upgrade rmcp to 3.0.0 (#36001)
## What changed - Update the Rust MCP SDK from `3.0.0-beta.3` to `3.0.0` and adapt to its renamed metadata and server discovery types. - Accept discovery responses without server identity metadata, using the configured server name as a fallback, and rely on the SDK's native support for namespaced server identity metadata. - Preserve typed OAuth HTTP errors so transport failures, cross-origin redirects, and transient HTTP responses are reported instead of being treated as anonymous access. ## Testing - Cover modern discovery with namespaced or missing server identity over HTTP, SSE, and stdio. - Cover OAuth discovery error propagation for transport failures, redirects, and transient status codes. GitOrigin-RevId: 12c1e45136cca89ce4fb15986c2b5df14608682a |
||
|
|
00cb5c465b |
Upgrade Ratatui to 0.30.2 (#35959)
## What changed - Upgrade `ratatui`, `ratatui-macros`, `crossterm`, and `ansi-to-tui`, and adapt the TUI to their updated rendering, backend, color-conversion, and cell APIs. - Use Ratatui's cell-width and continuation-cell metadata when mapping OSC 8 hyperlinks so links remain aligned across wrapped wide glyphs and halfwidth characters with dakuten. - Preserve explicit hyperlinks in the sign-in success screen and empty MCP state without embedding escape sequences in the text passed to Ratatui. ## Testing - Add regression coverage for hyperlink placement across wide glyphs and halfwidth dakuten, hyperlink preservation in onboarding and MCP output, and display-width handling. GitOrigin-RevId: 8460873e5a266923acd0417bc46264845eab0134 |
||
|
|
12b3e88028 |
Update rusty_v8 to 150.4.0 (#35831)
## What changed - Upgrade the Rust `v8` crate to `150.4.0` and the Bazel V8 source to `15.0.245.2`. - Refresh the prebuilt archives, checksums, LLVM source revisions, Bazel targets, and downstream V8 patches for the new release. - Expose the pinned llvm-libc headers under V8's expected include path for source builds. GitOrigin-RevId: 91c953b2fb707b221fdd772f9ca88fb71606f70f |
||
|
|
50a7328f50 |
Enforce centralized SQLite connection creation (#35828)
## Why Direct SQLx constructors can bypass the shared SQLite configuration in `codex-state`. ## What changed - Deny SQLx pool, connection, and database creation methods through the workspace Clippy configuration for both Cargo and Bazel builds. - Exempt `codex-rs/state/src/sqlite.rs`, the centralized connection shim, from the lint. - Document that the deny list must be audited when upgrading SQLx. GitOrigin-RevId: e20d7e83095727ac446347157782175062a100fc |
||
|
|
61de0d8fe8 |
Upgrade rmcp to 3.0.0-beta.3 (#35720)
## What changed - Update the `rmcp` model and transport integrations for `3.0.0-beta.3`. - Preserve legacy `elicitation/create` form requests, schema defaults, metadata, and wire-format compatibility while adopting the new elicitation types. - Harden OAuth discovery by using GET-first discovery without starting an MCP session, preventing cross-origin header redirects, validating authorization-server and callback issuers, and retaining compatibility with metadata that omits an issuer. - Keep stored OAuth credentials readable and avoid requiring reauthorization after transient refresh failures. ## Testing - Add coverage for legacy elicitation round trips, OAuth discovery variants, callback issuer validation, credential migration, and refresh failures. GitOrigin-RevId: 756197d26f3fd347c28c400228f6b3d06ed493b7 |
||
|
|
8c72d61727 |
Point crossterm patch to the OpenAI OSS fork (#35688)
## What changed - Update the `crossterm` Cargo patch to use the OpenAI OSS fork while retaining the existing revision. - Refresh the Cargo and Bazel lockfiles and the `cargo-deny` Git-source allowlist for the new repository URL. GitOrigin-RevId: 96c70abca95b9c5c8f19d1bc2d30976c5797ba8c |
||
|
|
265cd2e100 |
Initialize execution environments with the final HTTP policy (#34995)
## Why The TUI must inspect the default execution environment before loading its final configuration. Initializing the environment manager at that point can give startup services the bootstrap HTTP policy instead of the effective policy after managed requirements are applied. ## What changed - Split environment discovery from manager construction so callers can inspect the default environment without starting remote connections. - Build the environment manager after final configuration loading and pass its resolved `HttpClientFactory` through all construction paths. - Add shared test support for managers that use the legacy default HTTP policy. ## Testing - Cover connection-free environment discovery and explicit HTTP policy propagation. - Verify TUI startup services use the final managed `respect_system_proxy` value. GitOrigin-RevId: 928fa31e6b4bcfbe1a121cade2f351427fdfa0f4 |
||
|
|
88eb3a2b8a |
Enable git attribution across Codex entry points (#34819)
## What changed - Install the git attribution extension in the app server, MCP server, and `codex debug prompt-input` so authenticated workspace policy controls the commit and pull request attribution instructions sent to the model. - Resolve attribution settings from the process-level ChatGPT base URL, independent of per-thread or per-tool configuration overrides. - Treat git attribution as contextual developer content when mapping model events. ## Testing - Cover policy fetch retries, workspace switches, rollbacks, cold thread resumes with legacy instructions, MCP tool calls, and prompt-debug output. GitOrigin-RevId: 57d182c432c20d7c1c6c429057b6163c9f32088d |
||
|
|
ab816f3ca0 |
Add the git attribution extension (#34769)
## What changed - Add a `codex-git-attribution` context contributor that resolves the workspace's `commit_attribution_enabled` setting and supplies matching commit and pull request instructions through World State. - Cache resolved policy by authentication generation, recover from unauthorized responses, and fail disabled on timeouts or settings errors with deferred retries. - Handle enabled, disabled, and legacy attribution fragments so policy changes replace stale instructions without duplicating attribution. ## Testing - Cover World State transitions, policy resolution after unauthorized responses, and authentication changes during an in-flight settings request. GitOrigin-RevId: 6f733e708b5c960ba5e90751110910a03d1ba2df |
||
|
|
687f05cb94 |
Remove CSV-backed agent jobs (#34413)
## What changed - Remove the `spawn_agents_on_csv` and `report_agent_job_result` tools and their agent-job runtime and state models. - Drop the legacy `agent_jobs` and `agent_job_items` tables during state database migration. - Keep `features.enable_fanout` and `agents.job_max_runtime_seconds` accepted as no-op compatibility settings while omitting them from the generated configuration schema. ## Testing - Verify upgrades remove both legacy agent-job tables. - Verify the removed feature and configuration keys still parse without taking effect. GitOrigin-RevId: 8cc3337da78c67162229f02f40a747f503542646 |
||
|
|
6f785632b0 |
Preserve audio across history and tool outputs (#34385)
## Why Audio attachments could be dropped from tool outputs and reconstructed thread history, while inline base64 payload size could overstate their model context cost. ## What changed - Preserve remote and local audio attachments in legacy user-message events and thread history. - Keep audio from function and custom tool outputs when the model supports it and the output fits the truncation budget; otherwise replace it with an omission marker. - Estimate inline audio cost from its duration, with a serialized-size fallback for malformed or unsupported data URLs, so compaction and truncation use model-visible cost instead of raw base64 size. - Replace audio in messages and tool outputs with an explanatory placeholder for models without audio input support. ## Testing Add coverage for history round trips, dynamic tool responses, modality filtering, duration-based context estimates, output-budget truncation, and remote compaction. GitOrigin-RevId: 5ed4628850a668f8383b7cd73db71b144cc02cd1 |
||
|
|
6bd3f5e3db |
Centralize SQLite connection configuration (#33938)
## What changed - Add `SqliteConfig` as the shared entry point for read-write and read-only SQLite pools. - Apply consistent WAL, synchronization, auto-vacuum, busy-timeout, logging, and pool-size settings to writable Codex databases. - Route state runtime, audit, CLI, and test database connections through the shared configuration. ## Testing - Run migration tests against temporary on-disk databases opened through `SqliteConfig`, including the concurrent-writer repair case. GitOrigin-RevId: e3946b98bde04c47574532ac8b1a7bb2b03edd97 |
||
|
|
c1862b8db4 |
Add occurrence search for paginated threads (#33907)
## What changed - Add the experimental `thread/searchOccurrences` app-server method for case-insensitive literal search across visible user messages and final assistant messages without replaying the thread. - Return paginated snippets with UTF-16 match ranges and `thread/turns/list` cursors for navigating to each matching turn. - Index persisted item types to efficiently select searchable messages from paginated thread history. ## Testing - Add an app-server integration test covering pagination, steering messages, final-answer selection, Markdown normalization, and UTF-16 offsets. GitOrigin-RevId: e80160e0f83eb4e5db8de862307085093bee362b |
||
|
|
b93dcf341c |
Remove the unused realtime WebRTC crate (#33639)
## What changed - Remove `codex-realtime-webrtc` from the Cargo workspace and Bazel build, along with its native WebRTC dependency graph. - Use `blake3`'s pure Rust implementation on `x86_64-pc-windows-gnullvm`, where the Bazel lint toolchain cannot reliably materialize the crate's native x86 assembly archives. GitOrigin-RevId: c382d888cd7ada7a17a7a0dcbdecbe00744f5055 |
||
|
|
83a4187837 |
Run detached reviews as review-agent turns (#33156)
## Why Detached reviews should behave like ordinary forked turns so clients get the normal steering, tool, permission, and item-stream behavior. ## What changed - Add a bundled `$review-agent` skill with read-only, defect-first review guidance. - Start detached reviews through `AgentRunner` with a target-specific prompt that explicitly references the bundled skill. Keep inline reviews on the existing review-mode flow. - Continue emitting the detached review thread and turn identifiers through the app-server API. ## Testing - Update the detached review integration test to verify the forked turn prompt, ordinary turn completion, and selection of the bundled skill when a user skill has the same name. GitOrigin-RevId: 979664cd80800fb0d51eabdc4e3211da90c12db9 |
||
|
|
6629e08702 |
Add an agent extension runner (#33076)
## What changed - Add `codex-agent-extension` with an `AgentRunner` that starts a resolved agent prompt in a thread forked from its parent. - Propagate the invocation's trace context, select the configured execution environments, submit the initial prompt, and return the spawned thread and turn identifiers. - Reject empty agent prompts and report when the owning thread manager is no longer available. ## Testing - Add an integration test that verifies the agent runs in a forked thread, returns the started turn identifier, completes the turn, and sends the resolved prompt to the model. GitOrigin-RevId: ffb805efabadf758969d6611a6867db6fa9f059a |
||
|
|
bc8222b8d9 |
Prepare external agent migration for source adapters (#32884)
## What changed - Add an optional `source` selector to `externalAgentConfig/detect`, while preserving the existing behavior for omitted, `null`, and unrecognized values. - Pass `claude-code` as the source for TUI detection and import requests. - Move source-specific migration behavior behind an adapter boundary and consolidate session migration into `codex-external-agent-migration`. ## Testing - Cover explicit, omitted, and unknown detection source values with app-server protocol tests. - Add unit coverage for the extracted migration and hook helpers. GitOrigin-RevId: 63bd3dcb485f3ad7bd996022db4e351506aeea77 |
||
|
|
656a2d0905 |
Remove the legacy exec policy engine (#32093)
## What changed - Delete the `codex-execpolicy-legacy` crate, its default policy, and its tests. - Remove the crate from the Cargo and Bazel workspaces and clean up its unused dependencies. - Remove the legacy matcher reference from the current exec policy documentation. GitOrigin-RevId: ee756958b46bf759ad43dec8aa1379c1cd4d8b0d |
||
|
|
e621d7df8c |
core: preserve Responses WebSockets with system proxy (#31441)
## Why Responses WebSockets are the normal lower-latency transport for WebSocket-capable providers. They must not bypass an OS-selected proxy when `features.respect_system_proxy` is enabled, but disabling WebSockets whenever the feature is enabled would impose a substantial performance penalty. Merged PR #31622 introduced the reusable proxy-aware WebSocket transport. This PR makes the Responses API its first consumer so the existing fast path uses the same effective proxy and trust policy as HTTP. ## What changed - Register `codex-websocket-client` as a workspace dependency and use it from `codex-api`. - Feed the shared crate’s route-independent `WebSocketConnection` into the existing Responses message pump. - Require a configured `HttpClientFactory` for normal Responses WebSocket connections and the CLI doctor probe, so neither path can open a connection without consulting the effective proxy policy. - Pass the session factory from `core` and the effective configuration factory from `doctor`. - Add an end-to-end Responses test that enables `RespectSystemProxy`, asserts the resolved policy, completes a turn over WebSocket, and verifies the connection and request counts. - Keep the existing Responses protocol handling, ping/pong pump, and session-scoped HTTP fallback unchanged. The DNS, proxy, TLS, custom-CA, and Happy Eyeballs implementation and its transport tests live in merged PR #31622. This PR deliberately contains only the Responses integration and does not duplicate that transport code. ## Review guide 1. `codex-rs/codex-api/src/endpoint/responses_websocket.rs` constructs the shared connector and adapts its uniform stream to the existing pump. 2. `codex-rs/core/src/client.rs` supplies the session-scoped factory for production Responses connections. 3. `codex-rs/cli/src/doctor.rs` supplies the effective configuration factory to the handshake probe. 4. `codex-rs/core/tests/suite/client_websockets.rs` covers the enabled-feature path end to end. ## Test plan - `cargo check --tests -p codex-api -p codex-core -p codex-cli` - `just test -p codex-api` - `just test -p codex-core responses_websocket_streams_with_system_proxy_feature` - `cargo shear` - `just bazel-lock-check` --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/31441). * #31637 * #31431 * #31363 * #31362 * #31361 * __->__ #31441 |
||
|
|
2780bd588f |
websocket-client: add proxy-aware connector (#31622)
## Why The route-aware WebSocket connection setup in #31441 is transport infrastructure rather than Responses API protocol logic. Landing it first in a dedicated crate keeps `codex-api` focused on request and response behavior and makes the transport reusable by future WebSocket clients. WebSockets must also apply the same effective outbound proxy and custom-CA policy as HTTP without disabling the lower-latency WebSocket path. Requiring an `HttpClientFactory` when constructing the connector makes proxy-policy resolution part of the API instead of an optional call-site convention. This PR is an independent prerequisite based directly on `main`. After it merges, #31441 can rebase onto it and replace its in-crate connector with this API. ## What changed - Add a new `codex-websocket-client` workspace crate with a `WebSocketConnector` constructed from the effective `HttpClientFactory`. - Resolve every destination through that factory before connecting, then support direct connections, transport-default routing, HTTP proxies, and TLS-encrypted HTTPS proxies. - Preserve custom-CA trust for proxy and target TLS handshakes and preserve Happy Eyeballs fallback for explicit direct and proxy routes. - Expose an established `WebSocketConnection` as a uniform `Stream` and `Sink`, hiding route-specific transport types from protocol clients. - Add focused integration-style coverage for the public connector and message stream, real WSS over direct and CONNECT routes, implicit and explicit HTTPS proxy ports, and stalled-address-family fallback. ## Review guide 1. `codex-rs/websocket-client/src/lib.rs` defines the small public API and the factory-required policy invariant. 2. `codex-rs/websocket-client/src/dialer.rs` contains DNS, TCP, proxy tunneling, TLS, and WebSocket handshake setup. 3. `codex-rs/websocket-client/src/dialer_tests.rs` verifies the public stream, direct and proxied WSS paths, HTTPS port preservation, and Happy Eyeballs timing. 4. There is intentionally no consumer migration here; #31441 will become the first consumer after this prerequisite merges. ## Test plan - `cargo check -p codex-websocket-client --tests` - `just test -p codex-websocket-client` - `cargo shear` - `just bazel-lock-check` |
||
|
|
f1affbac5e |
core: support extension-owned turn items (#31283)
## Description
This PR adds a `codex-extension-items` crate for extension-owned
`TurnItem` schemas, and updates standalone image generation to start
using it via `TurnItem::Extension`.
This gives us a way to prevent Core from having to be aware of all
extension items. App-server still exposes the existing public
`ThreadItem::ImageGeneration` shape, now by wrapping the same shared
`image_generation::ImageGenerationItem` type.
The new `codex-extension-items` crate is necessary because the image gen
extension item is used by:
- `codex-image-generation-extension`, which produces it.
- `codex-tools / core`, which carry it generically.
- `codex-protocol`, which serializes it into lifecycle events and
rollouts.
- `app-server protocol`, which wraps it in public
`ThreadItem::ImageGeneration`
```
extension implementation
↓
codex-extension-items
↓
protocol / tools / app-server
```
We keep the hosted Responses API image generation as
`TurnItem::ImageGeneration` because core still owns its persistence and
legacy fanout.
### Before
Standalone image generation is implemented as an extension, but its item
representation previously lived in the core protocol. This sets the
precedent that core is aware of all extension items, which would be good
to avoid.
```
image-gen extension
→ constructs codex_protocol::ImageGenerationItem
→ emits ExtensionTurnItem::ImageGeneration
→ core matches ImageGeneration specially
→ protocol stores TurnItem::ImageGeneration
```
### After
```
image-gen extension
→ constructs extension-owned ImageGenerationItem
→ emits generic ExtensionItem
→ core transports/persists it generically
→ app-server wraps ImageGenerationItem as ThreadItem::ImageGeneration
```
Future extension items can have typed app-server APIs without adding a
new `TurnItem` variant, `ExtensionTurnItem` variant, or core emitter
match arm.
## What changed
- Added `codex-extension-items` with the closed `ExtensionItem` enum and
shared `image_generation::ImageGenerationItem` schema.
- Added generic `TurnItem::Extension(ExtensionItem)` and
`ExtensionTurnItem::Extension { item, legacy_events }` paths.
- Updated standalone image generation to emit a typed extension item and
provide its existing legacy `ImageGenerationBegin` /
`ImageGenerationEnd` events explicitly.
- Kept canonical lifecycle ordering: core emits `ItemStarted` /
`ItemCompleted` before extension-provided legacy events.
## Follow-up
Standalone web search still uses its typed special-case path. Migrating
it later would let `ExtensionTurnItem` collapse into a single
extension-item struct.
|
||
|
|
9acfe8965d |
Extract shared HTTP transport into codex-http-client (#31323)
## Why Codex-owned HTTP construction currently lives in `codex-client` alongside higher-level retry, SSE, and request-telemetry policy. That makes it difficult to apply shared network behavior consistently across crates, particularly system proxy/PAC resolution, custom CA handling, and the ChatGPT Cloudflare cookie policy. It also leaves no clear crate boundary for migrating direct `reqwest` usage behind a single Codex abstraction. This change establishes that low-level ownership boundary without changing request behavior. It builds on the system proxy support introduced in #26706, #26707, #26708, and #26709. ## What changed - Added `codex-rs/http-client` as the `codex-http-client` crate. - Moved request/response types, the concrete `reqwest` transport, custom CA handling, Cloudflare cookie policy, and macOS/Windows proxy resolution into the new crate. - Kept retry, SSE, and request-telemetry policy in `codex-client`. - Re-exported the moved API from `codex-client`, including compatibility aliases for `CodexHttpClient` and `CodexRequestBuilder`, so existing consumers do not change in this PR. - Moved the existing proxy and custom-CA tests with their implementation. ## Scope boundary This PR deliberately stops at the crate extraction. Stacked follow-up #31331 migrates downstream imports from `codex-client` to `codex-http-client`, keeping this change focused on ownership and compatibility rather than mixing in repository-wide call-site churn. ## Review guide GitHub reports 30 changed files, of which 17 are detected renames. A useful review order is: 1. Review the new boundary in `codex-rs/http-client/Cargo.toml` and `codex-rs/http-client/src/lib.rs`. 2. Review `codex-rs/codex-client/Cargo.toml` and `codex-rs/codex-client/src/lib.rs` for what remains in the higher-level crate and how compatibility is preserved. 3. Treat the renamed implementation and test files as moves. Their meaningful edits are limited to crate paths and normalizing the new crate's type names to `HttpClient` and `RequestBuilder`. 4. Review `codex-rs/Cargo.toml`, `codex-rs/Cargo.lock`, and the two `BUILD.bazel` files as mechanical workspace integration. ## Test plan - `just test -p codex-http-client -p codex-client` (38 tests) - Compile-checked the unchanged `codex-api`, `codex-backend-client`, `codex-cloud-tasks`, `codex-exec-server`, `codex-login`, and `codex-model-provider` consumers against the compatibility re-exports. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/31323). * #31331 * __->__ #31323 |
||
|
|
0ccb676dd0 |
fix: address quick-xml security advisories (#30941)
## Why The `cargo-deny` job on `main` began failing after [RUSTSEC-2026-0194](https://rustsec.org/advisories/RUSTSEC-2026-0194) and [RUSTSEC-2026-0195](https://rustsec.org/advisories/RUSTSEC-2026-0195) flagged the workspace `quick-xml 0.38.4`. Both denial-of-service issues are fixed in `quick-xml 0.41.0`. A `quick-xml 0.39.4` copy must temporarily remain because the latest `plist` and `wayland-scanner` releases have not adopted 0.41 yet. Neither retained path accepts attacker-controlled XML at runtime: `plist` does not exercise the affected APIs, and `wayland-scanner` parses trusted protocol definitions at build time. Compatible upstream bumps are already open in [rust-plist#191](https://github.com/ebarnard/rust-plist/pull/191) and [wayland-rs#938](https://github.com/Smithay/wayland-rs/pull/938). ## What changed - Upgrade the workspace `quick-xml` dependency used by `codex-protocol` to 0.41.0. - Refresh `Cargo.lock` and `MODULE.bazel.lock`; this also updates `plist` to 1.9.0 and `wayland-scanner` to 0.31.10. - Add synchronized, temporary `cargo-deny` and `cargo-audit` exceptions for the trusted `quick-xml 0.39.4` paths, with both upstream releases recorded as the removal condition. ## Testing - `cargo deny check` - `just test -p codex-protocol` (238 tests) - `just bazel-lock-check` |
||
|
|
d047c33a1b |
fix(remote-control): avoid server token refresh retry storms (#30201)
## Why Remote-control websocket reconnects and pairing requests proactively refresh their server token. When `/server/refresh` returns a transient error such as `502`, the still-valid token was discarded as a usable connection path, causing reconnect failures and repeated refresh attempts that could amplify an upstream incident. ## What Changed - Start proactive refresh five minutes before token expiry and distinguish it from a required refresh for missing or expired tokens. - Continue websocket and pairing operations with the existing valid token after `429`, `5xx`, or timeout failures. - Share an in-memory `next_refresh_at` throttle across websocket and pairing callers, honoring both `Retry-After` formats and otherwise using a jittered 24–36 second delay. - Keep required refreshes strict, preserve `404` enrollment replacement, and clear token/throttle state for `401` and `403` auth recovery. - Preserve refresh response metadata internally and add focused wire-level and integration coverage. ## Verification Added behavioral coverage proving that: - a valid near-expiry token still completes websocket and pairing requests after transient refresh failures; - `Retry-After` suppresses a subsequent refresh across websocket and pairing callers; - request and response-body timeouts are classified as transient; - an expired token, including one that expires during refresh, cannot proceed to websocket connection; - auth failures clear the attempted token without overwriting a concurrently rotated token. |
||
|
|
3095ea9c3d |
Project selected plugin runtime by environment availability (#30093)
## Why
Selected plugin metadata is stable, but MCP processes are live runtime
state. They need different lifetimes:
- the MCP extension caches manifest, MCP, and connector declarations for
each stable selected root;
- each model step projects that cached metadata through the roots that
resolved as ready for that exact step;
- the MCP manager is rebuilt only when that availability projection
changes.
This matches executor skills: both features consume the same resolved
step roots instead of inferring readiness from the turn's selected
environments.
## Behavior
```text
E1 not ready for this step
-> no E1 MCP servers or connectors
-> cached plugin metadata stays in ext/mcp
E1 becomes ready
-> reuse cached metadata
-> publish one MCP runtime containing E1 capabilities
same ready roots on the next step
-> reuse the exact runtime; no rediscovery and no MCP restart
resume
-> create new extension thread state and a new MCP runtime
```
All model-facing consumers use the same step snapshot:
```text
resolved selected roots
|
v
extension MCP/connector projection
|
v
{ MCP config, connector snapshot, MCP manager }
|
+-> advertise model tools
+-> build app/connector tools
+-> execute MCP calls
```
## Cache contract
The existing MCP extension owns a cache keyed by the full
`SelectedCapabilityRoot`:
```rust
let state = thread_store.get_or_init(SelectedExecutorPluginMcpState::default);
```
The cache lives with extension thread state. Environment availability
filters projection but does not invalidate metadata. Resume creates new
thread state. There is no file watcher or executor generation because
contents behind a stable environment/root are assumed stable.
## What changes
- Keeps executor plugin discovery and cached metadata in `ext/mcp`.
- Caches MCP and connector declarations together per selected root.
- Uses the step's already-resolved capability roots, including lazy
environments that are not turn environments.
- Reuses the current MCP runtime when the ready-root projection is
unchanged.
- Uses the same step MCP manager and connector snapshot for
model-visible tools and execution.
- Resolves direct thread-scoped MCP requests from the current
selected-root projection.
## Deliberately out of scope
- `app/list` remains based on the latest global host-plugin state; this
PR does not make its response or notifications thread-specific.
- `required = true` startup semantics do not apply to delayed executor
MCP activation.
- No filesystem/content invalidation.
- No transport-disconnect watcher.
- No executor generations or environment replacement semantics.
- No client sharing across complete manager replacements.
## Stack
1. Extension-owned World State sections.
2. Project executor skills through World State.
3. Pin one MCP runtime to each model step.
4. **This PR:** project selected MCP and connector state from
extension-owned metadata.
5. Integration coverage for selected capability availability and resume.
## Verification
-
`selected_plugin_servers_use_managed_requirements_for_the_selected_root_id`
- The stacked integration PR covers unavailable to ready activation,
unchanged-runtime reuse, skills, MCP tools, connector attribution, and
cold resume.
|
||
|
|
9ff8068880 |
Read connector declarations from executor plugins (#29852)
## Why Selected capability roots can live on a different executor and operating system from app-server. Their connector declarations must therefore be read through the executor that owns the package, without converting executor URIs into host paths. This PR adds that authority-bound reader without activating connectors or changing thread startup. ## What changed - Add a small `codex-connectors-extension` crate for executor-owned connector I/O. - Read only the app configuration explicitly declared by the resolved plugin manifest. - Read through the `ExecutorFileSystem` retained by `ResolvedExecutorPlugin`; there is no host-filesystem fallback or default-file probe. - Keep `PathUri` values intact so Windows, Unix, and remote executor paths work from any orchestrator OS. - Return full `AppDeclaration` values so the caller retains declaration names and categories for routing. - Preserve the selected plugin ID and exact executor URI in read and parse errors. The contract is intentionally narrow: selected packages are trusted, valid packages and packages that provide connectors explicitly declare their app configuration. ## Stack scope This PR is stacked on #29851. It only provides the executor-backed reader. #29856 resolves selected roots at thread start, freezes their connector snapshot, and contains the remote-capable end-to-end authority test for the complete path. |
||
|
|
ece1dfece0 |
[codex] Inject agent graph store into ThreadManager (#29736)
Pick up the AgentGraphStore migration. - Inject an explicit optional agent graph store into `ThreadManager` - Move all calls to spawn, close, recursive resume, and subtree/archive/delete/feedback traversal through it - Keep using `LocalAgentGraphStore` when SQLite is available This required some changes to the interface to deal with futures: - The interface now matches `ThreadStore`'s object-safe pattern by returning a boxed `AgentGraphStoreFuture` directly, allowing `ThreadManager` to hold `Arc<dyn AgentGraphStore>` *Slight behavior change!* Unfiltered subtree enumeration now performs a single all-status breadth-first traversal, so a closed grandchild beneath an open edge is included; the previous Open-then-Closed traversals could not cross mixed-status paths and silently omitted it. |
||
|
|
829f5b6b59 |
protocol: separate app and exec RPC ownership (#29714)
## Why The app-server and exec-server expose separate JSON-RPC APIs, but exec-server currently sources its serialized protocol and envelope types through app-server-oriented code. Giving each API an explicit owner makes the crate boundary legible without introducing shared generic envelopes. ## What changed - Added `codex-exec-server-protocol` to own exec DTOs, process IDs, and JSON-RPC envelopes. - Updated exec-server clients, transports, handlers, and tests to use the new crate. - Exposed app-server's existing JSON-RPC types through a public `rpc` module while retaining root re-exports. - Preserved existing wire shapes, including exec `PathUri` behavior. ## Stack This is PR 1 of 6. Next: [PR #29721](https://github.com/openai/codex/pull/29721), which moves auth mode below the app wire boundary. ## Validation - Exec-server protocol and server coverage passed in the focused protocol test runs. - App-server protocol schema fixtures passed. |
||
|
|
bbe1006890 |
Update rmcp to 1.8.0 (#29634)
## Summary - Update `rmcp` and `rmcp-macros` from 1.7.0 to 1.8.0. - Adapt to the new shared `peer_info` return type. - Box OAuth status discovery at the MCP boundary to keep the expanded future type from overflowing Rust's trait recursion limit. This brings in custom OAuth HTTP client support from [modelcontextprotocol/rust-sdk#908](https://github.com/modelcontextprotocol/rust-sdk/pull/908). |
||
|
|
330ae6a516 |
Share resumed rollout history (#28426)
## Summary Resuming a persisted thread currently deep-clones its complete rollout history several times. `InitialHistory` is retained for the app-server response, copied into thread persistence, and copied again by read-only accessors. These copies scale with the complete rollout rather than the bounded model context and add measurable latency for large sessions. This change stores resumed rollout history in `Arc<Vec<RolloutItem>>`. Rollout loading wraps the parsed vector once, while app-server response construction, session initialization, and thread persistence share it through inexpensive `Arc` clones. Read-only history access now returns a borrowed slice, and fork paths use `Arc::unwrap_or_clone` where they genuinely need mutable ownership. Rollout reconstruction also consumes its temporary context instead of cloning the reconstructed model history. The serialized representation remains unchanged. In an artificial 123 MB rollout benchmark, sharing resumed history reduced cold resume latency by roughly 9–10%. The affected crates compile with their test targets, all 80 thread-store tests pass, and the Bazel dependency lock remains valid. |
||
|
|
b16d2858f5 |
PAC 4 - Add macOS system proxy resolver (#26709)
## Summary Stacked on #26708. Adds the macOS implementation of the shared system-proxy contract. This allows Codex-owned auth clients to use the route macOS selects for each auth URL through SystemConfiguration and CFNetwork, including PAC and WPAD results. The `respect_system_proxy` feature is disabled by default, so existing client behavior remains unchanged unless explicitly enabled. ## Implementation - Adds the macOS-only `system-configuration` dependency to `codex-client`. - Dispatches system-proxy resolution to `outbound_proxy/macos.rs` on macOS. - Reads system proxy settings from `SCDynamicStore` and resolves the target URL with `CFNetworkCopyProxiesForURL`. - Executes PAC URLs and inline PAC JavaScript through a bounded run loop with a five-second timeout. - Handles `DIRECT`, HTTP proxies, and CFNetwork HTTPS entries using HTTP CONNECT; unsupported SOCKS entries map to `UnsupportedProxyScheme`. - Builds concrete proxy URLs from host and port entries, including IPv6 host bracketing. - Maps results into the shared `SystemProxyDecision::{Direct, Proxy, Unavailable}` contract. - Hashes URL-specific cache keys so PAC decisions remain distinct without retaining raw request URLs or query strings. ## End-user behavior - Disabled/default: existing client behavior is unchanged. - Enabled with `[features.respect_system_proxy]`: - macOS auth clients honor system proxy configuration, PAC, and WPAD; - valid OS/PAC `DIRECT` decisions use a direct connection; - unavailable system resolution falls back to explicit environment proxy variables, then `DIRECT`, through the shared contract from #26707. - Unsupported proxy schemes are not silently translated into another route. - Custom CA handling remains separate from proxy selection. - Known limitation: only the first supported system/PAC candidate is used. Subsequent proxy or `DIRECT` candidates are not attempted after a connection failure. This matches the current Windows behavior and leaves room for future ordered-fallback support. ## Tests - `just test -p codex-client` — 34 tests passed. - `just clippy -p codex-client` - `just fmt` - `just bazel-lock-check` |
||
|
|
0a9b7d2c36 |
chore: advance tungstenite fork pins (#29480)
## Why `openai-oss-forks/tokio-tungstenite` now includes the updated `tungstenite` fork revision from [openai-oss-forks/tokio-tungstenite#3](https://github.com/openai-oss-forks/tokio-tungstenite/pull/3). Codex should consume the merged fork commit and resolve its direct and transitive `tungstenite` dependencies to the same revision instead of retaining the older pins. ## What Changed - Advanced the `tokio-tungstenite` git pin to `0e5b2d73aa18dd9f0a50ee9ff199d5aef7594186`. - Advanced the `tungstenite` fork pin to `4fffad30fe373adbdcffab9545e9e9bf4f2fc19f` and adjusted the patch source so the transitive dependency resolves to that revision. - Updated `Cargo.lock` and `MODULE.bazel.lock` to match the dependency graph. |
||
|
|
abd901770e |
chore(deps): advance tokio-tungstenite (#29132)
## Why Responses websocket connections use `tokio-tungstenite`. When DNS returns an unusable native IPv6 address before a working IPv4 address, sequential dialing can consume Codex's outer websocket timeout before reaching IPv4. The merged fork change adds Happy Eyeballs-style alternate-family racing so websocket dialing matches the recovery behavior already present in the HTTP path. ## What Changed Advance the workspace `tokio-tungstenite` patch from `132f5b39` to merged commit `e5e64b86`, and update the matching lockfile source. The new revision comes from [openai-oss-forks/tokio-tungstenite#1](https://github.com/openai-oss-forks/tokio-tungstenite/pull/1). |
||
|
|
428cd44154 |
exec-server: add Noise relay transport (#26242)
## Why Rendezvous forwards traffic between the orchestrator and exec-server. The endpoints need to authenticate each other and encrypt that traffic without trusting Rendezvous with plaintext or endpoint keys. ## Changes - Adds a hybrid Noise IK channel through Clatter using X25519, ML-KEM-768, AES-256-GCM, and SHA-256. - Binds each handshake to `environment_id`, `executor_registration_id`, and `stream_id`. - Pins the registry-provided executor key and carries the harness authorization inside the encrypted handshake. - Orders relay frames before consuming Noise nonces and fragments large JSON-RPC messages into bounded records. - Bounds handshake payloads, frames, streams, and message reassembly. Runtime activation is in [openai/codex#26245](https://github.com/openai/codex/pull/26245). ## Stack 1. **[openai/codex#26242](https://github.com/openai/codex/pull/26242)**: Noise channel and relay transport 2. [openai/codex#26245](https://github.com/openai/codex/pull/26245): remote registration and runtime activation ## Verification - `just test -p codex-exec-server` - Oversized initiator payload regression coverage - `just fix -p codex-exec-server` - `just bazel-lock-check` - `cargo shear` --------- Co-authored-by: Codex <noreply@openai.com> |
||
|
|
d5a8117e08 |
Use aws-lc-rs for rustls crypto provider (#27706)
## Why Some enterprise TLS proxies issue certificate chains signed with `ecdsa_secp521r1_sha512` / `ECDSA_NISTP521_SHA512`. Custom CA configuration such as `SSL_CERT_FILE` can add the right trust root, but it cannot make `rustls`'s `ring` verifier support a certificate signature algorithm it does not advertise. That can still break TLS after the CA bundle is configured, including on Rust websocket paths that call the shared `ensure_rustls_crypto_provider()` helper, such as the Responses websocket connector and remote app-server client: - [`codex-api/src/endpoint/responses_websocket.rs`](https://github.com/openai/codex/blob/eddc5c75ed527a8348bfcaa85692e53189600833/codex-rs/codex-api/src/endpoint/responses_websocket.rs#L441) - [`app-server-client/src/remote.rs`](https://github.com/openai/codex/blob/eddc5c75ed527a8348bfcaa85692e53189600833/codex-rs/app-server-client/src/remote.rs#L718) The `aws-lc-rs` `rustls` provider supports this P-521/SHA-512 certificate signature scheme, so use it as Codex's process-wide `rustls` provider. ## What Changed - Switch the workspace `rustls` feature from `ring` to `aws_lc_rs`. - Update `codex-utils-rustls-provider` to install `rustls::crypto::aws_lc_rs::default_provider()`. - Add an assertion and integration test that the installed provider supports `ECDSA_NISTP521_SHA512`. ## Verification ```shell just fmt just test -p codex-utils-rustls-provider just bazel-lock-update just bazel-lock-check ``` |
||
|
|
73c58011b3 |
[codex] Pin bundled SQLite to fixed WAL-reset version (#27992)
## Summary Prevent dependency refreshes from silently downgrading Codex's bundled SQLite to a release affected by the WAL-reset corruption bug. SQLx 0.9 accepts a broad `libsqlite3-sys` range. An unrelated lock refresh therefore moved Codex from `libsqlite3-sys 0.37.0` back to `0.35.0`, changing the bundled SQLite runtime from 3.51.3 to 3.50.2. SQLite documents the affected versions and fix in [The WAL Reset Bug](https://www.sqlite.org/wal.html#the_wal_reset_bug) and the [SQLite 3.51.3 changelog](https://www.sqlite.org/changes.html#version_3_51_3). |
||
|
|
576f603440 |
Remove TUI realtime voice support (#27801)
## Why Removes the realtime audio support from TUI. ## What Changed - Removed the TUI `/realtime` and realtime `/settings` command paths. - Deleted TUI voice capture/playback, WebRTC session handling, audio-device selection UI, and recording-meter code. - Removed TUI realtime tests and snapshots that covered the deleted surfaces. - Dropped the TUI-only `cpal` and `codex-realtime-webrtc` dependencies and refreshed the Rust/Bazel locks. |
||
|
|
aa46f2debf |
code-mode standalone: extract protocol and add host crate (#27724)
This is phase 1 of a 4 phase stack: 1. **Add protocol and host crates for new IPC code mode implementation** 2. Create the new standalone binary 3. Create a new IPC `CodeModeSessionProvider` to use new binary 4. Remove v8 from core and only use IPC provider ## Add protocol and host crates for new IPC code mode implementation Establish a clean process boundary without changing the existing in-process behavior. - Add the codex-code-mode-protocol crate for shared session, runtime, response, and tool-definition types. - Move protocol-facing code out of the V8-backed implementation. - Add a buildable codex-code-mode-host crate as the foundation for the standalone process. - Keep the existing in-process runtime as the active implementation. |
||
|
|
e23d4df4ff |
[codex] parallelize release code generation (#27702)
The release profile still uses one codegen unit, which serializes LLVM code generation within each crate. That setting was selected alongside fat LTO for optimization quality and binary size, but releases now use ThinLTO and code generation dominates the critical-path build. Use four codegen units. On an Apple M4 Max with 16 cores and 128 GiB RAM, using rustc 1.96.0, four and eight units took 507.486 and 505.325 seconds respectively. Four therefore keeps the build-time gain while limiting the stripped `codex` increase to 14.7%, compared with 21.5% at eight units. The gzip-compressed binary grows 7.8% at four units. The one-unit build from an empty target directory took 981.150 seconds. That comparison also populated dependency and native build caches, so it is directional rather than controlled. It agrees with the earlier clean matrix where eight units reduced 671 seconds to 303 seconds: https://gist.github.com/anp/4b88393a0acd35783d9f42156f3243d5 At the local 48% reduction, the current release's 55m22s critical-path macOS Cargo step would save about 26 minutes from the 71m28s workflow: https://github.com/openai/codex/actions/runs/27367405663 The prompt-image medians ranged from 3.9% faster to 0.9% slower. CLI startup shifted by 1-2 ms while user and system CPU time were unchanged. This is a draft because the release-latency improvement may not justify the binary-size increase. |
||
|
|
5a56caf18c |
[codex] Remove async_trait from first-party code (#27475)
## Why First-party async traits should expose their `Send` contracts explicitly without requiring `async_trait`. This completes the migration pattern established in #27303 and #27304. ## What changed - Replaced the remaining first-party `async_trait` traits with native return-position `impl Future + Send` where statically dispatched and explicit boxed `Send` futures where object safety is required. - Kept implementations behavior-preserving, outlining existing async bodies into inherent methods where that keeps the diff reviewable. - Removed all direct first-party `async-trait` dependencies and the workspace dependency declaration. - Added a cargo-deny policy that permits `async-trait` only through the remaining transitive wrapper crates. - Updated `rand` from 0.8.5 to 0.8.6 to resolve RUSTSEC-2026-0097 and keep the full cargo-deny check passing. ## Validation - `just test -p codex-exec-server`: 216 passed, 2 skipped. - `just test -p codex-model-provider`: 39 passed. - `just test -p codex-core` and `just test`: changed tests passed; remaining failures are environment-sensitive suites unrelated to this migration. - `cargo deny check` - `just fix` - `just fmt` - `cargo shear` - `just bazel-lock-check` |
||
|
|
236b50125d |
[codex] Load user instructions through an injected provider (#27101)
## Why We want to remove implicit use of `$CODEX_HOME` from `codex-core` and make embedders responsible for supplying user-level instructions. This also ensures user instructions load when no primary environment is selected. ## What changed Stacked on #27415, which makes `codex exec` surface thread-scoped runtime warnings. - Added `UserInstructionsProvider` to `codex-extension-api`, with absolute source attribution and recoverable loading warnings. - Added `codex-home` with the filesystem-backed provider for `AGENTS.override.md` and `AGENTS.md`, preserving precedence, fallback, trimming, lossy UTF-8 handling, and the existing uncapped global instruction size. - Removed global instruction loading from `Config` and require `ThreadManager` callers to inject a provider. - Load provider instructions once for each fresh root runtime, including runtimes without a primary environment. Running sessions retain their snapshot, while child agents inherit the parent snapshot without invoking the provider. - Keep provider instructions separate while loading project `AGENTS.md`, then assemble the model-visible instructions with the existing ordering, source attribution, warning, and turn-context behavior. - Wired the Codex home provider through the CLI, app server, MCP server, core facade, and thread-manager sample. ## Validation - `just test -p codex-home -p codex-extension-api` - `just test -p codex-core agents_md` - `just test -p codex-core guardian` - `just test -p codex-app-server thread_start_without_selected_environment_includes_only_global_instruction_source` - `just test -p codex-exec warning` - `just bazel-lock-check` |
||
|
|
b2a4e3be27 |
[codex] migrate ExecutorFileSystem paths to PathUri (#27424)
## Why We're moving exec-server to use PathUri for its internal path representations. ## What Move `ExecutorFileSystem` APIs to use `PathUri` instead of `AbsolutePathBuf`. Future changes will convert higher-level parts of exec-server. |
||
|
|
4ec3b8eeea |
Route hosted Apps MCP through extensions (#27191)
## Stack - Base: #27184 - This PR is the second vertical and should be reviewed against `jif/external-plugins-1`, not `main`. ## Why CCA is moving toward a split runtime where the orchestrator may have no filesystem or executor, but it still needs to activate remotely hosted plugin components. HTTP MCP servers are the simplest complete example: they need configuration and host authentication, but they do not need an executor process. The Apps MCP endpoint is currently synthesized by a special-purpose loader inside the MCP runtime. That works locally, but it leaves hosted MCP activation outside the extension model being established in #27184. It also makes the Apps path a poor foundation for plugins whose skills, MCP servers, connectors, and hooks may come from different sources or execute in different places. This PR moves that one behavior behind an extension-owned contribution while preserving the existing local fallback. It deliberately does not introduce a generic plugin activation framework. ## What changed ### MCP extension contribution `codex-extension-api` gains an ordered `McpServerContributor` contract. A contributor returns typed `Set` or `Remove` overlays for MCP server configuration; later contributors win for the names they own. The contract stays at the existing MCP configuration boundary. Extensions do not create a second connection manager or transport abstraction. ### Hosted Apps MCP extension A new `codex-mcp-extension` contributes the reserved `codex_apps` server from the existing Apps feature, ChatGPT base URL, path override, and product SKU configuration. When `apps_mcp_path_override` is enabled for `https://chatgpt.com`, the resulting streamable HTTP endpoint is `https://chatgpt.com/backend-api/ps/mcp`. The existing ChatGPT-auth gate remains authoritative, so this server can run in an orchestrator-only process without being exposed for API-key sessions. ### One resolved runtime view `McpManager` now distinguishes three views: - **configured:** config- and plugin-backed servers before extension overlays; - **runtime:** configured servers plus host-installed extension contributions; - **effective:** runtime servers after auth gating and compatibility built-ins. App-server installs the hosted MCP extension and uses the runtime view for thread startup, refresh, status, threadless resource reads, connector discovery, and MCP OAuth lookup. This keeps `mcpServer/oauth/login` consistent with the servers exposed by the other MCP APIs. The hosted Apps server itself continues to use existing ChatGPT host authentication rather than MCP OAuth. ## Compatibility Hosts that do not install the MCP extension retain the existing Apps MCP synthesis path. This preserves current local-only, CLI, and standalone-host behavior while app-server exercises the extension path. Disabling Apps removes the reserved `codex_apps` entry, and losing ChatGPT auth removes it from the effective runtime view. Executor availability is not consulted for this HTTP transport. ## Follow-ups The next vertical will resolve a manifest-declared stdio MCP server from an executor-selected plugin root and execute it in the environment that owns that root. Later verticals can add backend-owned skills, connector metadata, hooks, durable selection semantics, and incremental local convergence without changing the component-specific runtime boundaries introduced here. ## Verification Focused coverage was added for: - contributing the hosted Apps MCP at `/backend-api/ps/mcp` without an executor; - requiring ChatGPT auth in the effective runtime view; - removing a reserved configured Apps server when the Apps feature is disabled. `cargo check -p codex-app-server -p codex-mcp-extension -p codex-extension-api -p codex-mcp` passed. Tests and Clippy were not run locally under the current development instruction; CI provides the full validation pass. |
||
|
|
89ac3ec27c |
Load selected executor skills through extensions (#27184)
## Why
CCA is moving toward a split runtime where the orchestrator may not have
a filesystem, while executors can expose preinstalled plugins and
skills. A thread therefore needs to select capabilities without asking
app-server or core to interpret executor-owned paths through the
orchestrator's filesystem.
The longer-term model is broader than executor skills:
- A plugin is a bundle of skills, MCP servers, connectors/apps, and
hooks.
- A plugin root can be local, executor-owned, or hosted by a backend.
- Components inside one plugin can use different access and execution
mechanisms. A skill may be read from a filesystem or through backend
tools; an HTTP MCP server can run without an executor; a stdio MCP
server or hook needs an execution environment.
- Core should carry generic extension initialization data. The extension
that owns a component should discover it, expose it to the model, and
invoke it through the appropriate runtime.
This PR establishes that architecture through one complete vertical:
selecting a root on an executor, discovering the skills beneath it,
exposing those skills to the model, and reading an explicitly invoked
`SKILL.md` through the same executor.
## Contract
`thread/start` gains an experimental `selectedCapabilityRoots` field:
```json
{
"selectedCapabilityRoots": [
{
"id": "deploy-plugin@1",
"location": {
"type": "environment",
"environmentId": "workspace",
"path": "/opt/codex/plugins/deploy"
}
}
]
}
```
The root is intentionally not classified as a "plugin" or "skill" in the
API. It can point at a standalone skill, a directory containing several
skills, or a plugin containing skills and other components. This PR only
teaches the skills extension how to consume it; later extensions can
resolve MCP, connector, and hook components from the same selection.
The platform-supplied `id` is stable selection identity. The location
says which runtime owns the root and gives that runtime an opaque path.
App-server does not inspect or canonicalize the path.
## What changed
### Generic thread extension initialization
App-server converts selected roots into `ExtensionDataInit`. Core
carries that generic initialization value until the final thread ID is
known, then creates thread-scoped `ExtensionData` before lifecycle
contributors run.
This keeps `Session` and core independent of the capability-selection
contract. The initialization value is consumed during construction; it
is not retained as another long-lived `Session` field.
### Executor-backed skills
The skills extension now owns an `ExecutorSkillProvider` that:
- resolves the selected environment through `EnvironmentManager`
- discovers, canonicalizes, and reads skills through that environment's
`ExecutorFileSystem`
- contributes the bounded selected-skill catalog as stable developer
context
- reads an explicitly invoked skill body through the authority that
listed it
- warns when an environment or root is unavailable
- never falls back to the orchestrator filesystem for an executor-owned
root
Skill catalog and instruction fragments have hard byte bounds, which
also bound them below the 10K-token per-item context limit. If a
selected executor skill has the same name as a legacy local skill, the
executor selection owns that invocation and the local body is not
injected a second time.
Existing local and bundled skill loading remains in place. Omitting
`selectedCapabilityRoots` therefore preserves current local-only
behavior.
## Current semantics
- Only environment-owned locations are represented in this first
contract.
- Roots are resolved by the destination extension, not by app-server or
core.
- An unavailable executor or invalid root produces a warning and no
capabilities from that root; it does not trigger a local-filesystem
fallback.
- Selection applies to a newly started active thread.
- MCP servers, connectors, and hooks beneath a selected plugin root are
not activated yet.
- Selection is not yet persisted or inherited across resume, fork, or
subagent creation. Existing local capabilities continue to behave as
they do today in those flows.
## Planned vertical follow-ups
1. **Hosted HTTP MCP:** add an extension-backed HTTP MCP source that
works without an executor, then replace the special-purpose MCP plugins
loader with that implementation.
2. **Executor MCP:** register and execute stdio MCP servers through the
environment that owns the selected plugin root.
3. **Backend skills:** add a hosted skill source whose catalog and
bodies are accessed through extension tools rather than a filesystem.
4. **Connectors and hooks:** activate those components through their
owning extensions, using the same selected-root boundary and
component-specific runtime.
5. **Durable selection:** define the desired-selection lifecycle,
persist it, and make resume, fork, and subagent inheritance explicit
rather than accidental.
6. **Local convergence:** incrementally route existing local plugin,
skill, and MCP loading through the same extension model while preserving
current local behavior.
Each follow-up remains reviewable as an end-to-end capability. The
platform selects roots, generic thread extension data carries the
selection, and the owning extension resolves and operates its component.
## Verification
Coverage added for:
- app-server end-to-end discovery and explicit invocation of a skill
inside an executor-selected plugin root
- exclusive invocation when a selected executor skill collides with a
local skill name
- executor filesystem authority for discovery, canonicalization, and
reads
- thread extension initialization before lifecycle contributors run
- stable executor catalog context, explicit invocation, context
rebuilding, hidden skills, and preserved host/remote catalog behavior
Targeted protocol, core-skills, skills-extension, core lifecycle, and
app-server executor-skill tests were run during development.
|
||
|
|
ffec7c0933 |
Add typed file URIs (#26840)
## Why Codex needs stable `file:` URI identifiers that can cross process and operating-system boundaries without eagerly interpreting them as native paths. Existing fields also need to keep accepting absolute path strings during migration. ## What changed - Add `codex-utils-path-uri` with a validated, immutable `PathUri` wrapper that currently accepts only `file:` URLs. - Expose URI-level `basename`, `parent`, and `join` operations that preserve authorities and percent encoding without guessing the source operating system. - Keep native conversion explicit through `AbsolutePathBuf` and the current host rules. - Serialize as canonical URI text while accepting both URI text and legacy absolute native paths during deserialization. - Add adversarial coverage for Windows-looking and POSIX paths, UNC authorities, encoded metadata characters, non-UTF-8 POSIX paths, URI hierarchy operations, and legacy serde round trips. |