Add CODEX_HOME environments TOML provider#20666
Merged
Merged
Conversation
This was referenced May 1, 2026
d2b7397 to
7eff29b
Compare
2106226 to
50c4f0d
Compare
7eff29b to
773f789
Compare
0314e55 to
d3e9d10
Compare
387ab7a to
3fe0b35
Compare
4fef0c4 to
40ebd87
Compare
66ec891 to
f12eaed
Compare
40ebd87 to
8be2149
Compare
f12eaed to
56ada0d
Compare
18bb387 to
16a67b4
Compare
56ada0d to
abde0bf
Compare
16a67b4 to
4ba0ef0
Compare
abde0bf to
e0ff30e
Compare
4ba0ef0 to
8898b25
Compare
e0ff30e to
4682df9
Compare
8898b25 to
2fb7e79
Compare
4682df9 to
313c1ad
Compare
2fb7e79 to
0eeddca
Compare
starr-openai
added a commit
that referenced
this pull request
May 4, 2026
## Why This stack adds configured exec-server environments, including environments reached over stdio. Before client-side stdio transports or config can use that path, the exec-server binary itself needs a first-class stdio listen mode so it can speak the same JSON-RPC protocol over stdin/stdout that it already speaks over websockets. **Stack position:** this is PR 1 of 5. It is the server-side transport foundation for the stack. ## What Changed - Accept `stdio` and `stdio://` for `codex exec-server --listen`. - Promote the existing stdio `JsonRpcConnection` helper from test-only code into normal exec-server transport code. - Add parse coverage for stdio listen URLs while preserving the existing websocket default. ## Stack - **1. This PR:** #20663 - Add stdio exec-server listener - 2. #20664 - Add stdio exec-server client transport - 3. #20665 - Make environment providers own default selection - 4. #20666 - Add CODEX_HOME environments TOML provider - 5. #20667 - Load configured environments from CODEX_HOME Split from original draft: #20508 ## Validation Not run locally; this was split out of the original draft stack. --------- Co-authored-by: Codex <noreply@openai.com>
313c1ad to
20d01c6
Compare
0eeddca to
a99c2c7
Compare
8565584 to
7a171e1
Compare
3cb887e to
e848a7b
Compare
7a171e1 to
ee9b735
Compare
e848a7b to
60a8025
Compare
ee9b735 to
3ac2f68
Compare
60a8025 to
7d53449
Compare
a57ea34 to
2a2f9c7
Compare
7d53449 to
c40f7cb
Compare
2a2f9c7 to
dcdd3dd
Compare
c40f7cb to
d5b28df
Compare
dcdd3dd to
a53f5a5
Compare
d5b28df to
5826053
Compare
a53f5a5 to
e7c304e
Compare
5826053 to
9f1de70
Compare
f9c3d95 to
cb14eac
Compare
b76f32a to
a14098c
Compare
Add the environments.toml schema, parser, validation, and provider implementation for configured websocket and stdio-command environments. This keeps the provider load helper available but does not make product entrypoints use it yet. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Avoid keeping the test-only constructor in normal builds now that production construction uses the config-dir aware path. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Make the environments.toml provider reachable from the exec-server crate API so the provider PR passes clippy before entrypoint wiring lands in the next stack PR. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Restore the transport-backed remote environment constructor used by the TOML provider so stdio-command environments are remote even though they do not have a websocket URL. Co-authored-by: Codex <noreply@openai.com>
Expose EnvironmentManager::from_codex_home so the environments.toml provider is reachable before the entrypoint wiring PR lands. Co-authored-by: Codex <noreply@openai.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
After stdio transports and provider-owned defaults exist, Codex needs a config-backed provider that can describe more than the single legacy
CODEX_EXEC_SERVER_URLremote. This PR adds that provider without activating it in product entrypoints yet, keeping parser/validation review separate from runtime wiring.Stack position: this is PR 4 of 5. It builds on PR 3's provider/default model and adds the
environments.tomlprovider used by PR 5.What Changed
environment_toml.rsas the TOML-specific home for parsing, validation, and provider construction.EnvironmentManager::from_codex_home(...).TomlEnvironmentProvider, including validation for:localandnoneurlorprogramper configured environmenturl = "ws://..."/wss://....program = "...".environments.tomlfromCODEX_HOME, but do not wire entrypoints to call them yet.tomldependency for parsing.Stack
Split from original draft: #20508
Validation
Not run locally; this was split out of the original draft stack.
Documentation
This introduces the config shape for
environments.toml; user-facing documentation should be added before this stack is treated as a documented public workflow.