config.toml MCP paths stale after auto-update — node_repl fails with 'os error 3'
Open 💬 8 comments Opened Jun 3, 2026 by kungunier
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Bug Description
After Codex Desktop auto-updates on Windows, the config.toml retains stale paths to old bin directories that no longer exist. This causes node_repl MCP server startup to fail with:
⚠ MCP client for `node_repl` failed to start: MCP startup failed: 系统找不到指定的路径。 (os error 3)
⚠ MCP startup incomplete (failed: node_repl)
Root Cause
Codex stores per-version binaries in hash-named subdirectories under %LOCALAPPDATA%\OpenAI\Codex\bin\:
bin/
├── 34ab3e1324cc55b5/ ← new version: node_repl.exe
├── 5b9024f90663758b/ ← node.exe
├── 716dda49c14d31a0/ ← codex.exe
└── 3c238e29bbc930ff/ ← OLD, cleaned up after update
After an update, the old hash directory is cleaned up, but config.toml keeps the old paths:
[mcp_servers.node_repl]
# ❌ This directory no longer exists after update
command = 'C:\Users\...\bin\3c238e29bbc930ff\node_repl.exe'
[mcp_servers.node_repl.env]
# ❌ Also stale
CODEX_CLI_PATH = 'C:\Users\...\bin\958d608b5e0546a5\codex.exe'
# ✅ This one happened to be correct (different hash, survived)
NODE_REPL_NODE_PATH = 'C:\Users\...\bin\5b9024f90663758b\node.exe'
Steps to Reproduce
- Install Codex Desktop on Windows
- Let it auto-update to a newer version
- Restart Codex
- Observe the
node_replstartup warning
Expected Behavior
config.toml bin paths should be updated to match the new version after auto-update.
Workaround
Manually update the stale paths in %USERPROFILE%\.codex\config.toml:
[mcp_servers.node_repl]
command = 'C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\<actual-hash>\node_repl.exe'
[mcp_servers.node_repl.env]
CODEX_CLI_PATH = 'C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\<actual-hash>\codex.exe'
Find the current hash by inspecting %LOCALAPPDATA%\OpenAI\Codex\bin\ for the directory containing node_repl.exe.
Environment
- OS: Windows 10/11
- Codex Desktop (version auto-updated)
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Adding one possibly related root cause from another Windows repro, in case it helps triage this stale-path issue.
In my case, the stale path was not only in
config.toml;chrome-native-hosts-v2.jsonalso hadpaths.codexCliPathpointing to an old hash directory whosecodex.exeno longer existed. That stale CLI path made Codex app-server startup / Browser policy config reads fail withos error 3.One extra user-facing problem: the Browser layer eventually surfaced this as an enterprise network policy denial, even though the actual root cause was a missing configured
codex.exepath. It may be worth checking/regenerating bothCODEX_CLI_PATHandpaths.codexCliPathafter updates.I wrote up the focused repro/details here: #28474
I hit a closely related stale-runtime case on Windows 10 after moving from an npm-installed CLI to the standalone Windows CLI and updating Codex Desktop.
In my case the stale state was not only in
config.toml; both native-host config files still pointed at an older Codex runtime:Both contained:
The referenced
codex.exewas:After updating/installing the standalone CLI, the active CLI was:
After launching the updated Desktop app, a newer Desktop runtime existed:
and
config.tomlhad been updated to use that newer runtime via[mcp_servers.node_repl.env] CODEX_CLI_PATH, but thechrome-native-hosts.jsonfiles still referenced the old0.135.0-alpha.1codex.exe.That made it possible for helper/browser/native-host flows to launch an older Codex runtime even while the foreground CLI was
0.140.0.I agree the real fix is likely in the Desktop/plugin sync code that rewrites these files. Since that path looks outside the public CLI code, I prepared a narrower public-repo diagnostic improvement instead:
https://github.com/starriet9/codex/tree/doctor/desktop-runtime-diagnostics
Candidate change summary:
codex doctorcheck nameddesktop.browser_runtime.node_replMCP env from the already-loadedConfig.CODEX_CLI_PATH/BROWSER_USE_CODEX_APP_VERSIONagainst values in:%USERPROFILE%\.codex\chrome-native-hosts.json%LOCALAPPDATA%\OpenAI\Codex\chrome-native-hosts.jsoncodexCliPathpoints to a missing/stale runtime or does not match the configuredCODEX_CLI_PATH.pluginVersionis stale relative to the configured/installed bundled plugin version.Local verification:
Both passed on Windows.
I am not opening a PR yet because
docs/contributing.mdsays external PRs are by invitation only. If the team thinks acodex doctordiagnostic is useful while the Desktop sync fix is handled elsewhere, I can open a focused PR from the branch above.Follow-up after validating the separate
/appDesktop handoff fix from #28667:Opening the same thread successfully in Codex Desktop did not regenerate these native-host files on this Windows 10 machine:
Both files still point to the older runtime:
while the currently configured Desktop/Node REPL runtime in
config.tomlpoints to the newer runtime:So in this repro, launching/opening Desktop successfully is not enough by itself to repair stale
chrome-native-hosts.json. That reinforces the need for either Desktop/plugin sync regeneration or at least acodex doctordiagnostic for this specific mismatch.Local repair/validation follow-up:
codex://protocol,config.tomlwas refreshed to a newer Desktop/runtime:0.135.0-alpha.1native-host files were not regenerated automatically after Desktop launch. Both canonical paths remained missing after launch:0.135.0-alpha.1Codex/helper process was observed.codex doctor --summary --asciistill reported the standalone install, config, and state DB as healthy.So the local stale-runtime hazard is mitigated by quarantining the old files, and Desktop does refresh
config.toml; however, Desktop launch alone still does not recreate/repairchrome-native-hosts.json. That keeps the diagnostic gap relevant: stale native-host files can persist across updates, and if removed, there does not appear to be an obvious doctor/remediation path that tells the user whether those files are intentionally absent or need regeneration.same issue here
019ef774-3d79-7f01-b686-47f63bc06b4b
I experienced what appears to be the same issue and wanted to add one additional observation.
Immediately after Codex performed an automatic update on startup, I started getting:
In my case,
config.tomlstill referenced the old runtime hash:but the actual runtime had been updated to:
I confirmed the new runtime with:
Updating these three entries in
config.tomlto the new runtime hash immediately resolved the problem:mcp_servers.node_repl.commandNODE_REPL_NODE_PATHNODE_REPL_NODE_MODULE_DIRSThis suggests the runtime was updated successfully, but the paths in
config.tomlwere not updated accordingly.Follow-up based on the newer stale-runtime reports above:
I updated the diagnostic branch to also check the
node_replruntime paths that can remain stale inconfig.tomlafter a Desktop/runtime update:mcp_servers.node_repl.commandNODE_REPL_NODE_PATHNODE_REPL_NODE_MODULE_DIRSThe updated
desktop.browser_runtimedoctor check now warns when those configured paths point to missing runtime files/directories, even when nochrome-native-hosts.jsonfile is present.Branch:
https://github.com/starriet9/codex/tree/doctor/desktop-runtime-diagnostics
Local verification on Windows:
Both passed.
I am still not opening a PR directly because the contributing guide says external PRs are by invitation only, but this branch is available if a focused
codex doctordiagnostic would be useful.