Windows Desktop node_repl fails with sandbox setup refresh / os error 740
Bug Report: Codex Windows Desktop node_repl fails with sandbox setup refresh / os error 740
Summary
Codex Windows Desktop can discover the node_repl MCP tool, but any js execution immediately fails because the JS kernel exits during Windows sandbox setup.
This also breaks Browser, Chrome, and Computer Use workflows that depend on node_repl.
Environment
- OS: Windows
- Codex Desktop package:
OpenAI.Codex_26.527.3686.0_x64 - Codex CLI:
codex-cli 0.135.0-alpha.1 - Node runtime used by Codex:
v24.14.0 - Shell: PowerShell
Reproduction
- Start Codex Desktop on Windows.
- Open a new local thread.
- Run a minimal
node_replsmoke test:
nodeRepl.write("ok")
Actual Result
The tool is present, but the kernel exits unexpectedly:
node_repl kernel exited unexpectedly
node_repl diagnostics:
{
"kernel_pid": 51832,
"kernel_status": "running",
"kernel_stderr_tail": "windows sandbox failed: spawn setup refresh",
"reason": "stdout_eof",
"stream_error": null
}
The sandbox log shows:
START: ...\node.exe --experimental-vm-modules ...\kernel.js
setup refresh: spawning C:\Users\Lenovo\AppData\Local\OpenAI\Codex\bin\7dea4a003bc76627\codex-windows-sandbox-setup.exe
setup refresh: failed to spawn ...\codex-windows-sandbox-setup.exe: ... (os error 740)
Windows os error 740 indicates the requested operation requires elevation.
Expected Result
The minimal node_repl JS call should return:
ok
Browser, Chrome, and Computer Use plugin workflows should then be able to bootstrap normally.
Additional Findings
- Running Codex Desktop as administrator did not resolve the failure.
- The normal shell sandbox can still run PowerShell commands, so the issue appears specific to the
node_repl -> JS kernel -> Windows sandbox setuppath. - Manual direct testing showed that
node_repl.exe --disable-sandboxcan execute a minimal JS call successfully outside the Desktop-managed MCP lifecycle. - Some Desktop-managed
node_repl.exeprocesses are launched without--disable-sandbox, even after adding the following toC:\Users\Lenovo\.codex\config.toml:
[mcp_servers.node_repl]
args = ["--disable-sandbox"]
This suggests there may be multiple Desktop MCP launch paths, with at least one ignoring the configured args.
Impact
This prevents use of:
- Browser plugin
- Chrome plugin
- Computer Use plugin
- Any workflow requiring
mcp__node_repl.js
The rest of Codex local shell execution may continue to work, which makes the failure easy to misdiagnose as a browser/plugin-specific issue.
Request
Please investigate the Windows Desktop node_repl sandbox setup path, especially:
- why
codex-windows-sandbox-setup.exeis launched from the AppData CLI bundle and fails withos error 740; - why administrator launch does not resolve it;
- why configured
mcp_servers.node_repl.args = ["--disable-sandbox"]is not consistently applied to Desktop-managednode_repl.exeinstances.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional reproduction on a newer Codex Desktop build.
Environment:
OpenAI.Codex_26.602.4764.0_x64__2p2nqsd0c76g0```toml
sandbox_mode = "workspace-write"
[windows]
sandbox = "elevated"
```
Observed behavior:
CreateProcessAsUserW failed: 1312when not elevated.``
powershell
``Get-Date
node_replstill failed even after Administrator launch and a fresh isolated thread.Minimal failing test:
node_repl result:
Relevant sandbox log pattern:
Troubleshooting already attempted:
js_reset; node_repl still failedCurrent state:
node_replMCP/runtime still fails withwindows sandbox failed: spawn setup refresh/os error 740.This appears consistent with the existing report: normal shell execution can use the WindowsApps helper successfully, while
node_repluses the AppData helper path and fails during sandbox setup refresh.Adding a confirmed workaround data point from Codex Desktop on Windows, plus a pasteable prompt other affected users can give to Codex.
Environment / symptom:
OpenAI.Codex_26.602.4764.0_x64__2p2nqsd0c76g0``
toml
``[windows]
sandbox = "elevated"
node_repl, in-app Browser, and the Chrome extension backend all failed before any JS/browser automation code ran.Minimal failure:
Result:
The concrete sandbox log failure was the AppData helper path:
Workaround tested:
Added per-user AppCompat
RUNASINVOKERentries under:for:
After that, without changing
[windows] sandbox = "elevated":nodeRepl.write('node_repl ok')succeededhttps://example.com/browserId: "extension", saw existing Chrome tabs, opened a Chrome-controlled tab, and verifiedhttps://example.com/Caveats:
asInvokermanifest or the setup-refresh path should avoid spawning a helper that Windows treats as elevation-required.no-sandboxas a workaround.Pasteable prompt for affected users:
I’m seeing a related Windows Computer Use failure on Codex Desktop as well.
Environment:
C:\Users\AdministratorInitial failure:
windows sandbox failed: spawn setup refreshstdout_eofos error 740while spawning:C:\Users\Administrator\AppData\Local\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exeWorkaround applied:
RUNASINVOKERfor the setup helper path above.os error 740disappeared.setup refresh: processed 1 write roots (read roots delegated); errors=[]setup binary completedRemaining failure:
Computer Use native pipe path is unavailablecomputer-use notify config ensure finished platform=win32 reason=missing-helper-path status=skippedcomputer-use native pipe startup failed errorMessage="Windows Computer Use helper paths are unavailable"computer_use_native_pipe_thread_config_skipped platform=win32 reason=not-readyAdditional check:
C:\Users\Administrator\.codex\plugins\cache\openai-bundled\computer-use\26.602.40724C:\Users\Administrator\.codex\plugins\cache\openai-bundled\computer-use\latest -> 26.602.40724latest:C:\Users\Administrator\.codex\plugins\cache\openai-bundled\computer-use\latest\node_modules\@oai\sky\bin\windows\codex-computer-use.exemissing-helper-pathand does not start the Computer Use native pipe.So
RUNASINVOKERfixes the 740 part, but the app still cannot resolve/start the Computer Use helper paths afterward.this is now fixed