Windows Desktop node_repl fails with os error 740 due to UAC installer detection on codex-windows-sandbox-setup.exe
Summary
Codex Desktop for Windows fails to start node_repl because Windows sandbox setup refresh cannot spawn codex-windows-sandbox-setup.exe from the AppData runtime cache.
This appears to be the same root cause as #24050 and related to #25419 / #25362, but I am adding a current Store Desktop reproduction with additional diagnostics that strongly confirm Windows UAC installer-detection behavior based on the helper filename.
Environment
- OS: Windows 11 Pro, 10.0.26200, x64
- Codex Desktop Store package:
OpenAI.Codex_26.602.3474.0_x64__2p2nqsd0c76g0 - Codex bundled browser/chrome plugin version observed:
26.602.30954 - Codex CLI/runtime in AppData:
0.137.0era runtime, withcodex.exeunder%LOCALAPPDATA%\OpenAI\Codex\bin\fb2111b91430cb17\codex.exe - Node runtime:
node.exeunder%LOCALAPPDATA%\OpenAI\Codex\bin\5b9024f90663758b\node.exe - Integrity/elevation context: user token is not elevated; medium integrity
- UAC policy:
EnableLUA=1,EnableInstallerDetection=1
Reproduction
- Launch Codex Desktop from the Microsoft Store app.
- Start a local thread on Windows.
- Execute the minimal
node_replsmoke test:
nodeRepl.write(JSON.stringify({ ok: true, cwd: nodeRepl.cwd }))
Actual result
The kernel exits immediately:
node_repl kernel exited unexpectedly
node_repl diagnostics: {
"kernel_stderr_tail": "windows sandbox failed: spawn setup refresh",
"reason": "stdout_eof"
}
The sandbox log shows:
START: %LOCALAPPDATA%\OpenAI\Codex\bin\5b9024f90663758b\node.exe --experimental-vm-modules ...\kernel.js ...
setup refresh: spawning %LOCALAPPDATA%\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exe (...)
setup refresh: failed to spawn ...\codex-windows-sandbox-setup.exe: The requested operation requires elevation. (os error 740)
This also prevents the Browser / Chrome plugin path that depends on node_repl from starting.
Diagnostics performed
- Repaired, reset, uninstalled, and reinstalled Codex Desktop.
- Verified there is no separate Web/Desktop install registered through normal uninstall registry entries;
winget list Codexonly shows the Store package. - Verified the AppData helper and Store resources helper are byte-identical:
codex-windows-sandbox-setup.exeSHA256:C1FE23AAAC3439F73CEA122BA703ECE302ACA5BB356CAB8C7FAEB894DF69CC30- Authenticode signature for
codex.exeandcodex-windows-sandbox-setup.exeis valid and signed by OpenAI. - No embedded
requestedExecutionLevel,requireAdministrator,highestAvailable,asInvoker,autoElevate, ortrustInfostrings were found in the helper binary. - Defender/AppLocker/CodeIntegrity logs did not show a direct block for the helper.
- Smart App Control had previously blocked a chrome extension host, but was disabled and the OS was restarted before this reproduction.
Filename-based UAC installer detection evidence
The same helper binary behaves differently depending only on filename.
Copied from the AppData runtime helper to %TEMP% / C:\tmp:
codex-windows-sandbox-setup-test.exe: fails to start withThe requested operation requires elevation.codex-sandbox-helper-test.exe: starts successfully and then exits with the expected helper argument decoding error because no real payload was supplied.
Using System.Diagnostics.ProcessStartInfo with UseShellExecute=false:
codex-sandbox-helper-test.exe
=> Started=true, ExitCode=1, stderr="helper_request_args_failed..."
codex-windows-sandbox-setup-test.exe
=> Started=false, error="The requested operation requires elevation"
This strongly suggests Windows UAC installer detection is triggered by the setup filename when no explicit asInvoker manifest is present.
Workaround confirmation
When launching the AppData codex.exe sandbox ... smoke test with __COMPAT_LAYER=RunAsInvoker inherited, sandbox setup refresh succeeds:
$env:__COMPAT_LAYER = 'RunAsInvoker'
& "%LOCALAPPDATA%\OpenAI\Codex\bin\fb2111b91430cb17\codex.exe" sandbox `
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" `
-NoProfile -Command "Write-Output ok"
Result:
ok
exit=0
The sandbox log then shows:
setup refresh: spawning ...\codex-windows-sandbox-setup.exe (...)
setup refresh: processed 0 write roots (read roots delegated); errors=[]
setup binary completed
I also added this to the local node_repl MCP env as a workaround:
__COMPAT_LAYER = "RunAsInvoker"
I have not yet confirmed the full Desktop node_repl path after app restart, but the direct inherited-env sandbox smoke test succeeds.
Expected result
node_repl should start without requiring UAC elevation, and sandbox setup refresh should not be classified by Windows as an installer/elevation request.
Suggested fix
Please embed an explicit application manifest in codex-windows-sandbox-setup.exe, for example:
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
Alternatively, rename the helper so it does not match Windows installer-detection heuristics, but an explicit manifest seems safer.
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce what looks like the same issue on another Windows Codex Desktop machine.
Environment
OpenAI.Codex_26.602.3474.0_x64__2p2nqsd0c76g0%LOCALAPPDATA%\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exenode_repl.exepath:%LOCALAPPDATA%\OpenAI\Codex\bin\34ab3e1324cc55b5\node_repl.exe%LOCALAPPDATA%\OpenAI\Codex\bin\5b9024f90663758b\node.exeMicrosoft Windows NT 10.0.26200.0Get-ComputerInforeportedWindowsProductName: Windows 10 Pro,WindowsVersion: 2009(build field was blank in this environment)Symptom
Even a minimal
node_replsmoke test fails before running any JavaScript:Tool result:
This prevents the Browser runtime from bootstrapping because the Browser plugin depends on the trusted
node_replpath.Relevant sandbox log evidence
Sanitized log excerpt:
Ordinary shell sandbox setup in the same session succeeds via the packaged WindowsApps helper:
Diagnostics tried
%LOCALAPPDATA%\OpenAI\Codex\binby moving cache directories to a backup folder and restarting Codex.fb2111b91430cb17.node --versionandnode -esucceed), so the failure is specific to the Codex-managednode_replsandbox setup path.Mandatory Label\High Mandatory Level.node_replcontinued to fail with the sameos error 740sandbox setup path.This matches the suspected UAC installer-detection behavior for
codex-windows-sandbox-setup.exeand the current Store Desktop runtime path.I am seeing the same issue again on another Windows machine, and the path churn makes the current
RUNASINVOKERworkaround quite fragile.Additional reproduction
Environment observed in logs:
10.0.26200, zh-CN localeOpenAI.Codex_26.602.3474.0_x64__2p2nqsd0c76g0%USERPROFILE%\.vscode\extensions\openai.chatgpt-26.602.30954-win32-x64\bin\windows-x86_64\codex-windows-sandbox-setup.exe%USERPROFILE%\.vscode\extensions\openai.chatgpt-26.602.40724-win32-x64\bin\windows-x86_64\codex-windows-sandbox-setup.exe%LOCALAPPDATA%\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exeOn 2026-06-06, multiple parallel Codex threads failed before running their requested commands. The sandbox log showed repeated setup-refresh failures such as:
After adding
~ RUNASINVOKERunderHKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layersfor the current helper paths, direct sandbox smoke tests succeeded for both AppData and VS Code extension runtimes:The important practical problem is that this workaround is path-specific. When Codex updates and the helper path changes, for example from a previous AppData hash to
fb2111b91430cb17or from VS Code extension26.602.30954to26.602.40724, the failure returns until every newcodex-windows-sandbox-setup.exepath is patched again.This makes the local workaround unreliable for normal users. I agree with the suggested fix in the issue body: the helper should either ship with an explicit
asInvokermanifest, or be renamed so it does not trigger Windows installer detection heuristics. Maintaining AppCompatFlags entries for versioned/hash-based helper paths is not a sustainable fix.I just updated to Codex for Windows version 26.609.30741, and it's still spamming me with UAC prompts for every single command. I've tried adding
RUNASINVOKER, but as previously mentioned, it seems to only work temporarily. Starting a new thread still prompts at least two more UAC prompts. This simply will not go away. This is SO frustrating!this is now fixed
Codex for Windows
Version 26.609.41114 • Released Jun 12, 2026is still generating one UAC prompt per command it tries to run, per thread. This is better than it was where it would spam UAC for every single command in every thread always. So it's better, but as I click to my various threads and keep doing work, it is still generating one UAC prompt per command it tries to run, but then it doesn't generate another for the same command again in that thread. If I switch to a different thread, I have to do the same thing. Is this expected now?(I'm using
Approve for memode with[windows] sandbox = "elevated"- Approval policyOn request- Sandbox settingsWorkspace write)[Update: it's only older threads. If I go back to an existing thread that was created and had the UAC spam problem, it continues doing that with
Approve for meselected. If I start a new thread and useApprove for me, it works and doesn't trigger UAC prompts.]This is still reproducible for me on Windows with Codex Desktop Store package OpenAI.Codex_26.616.6631.0
The failure mode matches this issue: shell/tool execution failed with Windows error 740 until applying RUNASINVOKER to codex-windows-sandbox-setup.exe. After adding the AppCompatFlags Layers entry for the helper and restarting Codex Desktop, local shell execution worked again.
The workaround codex created:
So this does not appear fully fixed in the current Store build. The workaround is effective, but the packaged helper still appears vulnerable to Windows installer/UAC detection unless the binary gets an explicit asInvoker manifest or is renamed to avoid setup-style installer heuristics.