Windows: Sandbox cannot spawn any process (all commands fail with exit code -1073741502)

Open 💬 2 comments Opened Apr 30, 2026 by Xiubobo2002

What version of the IDE extension are you using?

26.422.71525

What subscription do you have?

ChatGPT Plus

Which IDE are you using?

VS Code (Remote-SSH)

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Description

Codex cannot execute any commands in sandbox mode on Windows.

All commands fail immediately with exit code:
-1073741502

Even the simplest commands do not work:
whoami
Get-Location
cmd /c whoami

Actual Behavior

All commands fail instantly with exit code -1073741502.

It appears that the sandbox cannot spawn any process at all.

Expected Behavior

Commands should execute normally inside the sandbox environment.

Additional Context

  • Commands run normally when executed manually in PowerShell
  • Commands also work when using escalated (non-sandbox) execution
  • The issue occurs consistently for all commands
  • Workspace is located on a non-system drive (F:\)

Impact

Codex is unable to execute any commands in sandbox mode, making it unusable for workflows that rely on command execution on Windows.

What steps can reproduce the bug?

Steps to Reproduce

  1. Open VS Code with Codex extension
  2. Connect to a Windows environment (Remote-SSH or local)
  3. Open a workspace located on a non-system drive (e.g., F:\)
  4. Ask Codex to execute a simple command in sandbox mode, such as:

whoami or Get-location

  1. Observe that the command fails immediately

Result

  • Command fails with exit code: -1073741502
  • No output is produced

Expected Result

  • Command should execute successfully and return output

Additional Notes

The issue disappears when using escalated execution, which suggests the problem is specific to the sandbox environment on Windows.

What is the expected behavior?

Commands should execute successfully in sandbox mode on Windows.

Even basic commands such as:

whoami
Get-Location
cmd /c whoami

should return normal output without errors.

The sandbox should be able to spawn processes correctly and behave consistently with manual execution in PowerShell.

Additional information

Additional Information

  • OS: Windows 10 22H2 (build 19045, x64)
  • IDE: VS Code (Remote-SSH)
  • Workspace location: F:\ (non-system drive)

Observations

  • The issue occurs only in sandbox mode
  • Escalated execution works correctly
  • Commands run instantly when executed manually in PowerShell
  • The failure happens before command execution (process spawn failure)

Notes

This may be related to:

  • Windows sandbox process spawning issues
  • Permission / ACL handling on non-system drives
  • Known instability of sandbox on Windows environments

This issue makes Codex sandbox mode unusable on Windows unless escalated execution is used.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗