Windows Desktop: node_repl/in-app browser fails with `windows sandbox failed: spawn setup refresh` after reinstall
Resolved 💬 6 comments Opened May 29, 2026 by tonykey910 Closed Jun 12, 2026
💡 Likely answer: A maintainer (iceweasel-oai, contributor)
responded on this thread — see the highlighted reply below.
Summary
Codex Desktop on Windows cannot start node_repl, which also prevents the in-app browser automation from connecting. Every node_repl invocation exits immediately with:
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}
This persists after fully uninstalling Codex, rebooting Windows, reinstalling Codex, and resetting ~/.codex/config.toml.
Environment
- OS: Windows
- Codex Desktop package path/version observed:
OpenAI.Codex_26.519.11010.0_x64__2p2nqsd0c76g0 - Browser plugin cache observed:
openai-bundled/browser/26.519.81530 node_repl.exepath observed:%LOCALAPPDATA%/OpenAI/Codex/bin/3c238e29bbc930ff/node_repl.execodex.exepath observed:%LOCALAPPDATA%/OpenAI/Codex/bin/958d608b5e0546a5/codex.exe
Impact
mcp__node_repl__.jsfails even for a minimal script like:
nodeRepl.write(JSON.stringify({ ok: true }));
- Because the Browser skill depends on
node_repl, the in-app browser cannot be inspected or controlled. - Ordinary PowerShell/shell commands still work.
Reproduction / observed sequence
- Open Codex Desktop on Windows.
- Open the in-app browser to a simple page such as
https://www.google.com/. - Invoke
node_replthrough the Codex tool layer with a minimal script. - The kernel exits immediately with:
windows sandbox failed: spawn setup refresh
reason: stdout_eof
Troubleshooting already attempted
- Restarted Windows.
- Fully quit Codex and reopened it.
- Uninstalled Codex, rebooted, reinstalled Codex.
- Renamed/reset
~/.codex/config.toml; Codex regenerated the config. - Confirmed
node_repl.exe --helpruns successfully from PowerShell, so the binary itself is present and executable. - Confirmed normal shell commands run successfully under Codex.
- Confirmed the regenerated config includes:
[windows]
sandbox = "elevated"
- Temporarily tested whether adding
--disable-sandboxto[mcp_servers.node_repl].argsinconfig.tomlwould help, but the actualnode_repl.exeprocess command line did not include that argument, so the Desktop app appears not to pass that config value to the managednode_replserver. The change was reverted.
Additional diagnostic notes
- A shell tool call later surfaced another sandbox-related Windows error:
windows sandbox: CreateProcessWithLogonW failed: 5
~/.codex/.sandbox/sandbox.logshows ordinary sandbox setup calls completing successfully for PowerShell commands, so the failure seems specific to thenode_replstartup path rather than all sandboxed commands.
Expected behavior
node_repl should start successfully, and the in-app browser should be accessible through the Browser skill.
Actual behavior
node_repl exits immediately with windows sandbox failed: spawn setup refresh, making in-app browser automation unavailable.
6 Comments
the same issue
I am seeing the same failure on Windows Codex Desktop.
Environment:
OpenAI.Codex 26.527.3686.0Profile 6%LOCALAPPDATA%\OpenAI\extension\com.openai.codexextension.jsonFailure:
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}
Minimal reproduction:
nodeRepl.write('node bridge ok')
That fails before any Chrome/browser automation code runs, so this appears to be the Codex local
node_repl/ Windows sandbox startup path rather than Chrome itself.Troubleshooting already tried:
windows sandbox failed: spawn setup refreshImpact:
node_replare unavailableOne thing that helped us separate "the binary is broken" from "the desktop-managed launch path is broken" was logging the exact runtime identity the app thought it was using.
In our case, the shell still worked and the binary existed, but the managed child path was the part that had drifted. Two checks that seem worth adding here:
node_repl, not just whethernode_repl.exe --helpworks manuallyThat at least narrows the bug to the lifecycle around sandboxed child startup instead of the Node REPL binary itself.
The
CreateProcessWithLogonW failed: 5clue also makes this feel more like Windows process-launch / sandbox orchestration than a bad JS/kernel path.Adding a cross-reference to a confirmed Windows workaround and pasteable prompt: https://github.com/openai/codex/issues/25419#issuecomment-4639724031
Summary: this can be a Windows sandbox/setup-refresh problem below Chrome, not a Chrome extension/native-host problem. In one Codex Desktop repro,
node_replfailed before any Chrome code ran because the AppDatacodex-windows-sandbox-setup.exehelper failed withos error 740. Adding a per-user AppCompatRUNASINVOKERentry for the exact failing helper path restorednode_repl, in-app Browser, and Chrome extension backend control while keeping[windows] sandbox = "elevated".The linked comment includes caveats and a prompt users can give Codex so it first verifies the exact
os error 740evidence and asks for explicit approval before making the registry change.Codex Desktop for Windows Browser/node_repl helper fails after cache quarantine and full reinstall.
Main error:
windows sandbox failed: spawn setup refresh
Fresh log shows:
The requested operation requires elevation. (os error 740)
Main Codex shell works, codex doctor is green, but node_repl/Browser helper fails before code runs.
codex-node-repl-post-quarantine-support-payload.md
this is now fixed