Skip to content

Windows Desktop: node_repl/in-app browser fails with windows sandbox failed: spawn setup refresh after reinstall #25012

Closed

Description

@tonykey910

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.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    on May 29, 2026
  2. LWB-0524 commented on May 30, 2026

    @LWB-0524

    the same issue

  3. dbdavis4484 commented on May 31, 2026

    @dbdavis4484

    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
  4. Keesan12 commented on Jun 5, 2026

    @Keesan12
  5. ryancom16 commented on Jun 6, 2026

    @ryancom16

    Adding a cross-reference to a confirmed Windows workaround and pasteable prompt: #25419 (comment)

    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.

  6. djm41534-bot commented on Jun 8, 2026

    @djm41534-bot

    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

  7. iceweasel-oai commented on Jun 12, 2026

    @iceweasel-oai
    Contributor

    this is now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbrowserbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions