Codex Desktop on Windows ignores mcp_servers.node_repl args/command; node_repl fails with windows sandbox failed: spawn setup refresh
What version of the Codex App are you using (From “About Codex” dialog)?
26.519.10634.0
What subscription do you have?
plus
What platform is your computer?
Windows 10 Home, 64-bit, AMD64
What issue are you seeing?
Codex Desktop on Windows is ignoring mcp_servers.node_repl config.
Environment:
- Windows
- Codex app path: C:\Program Files\WindowsApps\OpenAI.Codex_26.519.10634.0_x64__2p2nqsd0c76g0
- Workspace: C:\Users\dkxha\OneDrive\문서\Max Leak Detection Website
Problem:
The JavaScript / node_repl runtime fails immediately with:
windows sandbox failed: spawn setup refresh
reason: stdout_eof
I updated C:\Users\dkxha\.codex\config.toml:
[mcp_servers.node_repl]
args = ["--disable-sandbox"]
command = 'C:\Users\dkxha\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe'
After fully restarting Codex, node_repl.exe still launches without --disable-sandbox.
Verified with process command line:
"C:\Users\dkxha\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe"
Expected:
node_repl.exe should launch with --disable-sandbox.
Also tested wrapper workaround:
command = 'C:\Users\dkxha\.codex\node_repl\node_repl_wrapper.cmd'
args = []
Codex still launched the original node_repl.exe directly, ignoring the configured command path.
Conclusion:
mcp_servers.node_repl args and command appear to be ignored or overridden by an internal hardcoded launcher path.
What steps can reproduce the bug?
- Use Codex Desktop on Windows.
- Edit:
C:\Users\dkxha\.codex\config.toml
- Configure node_repl like this:
[mcp_servers.node_repl]
args = ["--disable-sandbox"]
command = 'C:\Users\dkxha\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe'
startup_timeout_sec = 120
- Fully quit Codex Desktop.
- Reopen Codex Desktop.
- Start a new thread in the same workspace.
- Run a minimal JavaScript / node_repl smoke test:
nodeRepl.write('js-ok')
- The node_repl runtime fails immediately with:
node_repl kernel exited unexpectedly
windows sandbox failed: spawn setup refresh
reason: stdout_eof
- Check the live Windows process command line for node_repl.exe.
Observed command line:
"C:\Users\dkxha\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe"
Expected command line:
"C:\Users\dkxha\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe" --disable-sandbox
- As an additional test, change config.toml to use a wrapper command:
[mcp_servers.node_repl]
args = []
command = 'C:\Users\dkxha\.codex\node_repl\node_repl_wrapper.cmd'
- The wrapper contains:
@echo off
"C:\Users\dkxha\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe" --disable-sandbox
- Fully quit and reopen Codex again.
- Run the same JavaScript / node_repl smoke test.
- Codex still launches the original node_repl.exe directly instead of the configured wrapper command.
Observed result:
mcp_servers.node_repl args and command appear to be ignored or overridden by an internal launcher path.
What is the expected behavior?
Codex Desktop should respect the configured MCP server command and arguments in C:\Users\dkxha\.codex\config.toml.
When this config is present:
[mcp_servers.node_repl]
args = ["--disable-sandbox"]
command = 'C:\Users\dkxha\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe'
Codex should launch node_repl.exe with the configured argument:
node_repl.exe --disable-sandbox
If the command path is changed to a wrapper script, Codex should launch that configured wrapper command instead of continuing to launch the original node_repl.exe path.
The JavaScript runtime should start successfully, and Chrome/browser automation that depends on node_repl should be able to connect.
Additional information
This blocks Chrome/browser automation because the JavaScript runtime fails before Chrome can be tested.
Observed runtime error:
node_repl kernel exited unexpectedly
windows sandbox failed: spawn setup refresh
reason: stdout_eof
I verified the live process command line after restarting Codex. Even though config.toml contains args = ["--disable-sandbox"], the actual process command line was:
"C:\Users\dkxha\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe"
The --disable-sandbox argument was not present.
I also tested a wrapper workaround:
[mcp_servers.node_repl]
args = []
command = 'C:\Users\dkxha\.codex\node_repl\node_repl_wrapper.cmd'
The wrapper script ran the original executable with --disable-sandbox, but after restart Codex still launched the original node_repl.exe directly instead of the configured wrapper command.
This suggests mcp_servers.node_repl args and command are ignored or overridden by an internal launcher path in Codex Desktop on Windows.
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I am seeing the same issue on Codex Desktop for Windows.
Codex App version:
26.519.11010.0
Platform:
Windows
Error:
node_repl kernel exited unexpectedly
windows sandbox failed: spawn setup refresh
reason: stdout_eof
Impact:
Chrome plugin/browser automation cannot connect because node_repl fails before it can list tabs.
Additional checks:
C:\Users\ryoui\AppData\Local\OpenAI\extension\com.openai.codexextension.json
HKCU\Software\Google\Chrome\NativeMessagingHosts\com.openai.codexextension
Update: Running Codex Desktop as Administrator makes Chrome plugin/node_repl work on my machine. Without Administrator, node_repl fails with:
windows sandbox failed: spawn setup refresh
Adding another reproduction from Codex Desktop on Windows that matches this issue.
Environment:
OpenAI.Codex_26.519.11010.0_x64__2p2nqsd0c76g0codex-cli 0.133.026.519.81530What I verified locally:
~/.codex/config.tomlcontains:``
toml
``[mcp_servers.node_repl]
args = ["--disable-sandbox"]
command = '...\\node_repl.exe'
node_repl.exe --helpconfirms--disable-sandboxis a supported option.node_repl.exeprocesses are still launched without--disable-sandbox.node_replJS fails before any browser work:``
text
``node_repl kernel exited unexpectedly
node_repl diagnostics: {"kernel_stderr_tail":"windows sandbox failed: spawn setup refresh","reason":"stdout_eof"}
``
powershell
`codex.exe sandbox windows powershell.exe -NoProfile -Command "Write-Output sandbox-ok"
`Result:
text
``windows sandbox failed: spawn setup refresh
``
text
``setup refresh: failed to spawn ...\\codex-windows-sandbox-setup.exe: The requested operation requires elevation. (os error 740)
Important distinction:
extension-host.exe.node_replcannot start its kernel because the Windows sandbox setup-refresh path fails.Workaround verification:
Running the same bundled CLI with
windows.sandbox="unelevated"succeeds:Output:
So this looks like two linked problems:
mcp_servers.node_repl.command/argsfor this plugin-provided Node REPL path.spawn setup refresh/os error 740failure, which makes Chrome/browser automation appear unavailable even though the Chrome extension and native host are healthy.I can reproduce what looks like the same failure on Codex Desktop for Windows.
Environment:
Codex Desktop package: OpenAI.Codex_26.519.11010.0_x64__2p2nqsd0c76g0
Codex CLI path from config: C:\Users\user\AppData\Local\OpenAI\Codex\bin\958d608b5e0546a5\codex.exe
codex.exe --version: codex-cli 0.133.0
Node REPL executable: C:\Users\user\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe
Node path: C:\Users\user\AppData\Local\OpenAI\Codex\bin\5b9024f90663758b\node.exe
Workspace: D:\codex
Windows sandbox config: [windows] sandbox = "elevated"
Minimal repro:
Start Codex Desktop on Windows.
Run a minimal Node REPL MCP call:
nodeRepl.write('ok')
The kernel exits before running the JS:
node_repl kernel exited unexpectedly
node_repl diagnostics: {"kernel_status":"running","kernel_stderr_tail":"windows sandbox failed: spawn setup refresh","reason":"stdout_eof","stream_error":null}
Sandbox log root cause:
[2026-05-29 23:52:30.790 codex.exe] START: C:\Users\user\AppData\Local\OpenAI\Codex\bin\5b9024f90663758b\node.exe --experimental-vm-modules C:\Users\DERICK~1.CHA\AppData\Local\Temp\.tmpo5Xsa5\kernel.js --session-id 6a423ef8e6124c3184cb
[2026-05-29 23:52:30.860 codex.exe] setup refresh: spawning C:\Users\user\AppData\Local\OpenAI\Codex\bin\958d608b5e0546a5\codex-windows-sandbox-setup.exe (cwd=D:\codex, payload_len=4428)
[2026-05-29 23:52:30.865 codex.exe] setup refresh: failed to spawn C:\Users\user\AppData\Local\OpenAI\Codex\bin\958d608b5e0546a5\codex-windows-sandbox-setup.exe: 要求的作業需要提升的權限。 (os error 740)
What I tried:
js_reset, then reran nodeRepl.write('ok'): same failure.
Fully restarted Codex Desktop: same failure.
Set:
[mcp_servers.node_repl]
args = ["--disable-sandbox"]
After restart, the actual process command line was still:
"C:\Users\user\AppData\Local\OpenAI\Codex\bin\3c238e29bbc930ff\node_repl.exe"
The --disable-sandbox argument was not present.
Restarted Codex Desktop in administrator mode: nodeRepl.write('ok') succeeds, and runtime metadata is available:
{
"model": "gpt-5.5",
"sandbox": "windows_elevated"
}
This suggests two related issues:
The Node REPL kernel launch path still tries to run codex-windows-sandbox-setup.exe from the user-local 958d608b5e0546a5 CLI bundle, which fails with Windows os error 740.
Codex Desktop appears to ignore mcp_servers.node_repl.args, so users cannot work around this by passing the built-in --disable-sandbox option.
Running Codex Desktop as administrator is a workaround, but the non-admin failure mode is not obvious from the surfaced Node REPL error.
Normal shell tool calls still succeed through the WindowsApps helper path:
setup refresh: spawning C:\Program Files\WindowsApps\OpenAI.Codex_26.519.11010.0_x64__2p2nqsd0c76g0\app\resources\codex-windows-sandbox-setup.exe
setup refresh: processed 2 write roots (read roots delegated); errors=[]
setup binary completed
So the failure seems specific to the Node REPL kernel launch path / MCP launcher config handling rather than all sandboxed shell commands.
Adding another data point from Windows Codex Desktop, but with a stability/performance workaround rather than only a browser-control workaround.
Environment:
OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0codex-cli 0.128.0node_repl.exepath was under%LOCALAPPDATA%\OpenAI\Codex\bin\34ab3e1324cc55b5\node_repl.exeObserved behavior:
node_repl.exewas spawned even after setting plugin/browser-related config off.enabled = falseI added under[mcp_servers.node_repl]was gone/ignored; the live process still launched as onlynode_repl.exe, with no useful user-provided args.node_repl.exespawned its own childcodex.exe app-server --listen stdio://.Mitigation that materially improved stability:
node_repl.exeprocesses and their direct childcodex.exe app-server --listen stdio://processes.node_repl.exelaunchers so Desktop cannot respawn them:to e.g.
Impact:
This supports the theory that Desktop is not honoring the user-visible
mcp_servers.node_replconfig for this path, and that the hardcoded/internalnode_repllauncher can become a major stability/performance problem beyond just breaking browser control.this is now fixed