codex - 💡(How to fix) Fix Windows Desktop: node_repl/in-app browser fails with `windows sandbox failed: spawn setup refresh` after reinstall

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Error Message

  • A shell tool call later surfaced another sandbox-related Windows error:

Root Cause

  • Because the Browser skill depends on node_repl, the in-app browser cannot be inspected or controlled.
  • Ordinary PowerShell/shell commands still work.

Code Example

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}

---

nodeRepl.write(JSON.stringify({ ok: true }));

---

windows sandbox failed: spawn setup refresh
reason: stdout_eof

---

[windows]
sandbox = "elevated"

---

windows sandbox: CreateProcessWithLogonW failed: 5
RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

node_repl should start successfully, and the in-app browser should be accessible through the Browser skill.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows Desktop: node_repl/in-app browser fails with `windows sandbox failed: spawn setup refresh` after reinstall