Windows Codex Node REPL MCP fails with `windows sandbox failed: spawn setup refresh`, breaking spreadsheet artifact runtime

Open 💬 2 comments Opened Jun 4, 2026 by graemeh

Summary

On Windows Codex Desktop, the Node REPL MCP server is exposed but fails even on a minimal smoke test. This prevents spreadsheet artifact workflows that expect the Node REPL / @oai/artifact-tool path from working, and forces fallback to local Python workbook generation.

Environment

  • Platform: Windows / PowerShell
  • Codex Desktop version observed: OpenAI.Codex_26.601.2237.0_x64
  • Codex command runner observed: codex-command-runner-0.136.0-alpha.2.exe
  • Node REPL executable configured under %LOCALAPPDATA%\OpenAI\Codex\bin\...\node_repl.exe
  • Node configured for Node REPL under %LOCALAPPDATA%\OpenAI\Codex\bin\...\node.exe
  • Primary-runtime Spreadsheets plugin enabled
  • Curated remote Data Analytics, Investment Banking, and Public Equity Investing skills also installed/enabled in the cache

Relevant config shape:

[features]
memories = true
js_repl = false

[mcp_servers.node_repl]
args = []
command = '<LOCALAPPDATA>\\OpenAI\\Codex\\bin\\<hash>\\node_repl.exe'
startup_timeout_sec = 120

[mcp_servers.node_repl.env]
NODE_REPL_NATIVE_PIPE_CONNECT_TIMEOUT_MS = "1000"
NODE_REPL_NODE_MODULE_DIRS = ""
NODE_REPL_NODE_PATH = '<LOCALAPPDATA>\\OpenAI\\Codex\\bin\\<hash>\\node.exe'
NODE_REPL_TRUSTED_CODE_PATHS = '<CODEX_HOME>'
CODEX_HOME = '<CODEX_HOME>'

Reproduction

  1. Start a Codex session on Windows.
  2. Use/discover the Node REPL MCP tools.
  3. Run js_reset.
  4. Run a minimal JS smoke test:
nodeRepl.write(JSON.stringify({ cwd: nodeRepl.cwd, tmpDir: nodeRepl.tmpDir }));

Actual result

The Node REPL kernel exits unexpectedly:

node_repl kernel exited unexpectedly

node_repl diagnostics: {"kernel_pid":18780,"kernel_status":"running","kernel_stderr_tail":"windows sandbox failed: spawn setup refresh","reason":"stdout_eof","stream_error":null}

Attempting an import has the same failure:

try {
  var mod = await import('@oai/artifact-tool');
  nodeRepl.write(JSON.stringify({available:true, keys:Object.keys(mod).slice(0,10)}));
} catch (e) {
  nodeRepl.write(JSON.stringify({available:false, error:String(e)}));
}

Result:

node_repl kernel exited unexpectedly

node_repl diagnostics: {"kernel_pid":39180,"kernel_status":"running","kernel_stderr_tail":"windows sandbox failed: spawn setup refresh","reason":"stdout_eof","stream_error":null}

After stopping a stale node_repl.exe process, js_reset failed with:

tool call error: tool call failed for `node_repl/js_reset`

Caused by:
    Transport closed

Expected result

The minimal smoke test should execute and return JSON. Spreadsheet artifact workflows should be able to use the documented Node REPL / @oai/artifact-tool workflow, or the runtime dependency path should be exposed clearly.

Additional observations

  • The primary-runtime Spreadsheets plugin exists but appears to contain skills/assets only, not an obvious node_modules directory or @oai/artifact-tool package.
  • NODE_REPL_NODE_MODULE_DIRS is empty in the Node REPL MCP environment.
  • A separate Data Analytics spreadsheets skill exists in the curated remote plugin cache.
  • Investment Banking and Public Equity Investing plugins include workbook-related scripts/templates. These may add routing ambiguity, but the Node REPL crash appears independent because even the minimal smoke test fails.
  • Local memory/history in this environment showed the same windows sandbox failed: spawn setup refresh failure before the current workbook task, suggesting this is not caused solely by the newest skills.

User impact

  • Documented spreadsheet artifact runtime cannot be used.
  • Spreadsheet tasks fall back to ad hoc Python/local package workflows.
  • One workaround attempt produced a hand-built XLSX package that Excel refused to open as corrupt.
  • A valid workbook was later generated only after installing openpyxl locally into the workspace.

Questions / suggested investigation

  1. Why does Node REPL fail on a minimal smoke test with windows sandbox failed: spawn setup refresh?
  2. Why does killing a stale node_repl.exe leave the MCP transport closed rather than respawning cleanly?
  3. Should [features].js_repl = false coexist with an exposed node_repl MCP server/tool?
  4. Should NODE_REPL_NODE_MODULE_DIRS be empty when spreadsheet skills instruct agents to use @oai/artifact-tool?
  5. Should @oai/artifact-tool be present in the primary-runtime plugin cache, or resolved through another dependency loader that is not currently exposed?
  6. Could multiple spreadsheet/workbook-oriented skills from primary-runtime, Data Analytics, Investment Banking, and Public Equity Investing create routing ambiguity for workbook tasks?

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗