Skip to content

Windows sandbox failed spawn setup refresh OS error 740 #25362

@TheB1ak3

Description

@TheB1ak3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingcomputer-usesandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions