config.toml MCP paths stale after auto-update — node_repl fails with 'os error 3'
Open 💬 11 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)
11 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.I maintain WinBridge Recovery for Windows Codex Desktop update/recovery state: https://github.com/zemeng5208/winbridge-recovery
This stale-path failure is directly within the project's current scope. WinBridge v3.1.1 does not assume that one path is authoritative after an app update; it resolves the current Store package/runtime first, then checks
node_repl.command,CODEX_CLI_PATH, Node/runtime paths, plugin cache versions/latest, Native Host state, and app-server/native-host resource paths for references to removed hash/version directories.The extra reports in this thread are especially important because the stale value can survive in more than
config.toml:chrome-native-hosts*.json/ v2 state can still launch or reference an older Desktop runtime even after the foreground config was updated. That creates exactly the kind of split-brain state WinBridge is designed to detect.For this class of
os error 3failure, the tool can rebuild user-owned runtime/config references against the currently installed official package and validate that the target executables/paths actually exist before switching state, with backups/rollback. It does not patch the AppX package or bypass Browser policy. Also, if all local paths are current and the failure is an upstream runtime/tool-injection problem, it stops at diagnosis instead of claiming a fix.I can reproduce a closely matching stale-runtime-path failure on Windows + WSL after updating the Codex App.
Environment
26.820.609400.149.1, launched directly inside WSLObserved behavior
Starting Codex CLI inside WSL reports:
The WSL user configuration at
~/.codex/config.tomlcontains an App-generatedmcp_servers.node_replblock whose command points to the following runtime:That runtime directory no longer exists.
The currently installed App runtime is:
The current executable exists and is executable.
The old runtime identifier is present in multiple generated settings, not only the MCP command. The affected settings include:
mcp_servers.node_repl.commandNODE_REPL_NODE_PATHNODE_REPL_NODE_MODULE_DIRSNODE_REPL_TRUSTED_CODE_PATHSshell_environment_policy.set.NODE_REPL_TRUSTED_CODE_PATHSThe Windows App-side Codex configuration already references the current runtime, while the WSL-side configuration still references the removed runtime.
This suggests that the App runtime update completed, but the App-generated
node_replconfiguration in the WSL Codex home was not refreshed before the old runtime was removed. This is an inference based on the observed paths; I have not confirmed the internal update path.I have not modified the configuration yet.
Expected behavior
After an App/runtime update, generated
node_replpaths in every Codex home used by the App or CLI should be refreshed before the previous hash-named runtime is removed.Alternatively, the CLI should identify the missing configured command and provide an actionable repair message.
This may be related at the App/WSL configuration-lifecycle level to #40715, although that issue concerns an injected
mcp_servers.codex_apptransport rather than a stalenode_replexecutable path.Confirmed the same stale-path regression on a newer Windows ARM64 package.
Environment:
26.825.3734.0(Arm64)codex-cli 0.150.128000, ARM64Current read-only evidence from
codex mcp get node_repl --json:node_replis enabled.26.820.80927.node_repl.exepath and its parent directory do not exist.CODEX_CLI_PATHandNODE_REPL_NODE_PATHtargets also do not exist.MCP client for node_repl failed to start ... (os error 3).This confirms that generated MCP paths from an older app build can survive at least one later Store update. No local paths or usernames are included in this public comment.
I uploaded logs and diagnostics through
/feedback.Uploaded thread:
01a0470d-0700-71b0-8afb-875b432c5088