Skip to content

Windows sandbox: CreateProcessAsUserW failed: 5 - unfixable on Windows 11 Enterprise (Dell) #26896

Description

@a1bailbonds

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.602.40724 • Released Jun 5, 2026

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Environment

  • Codex version: 0.137.0-alpha.4
  • OS: Windows 11 Enterprise 25H2 (Build 26200.8524)
  • Hardware: Dell laptop
  • Subscription: Pro (Monthly)

Error

windows sandbox: CreateProcessAsUserW failed: 5
windows sandbox: setup refresh failed with status exit code: 1
windows sandbox: CreateProcessWithLogonW failed: 1326

Local PowerShell cannot be launched by the Codex sandbox on
Windows 11 Enterprise (Dell hardware). Every attempt to run
any local shell command fails immediately with:

windows sandbox: CreateProcessAsUserW failed: 5

The sandbox runner fails before PowerShell even starts.
This makes it impossible to use any local execution features
in Codex including running commands, git operations, npm,
local dev server, or BrowserStack local testing.

The issue persists after exhaustive troubleshooting including
uninstalling McAfee, enabling Windows Sandbox, adjusting
security policies, recreating the CodexSandboxOffline account,
and clean reinstalling Codex multiple times.

Sandbox log error

setup error: helper_sid_resolve_failed: resolve SID for offline
user CodexSandboxOffline failed: LookupAccountNameW failed: 1332

What works

  • GitHub connector works fine
  • GitHub Actions runs successfully
  • apply_patch works
  • Everything except local shell execution

Request

Please provide either a fix or a supported way to run
Codex without the Windows sandbox on consumer Dell hardware.

What steps can reproduce the bug?

  1. Uninstalled McAfee completely using MCPR tool
  2. Ran as Administrator - did not fix
  3. Granted file permissions via icacls on entire Codex folder
  4. Added registry MitigationOptions for codex.exe, node.exe,
    codex-command-runner.exe, codex-windows-sandbox-setup.exe
  5. Exported and edited security policy to add SeAssignPrimaryTokenPrivilege
    for CodexSandboxOffline account SID
  6. Enabled Windows Sandbox feature (Containers-DisposableClientVM)
  7. Enabled VirtualMachinePlatform and HypervisorPlatform
  8. Disabled Memory Integrity (Core Isolation) in Windows Security
  9. Disabled vGPU sharing via registry (AllowVGPU = 0)
  10. Verified BIOS - Intel VT and VT for Direct I/O both ON
  11. Deleted and recreated CodexSandboxOffline account multiple times
  12. Deleted and regenerated .sandbox-secrets/sandbox_users.json
  13. Updated SeAssignPrimaryTokenPrivilege with correct SID after
    each account recreation
  14. Clean reinstall of Codex multiple times
  15. Upgraded Windows from Home to Enterprise
  16. Switched Agent Environment from Windows Native to WSL
  17. Installed WSL2 with Ubuntu and PowerShell 7.6.2
  18. Multiple reboots throughout

What is the expected behavior?

Expected Behavior

When asking Codex to run a local PowerShell command (e.g.,
"test local PowerShell" or "show how the site looks on mobile"),
Codex should be able to launch a local PowerShell process through
its sandbox runner and return the command output.

Actual Behavior

Codex fails before PowerShell even starts. The sandbox runner
cannot create the process and returns:
windows sandbox: CreateProcessAsUserW failed: 5

No commands ever execute. The failure happens at the process
creation layer, not at the command level.

Impact

Unable to use any local shell execution features including:

  • Running PowerShell commands
  • Running npm, git, or other local tools
  • Local dev server
  • BrowserStack local testing
  • Any file system operations via shell

All local execution has been rerouted through GitHub Actions
as a workaround, which works but is significantly slower.

Additional information

Additional Information

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions