codex - 💡(How to fix) Fix Windows sandbox failed spawn setup refresh OS error 740

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…

Error Message

OS error 740: The requested operation requires elevation Observed error: OS error 740: The requested operation requires elevation Codex diagnostics indicated that the parent process attempted to spawn codex-windows-sandbox-setup.exe and Windows returned OS error 740.

Root Cause

  • 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

Fix Action

Fix / Workaround

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.

RAW_BUFFERClick to expand / collapse

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?

  1. Open Codex Desktop on Windows.
  2. Start a Codex session.
  3. Grant or request Computer Use access.
  4. Ask Codex to inspect the screen, for example: "Can you see my screen?"
  5. 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

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows sandbox failed spawn setup refresh OS error 740