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.exe path observed: %LOCALAPPDATA%/OpenAI/Codex/bin/3c238e29bbc930ff/node_repl.exe
  • codex.exe path observed: %LOCALAPPDATA%/OpenAI/Codex/bin/958d608b5e0546a5/codex.exe

Impact

  • mcp__node_repl__.js fails 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

  1. Open Codex Desktop on Windows.
  2. Open the in-app browser to a simple page such as https://www.google.com/.
  3. Invoke node_repl through the Codex tool layer with a minimal script.
  4. 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 --help runs 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-sandbox to [mcp_servers.node_repl].args in config.toml would help, but the actual node_repl.exe process command line did not include that argument, so the Desktop app appears not to pass that config value to the managed node_repl server. 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.log shows ordinary sandbox setup calls completing successfully for PowerShell commands, so the failure seems specific to the node_repl startup 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.

View original on GitHub ↗

6 Comments

LWB-0524 · 1 month ago

the same issue

dbdavis4484 · 1 month ago

I am seeing the same failure on Windows Codex Desktop.

Environment:

  • Codex app: OpenAI.Codex 26.527.3686.0
  • Windows Desktop
  • Chrome is installed and running
  • Codex Chrome Extension was previously checked as installed/enabled in Chrome Profile 6
  • Native messaging host manifest was previously checked as correct at %LOCALAPPDATA%\OpenAI\extension\com.openai.codexextension.json

Failure:

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:

  • Rebooted Windows
  • Relaunched Codex
  • Reinstalled Codex
  • Checked Windows Security Protection History: no blocks found
  • Retested after reinstall: same windows sandbox failed: spawn setup refresh

Impact:

  • Chrome automation bridge cannot start
  • In-app/browser automation paths depending on node_repl are unavailable
Keesan12 · 1 month ago

One 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:

  1. print the exact command line + workspace/data dir the desktop app is using for node_repl, not just whether node_repl.exe --help works manually
  2. log whether the app is starting a fresh managed runtime after reinstall or reusing stale state from an older install/session

That at least narrows the bug to the lifecycle around sandboxed child startup instead of the Node REPL binary itself.

The CreateProcessWithLogonW failed: 5 clue also makes this feel more like Windows process-launch / sandbox orchestration than a bad JS/kernel path.

ryancom16 · 1 month ago

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_repl failed before any Chrome code ran because the AppData codex-windows-sandbox-setup.exe helper failed with os error 740. Adding a per-user AppCompat RUNASINVOKER entry for the exact failing helper path restored node_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 740 evidence and asks for explicit approval before making the registry change.

djm41534-bot · 1 month ago

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

iceweasel-oai contributor · 1 month ago

this is now fixed