Windows sandbox failed spawn setup refresh OS error 740
What version of the Codex App are you using (From “About Codex” dialog)?
26.521.10419
What subscription do you have?
Pro
What platform is your computer?
OS: Windows 11 Home 25H2, build 26200.8457, x64
What issue are you seeing?
Codex Desktop Windows Computer Use failed with:
windows sandbox failed: spawn setup refresh
stdout_eof
OS error 740: The requested operation requires elevation
Findings:
- Failure occurred while spawning codex-windows-sandbox-setup.exe.
- Running Codex as Administrator did not fix it.
- Helper executable could run manually from elevated PowerShell, but required a payload argument.
- SHA256 matched the packaged helper.
- No requireAdministrator manifest found.
- No AppCompatFlags RUNASADMIN entry existed.
- Adding AppCompatFlags RUNASINVOKER for the helper path made Computer Use work.
Possible cause:
Windows UAC installer/elevation behavior during CreateProcessW for codex-windows-sandbox-setup.exe.
What steps can reproduce the bug?
- Open Codex Desktop on Windows.
- Start a Codex session.
- Grant or request Computer Use access.
- Ask Codex to inspect the screen, for example: "Can you see my screen?"
- Computer Use fails during startup.
Observed error:
windows sandbox failed: spawn setup refresh
stdout_eof
OS error 740: The requested operation requires elevation
Running Codex Desktop as Administrator did not fix the issue.
Running the helper manually from elevated PowerShell showed that the executable can start, but it requires a payload argument:
helper_request_args_failed: expected payload argument
Applying RUNASINVOKER through AppCompatFlags Layers to the helper executable path made Computer Use start working.
Feedback ID: 019e7c04-9994-7722-93cd-e1d7d9b6edf8
What is the expected behavior?
Computer Use should initialize successfully after the user grants access. Codex should be able to start its Windows sandbox/helper process and inspect targetable windows without requiring a manual AppCompatFlags workaround.
Additional information
The failure appears to happen during process creation before the helper process fully starts.
Codex diagnostics indicated that the parent process attempted to spawn codex-windows-sandbox-setup.exe and Windows returned OS error 740.
Additional findings:
- The helper binary was not corrupted.
- The AppData helper and packaged WindowsApps helper had matching SHA256 hashes.
- No embedded requireAdministrator manifest was found.
- No existing RUNASADMIN AppCompatFlags entry was present for the helper.
- Adding RUNASINVOKER for the helper executable path made Computer Use work.
- I did not include session logs because the session contains private project/workspace details.
- Environment: Windows 11 Home 25H2, build 26200.8457, x64.
- Doctor was clean
10 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This appears to be the same root cause as #24050, but reproduced through Codex Desktop Computer Use. My workaround was AppCompatFlags RUNASINVOKER instead of modifying the binary manifest.
I can reproduce this issue on Codex Desktop for Windows.
Environment:
Observed behavior:
list_apps()check fails immediately.Observed diagnostic output:
The sandbox log shows the underlying failure while starting the AppData helper copy:
I also verified that the helper executable exists. The AppData helper copy and packaged WindowsApps helper have matching file size and timestamp. This appears consistent with the Windows UAC installer-detection / missing explicit asInvoker manifest diagnosis described in this issue.
For privacy, I am not attaching the full sandbox log because it includes local workspace paths.
Codex version: 26.527.3686.0
Windows 11
Symptoms:
Verified:
Issue persists after:
I'm experiencing the same issues with Codex for Windows, now v26.602.30954 also, where many commands run by Codex suddenly start triggering lots of UAC popups, specifically
rgfor some reason. I had it record logs that it saved with Feedback ID 019e8a3c-336f-78d1-b991-8b6576f51d30, if that helps someone who has access to that data.The UAC screenshots always show some kind of file requesting access like this:
Additional data point from another Windows 11 Home 25H2 machine.
Environment:
Observed behavior:
node_replstill fails before any JS executes.node_repl kernel exited unexpectedlywindows sandbox failed: spawn setup refreshreason: stdout_eofwss://ws.chatgpt.com/...101 Switching ProtocolsRelevant local app log evidence from the same machine:
node_repl.exepath.I also tested the commonly suggested workaround of changing:
to:
On this machine, before re-testing the full Desktop flow after restart, the bundled CLI path already showed another Windows sandbox failure when forced to unelevated mode:
Observed result:
So this may be a related but slightly different Windows sandbox failure path on Home 25H2, where
unelevatedis not an immediate clean workaround.Another affected Windows Codex Desktop user with the same
windows sandbox failed: spawn setup refreshfailure.Environment/evidence, redacted:
OpenAI.Codex_26.602.4764.0_x64__2p2nqsd0c76g0codex-command-runner-0.137.0-alpha.4.exenode_replexits before running JS.C:\Users\<user>\AppData\Local\OpenAI\extension\com.openai.codexextension.jsonwhoami = <domain>\codexsandboxofflineUSERPROFILE = C:\Users\<user>LOCALAPPDATA = C:\Users\<user>\AppData\LocalHKCU\Software\Google\Chrome\NativeMessagingHosts\com.openai.codexextensiontasklist /fo csv /nh /fi imagename eq chrome.exe->ERROR: Access deniedNode/bridge symptom:
Relevant sandbox log excerpt, redacted:
Later attempts also show the packaged helper path spawning/completing from the WindowsApps package path, but Chrome/Computer Use still fail through
node_replwith the samespawn setup refreshmessage.This appears to be the same elevation/setup-refresh issue, with an additional visible symptom that the sandbox identity/profile-registry mismatch prevents Chrome native-host and Chrome process/profile checks from working.
Adding a cross-reference to a more complete confirmation/prompt: https://github.com/openai/codex/issues/25419#issuecomment-4639724031
Summary: on Codex Desktop
OpenAI.Codex_26.602.4764.0_x64__2p2nqsd0c76g0with[windows] sandbox = "elevated", the AppDatacodex-windows-sandbox-setup.exepath failed withos error 740. Adding a per-user AppCompatRUNASINVOKERentry for the exact failing helper path restorednode_repl, the in-app Browser, and the Chrome extension backend without switching tounelevatedorno-sandbox.Important caveat: the registry override is keyed by exact executable path, so if a Codex update changes the helper hash/path it may need to be applied to the new path. The linked comment includes a pasteable Codex prompt that diagnoses the condition first and asks for explicit approval before making any registry change.
I’m seeing a related Windows Computer Use failure on Codex Desktop.
Environment:
C:\Users\AdministratorInitial failure:
windows sandbox failed: spawn setup refreshstdout_eofsetup refresh: failed to spawn C:\Users\Administrator\AppData\Local\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exeos error 740Workaround applied:
RUNASINVOKERfor:C:\Users\Administrator\AppData\Local\OpenAI\Codex\bin\fb2111b91430cb17\codex-windows-sandbox-setup.exeos 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.40724C:\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