Repository navigation
Write valid Codex MCP configuration - #284
Merged
Eli Pinkerton (wallstop) merged 2 commits intoOct 18, 2026
Merged
Eli Pinkerton (wallstop) merged 2 commits into
Eli Pinkerton (wallstop) merged 2 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a294ba0. Configure here.
Eli Pinkerton (wallstop)
added a commit
that referenced
this pull request
Oct 18, 2026
Windows text streams can use CP1252 while the Node configurator sends UTF-8 JSON. Read and write protocol bytes explicitly as UTF-8, including diagnostics. The new regression first reproduced corrupted Japanese command and argument paths with PYTHONIOENCODING=cp1252. All six persistence tests, the affected sync/credential suites, strict pyright, and check:gate now pass. Refs #171 and PR #284 review discussion_r4305641307.
Codex persistence still lives in the Node configurator. Move its home-config writer and stale workspace cleanup to Python through uv, with a validated Python fallback when uv is absent. Preserve managed definitions, trust entries, user settings, dry runs, atomic private writes, and idempotence. Escape Windows paths and control characters as TOML strings. Leave unmanaged workspace whitespace intact. Validation: all 43 harness test files pass. Five direct persistence contracts cover merge, cleanup, failure, escaping, and TOML parsing. Strict pyright, check:fast, check:gate, and npm pack dry run pass. Unity 6000.5.2f1 Windows passes 393 EditMode and 15 PlayMode tests. No other frontend writer or host bridge is ported. Refs #171.
Windows text streams can use CP1252 while the Node configurator sends UTF-8 JSON. Read and write protocol bytes explicitly as UTF-8, including diagnostics. The new regression first reproduced corrupted Japanese command and argument paths with PYTHONIOENCODING=cp1252. All six persistence tests, the affected sync/credential suites, strict pyright, and check:gate now pass. Refs #171 and PR #284 review discussion_r4305641307.
Eli Pinkerton (wallstop)
force-pushed
the
migrate/codex-mcp-writer
branch
from
October 18, 2026 05:59
40dc04c to
eace335
Compare
Eli Pinkerton (wallstop)
changed the base branch from
main
to
migrate/sourced-env-python
October 18, 2026 05:59
Eli Pinkerton (wallstop)
added this pull request to stack #291
October 18, 2026 05:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

DISCLOSURE: LLM-GENERATED TEXT
Why: Codex config writes remain in Node and emit invalid Windows paths.
What:
Refs #171.
Note
Medium Risk
Changes affect devcontainer credential loading and Codex/MCP sync on host and container; mistakes could break agent startup or write invalid Codex TOML, though contract tests cover the main paths.
Overview
Codex MCP configuration is moved out of Node into
scripts/mcp_codex_config.py, which writes the managed$CODEX_HOME/config.tomlblock (with JSON-style TOML escaping for Windows paths and Unicode), migrates workspace trust, and prunes stale.codex/config.tomlcontent.configure.mjsnow shells to that script via uv or Python 3.9+ when uv is missing..env.localloading is refactored soenv-local.shdelegates parsing toenv_local.py(NUL-delimited, atomic exports, literal values only). Shell precedence and MCP credential override behavior stay the same, with expanded contract tests.Harness scope maps the new Codex module to
test_mcp_codex_config.py; MCP sync tests cover the Python-only Codex path.Reviewed by Cursor Bugbot for commit eace335. Bugbot is set up for automated code reviews on this repo. Configure here.