codex - 💡(How to fix) Fix Windows Codex Desktop regenerates node_repl MCP config that crashes with UAC ERROR_ELEVATION_REQUIRED when Computer Use is enabled

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…

On Windows, after a clean uninstall/reinstall and plugin cache regeneration, Codex Desktop automatically creates a mcp_servers.node_repl config that launches node_repl.exe with args = [] and sets CODEX_CLI_PATH to an AppData-cached codex.exe.

When Computer Use is tested, node_repl starts a Node kernel through that AppData codex.exe, which then attempts to run codex-windows-sandbox-setup.exe from the AppData cache. Windows rejects that spawn with ERROR_ELEVATION_REQUIRED / os error 740, causing the Node REPL MCP transport to close before Computer Use can bootstrap.

This appears reproducible after clean reinstall, so it does not look like stale user config alone.

Error Message

When Computer Use is tested, node_repl starts a Node kernel through that AppData codex.exe, which then attempts to run codex-windows-sandbox-setup.exe from the AppData cache. Windows rejects that spawn with ERROR_ELEVATION_REQUIRED / os error 740, causing the Node REPL MCP transport to close before Computer Use can bootstrap. setup refresh: failed to spawn %LOCALAPPDATA%\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exe: The requested operation requires elevation. (os error 740) This causes node_repl to route through the AppData Codex CLI sandbox path, which then tries to spawn codex-windows-sandbox-setup.exe and fails with os error 740. Because the spawned helper is named codex-windows-sandbox-setup.exe, Windows UAC installer detection may classify the AppData helper as requiring elevation when launched from this path/context. The failure is then surfaced as ERROR_ELEVATION_REQUIRED / os error 740.

Root Cause

Because the spawned helper is named codex-windows-sandbox-setup.exe, Windows UAC installer detection may classify the AppData helper as requiring elevation when launched from this path/context. The failure is then surfaced as ERROR_ELEVATION_REQUIRED / os error 740.

Fix Action

Fix / Workaround

Generate node_repl config with --disable-sandbox when used inside Codex Desktop/plugin runtime. Avoid setting CODEX_CLI_PATH for node_repl in this Desktop plugin path. Launch the sandbox setup helper from the packaged WindowsApps resource context instead of the AppData cache. Add an explicit UAC manifest such as requestedExecutionLevel level="asInvoker" to codex-windows-sandbox-setup.exe if appropriate. Rename or otherwise prevent the helper from triggering installer detection, if the filename is part of the issue. Workarounds tried Manually setting args = ["--disable-sandbox"] allowed progress in one earlier session, but after reinstall/new generation the bad config returned. Removing CODEX_CLI_PATH from the node_repl env may avoid this path, but this is not a stable product fix and can be overwritten/regenerated. Full uninstall/reinstall did not resolve the root cause because the generated config reproduced the bad pattern.

RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

OpenAI.Codex_26.602.3474.0_x64__2p2nqsd0c76g0

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Summary

On Windows, after a clean uninstall/reinstall and plugin cache regeneration, Codex Desktop automatically creates a mcp_servers.node_repl config that launches node_repl.exe with args = [] and sets CODEX_CLI_PATH to an AppData-cached codex.exe.

When Computer Use is tested, node_repl starts a Node kernel through that AppData codex.exe, which then attempts to run codex-windows-sandbox-setup.exe from the AppData cache. Windows rejects that spawn with ERROR_ELEVATION_REQUIRED / os error 740, causing the Node REPL MCP transport to close before Computer Use can bootstrap.

This appears reproducible after clean reinstall, so it does not look like stale user config alone.

Environment

  • OS: Windows
  • Codex Desktop package observed: OpenAI.Codex_26.602.3474.0_x64__2p2nqsd0c76g0
  • Bundled plugins observed after reinstall:
    • computer-use@openai-bundled version 26.602.30954
    • browser@openai-bundled version 26.602.30954
    • chrome@openai-bundled version 26.602.30954
  • Computer Use plugin root:
    • %USERPROFILE%\.codex\plugins\cache\openai-bundled\computer-use\26.602.30954
  • AppData runtime cache root:
    • %LOCALAPPDATA%\OpenAI\Codex\bin

What steps can reproduce the bug?

Reproduction steps

  1. Uninstall/reinstall Codex Desktop and clear/rebuild the Codex plugin/runtime cache.
  2. Enable bundled plugins:
    • Browser
    • Chrome
    • Computer Use
  3. Start Codex Desktop.
  4. Open a thread and invoke Computer Use.
  5. Follow the official Computer Use bootstrap path:
    • import <computer-use plugin root>/scripts/computer-use-client.mjs
    • call setupComputerUseRuntime({ globals: globalThis })
    • call sky.list_apps()

What is the expected behavior?

Actual behavior

The Node REPL MCP kernel exits before Computer Use can connect:

node_repl kernel exited unexpectedly

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

Sandbox log shows:
setup refresh: spawning %LOCALAPPDATA%\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exe
setup refresh: failed to spawn %LOCALAPPDATA%\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exe: The requested operation requires elevation. (os error 740)

## Expected behavior
A clean Codex Desktop install with bundled Computer Use enabled should generate a working node_repl MCP configuration. Computer Use bootstrap should reach sky.list_apps() without requiring manual edits to config.toml.

### Additional information

## Generated config after clean reinstall
After reinstall, Codex regenerated this node_repl section:
[mcp_servers.node_repl]
args = []
command = 'C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\34ab3e1324cc55b5\node_repl.exe'
startup_timeout_sec = 120

[mcp_servers.node_repl.env]
NODE_REPL_NODE_PATH = 'C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\5b9024f90663758b\node.exe'
CODEX_CLI_PATH = 'C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\fb2111b91430cb17\codex.exe'

The important part is the combination of:
args = []
CODEX_CLI_PATH = '<AppData cached codex.exe>'

This causes node_repl to route through the AppData Codex CLI sandbox path, which then tries to spawn codex-windows-sandbox-setup.exe and fails with os error 740.

## Evidence checked
AppData-cached codex.exe, node.exe, node_repl.exe, and codex-windows-sandbox-setup.exe match the package resource binaries by SHA-256 in the earlier package version tested.
Authenticode signatures were valid.
No AppCompat Run as administrator compatibility layer was found for Codex.
Windows UAC settings appear normal:
EnableLUA = 1
EnableInstallerDetection = 1
The failure reproduces after clean reinstall/cache rebuild, with a newly generated AppData runtime path.

## Suspected cause
The regenerated node_repl MCP config appears to be unsafe for Windows when CODEX_CLI_PATH points to the AppData-cached Codex CLI and args = [].

Because the spawned helper is named codex-windows-sandbox-setup.exe, Windows UAC installer detection may classify the AppData helper as requiring elevation when launched from this path/context. The failure is then surfaced as ERROR_ELEVATION_REQUIRED / os error 740.

Potential fixes might include one or more of:

Generate node_repl config with --disable-sandbox when used inside Codex Desktop/plugin runtime.
Avoid setting CODEX_CLI_PATH for node_repl in this Desktop plugin path.
Launch the sandbox setup helper from the packaged WindowsApps resource context instead of the AppData cache.
Add an explicit UAC manifest such as requestedExecutionLevel level="asInvoker" to codex-windows-sandbox-setup.exe if appropriate.
Rename or otherwise prevent the helper from triggering installer detection, if the filename is part of the issue.
Workarounds tried
Manually setting args = ["--disable-sandbox"] allowed progress in one earlier session, but after reinstall/new generation the bad config returned.
Removing CODEX_CLI_PATH from the node_repl env may avoid this path, but this is not a stable product fix and can be overwritten/regenerated.
Full uninstall/reinstall did not resolve the root cause because the generated config reproduced the bad pattern.

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

A clean Codex Desktop install with bundled Computer Use enabled should generate a working node_repl MCP configuration. Computer Use bootstrap should reach sky.list_apps() without requiring manual edits to config.toml.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING