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

Open 💬 8 comments Opened Jun 7, 2026 by a1bailbonds
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

  1. Exported and edited security policy to add SeAssignPrimaryTokenPrivilege

for CodexSandboxOffline account SID

  1. Enabled Windows Sandbox feature (Containers-DisposableClientVM)
  2. Enabled VirtualMachinePlatform and HypervisorPlatform
  3. Disabled Memory Integrity (Core Isolation) in Windows Security
  4. Disabled vGPU sharing via registry (AllowVGPU = 0)
  5. Verified BIOS - Intel VT and VT for Direct I/O both ON
  6. Deleted and recreated CodexSandboxOffline account multiple times
  7. Deleted and regenerated .sandbox-secrets/sandbox_users.json
  8. Updated SeAssignPrimaryTokenPrivilege with correct SID after

each account recreation

  1. Clean reinstall of Codex multiple times
  2. Upgraded Windows from Home to Enterprise
  3. Switched Agent Environment from Windows Native to WSL
  4. Installed WSL2 with Ubuntu and PowerShell 7.6.2
  5. 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

  • This issue began when asking Codex "how does the site look

on mobile" - which triggered local BrowserStack testing

  • The CodexSandboxOffline account was successfully created and

logged in (confirmed in Windows Security Event Log), but
CreateProcessAsUserW still failed with error 5

  • Windows Sandbox app itself also fails independently with

"The connection to the Windows Sandbox environment was lost"
suggesting a deeper system-level conflict on Dell hardware

  • Switching Agent Environment to WSL in Codex settings and

installing PowerShell in WSL is the current workaround
being tested

  • Other users reporting same error on GitHub:

Issues #19189, #10090, #22428, #25436, #14211

View original on GitHub ↗

8 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #26803
  • #26644
  • #26186
  • #25436
  • #26871

Powered by Codex Action

Mahkhmood9 · 1 month ago

Can you replicate it on CLI ,,

or is it only the desktop app ---

reminder you can use Codex , using the VSCODE ide from their extention - if you are having issues with the Codex Desktop app

AndrewXiGua · 1 month ago

+1

russ0133 · 1 month ago

+1 when trying to get the in-app browser to take a screenshot of the app.

IllusionVK · 1 month ago

Hi @a1bailbonds, i had this same issue, and I asked codex to investigate this itself, and after changing config.toml

FROM
[windows]
sandbox = "elevated"

TO
[windows]
sandbox = "unelevated"

In-app browser was fixed for me. Maybe it works for you as well
(I am using Version 26.611.61753 • Released 17 June 2026)

russ0133 · 1 month ago
Hi @a1bailbonds, i had this same issue, and I asked codex to investigate this itself, and after changing config.toml FROM [windows] sandbox = "elevated" TO [windows] sandbox = "unelevated" In-app browser was fixed for me. Maybe it works for you as well (I am using Version 26.611.61753 • Released 17 June 2026)

Can confirm this worked for me, but I also was missing the version of power shell that was used by codex. Might have been this that fixed or a combination of both.

Power shell 7.6.2, then set the path on the config.toml on the node.repl env.

willray88 · 1 month ago
Hi @a1bailbonds, i had this same issue, and I asked codex to investigate this itself, and after changing config.toml FROM [windows] sandbox = "elevated" TO [windows] sandbox = "unelevated" In-app browser was fixed for me. Maybe it works for you as well (I am using Version 26.611.61753 • Released 17 June 2026)

Although I also solved it this way, I think there may be side effects from this setting, such as permissions, etc. It's not clear yet.

Mahkhmood9 · 21 days ago

Is this still relevant - the widnows-app had a serious of big overhual
@willray88 @russ0133 @a1bailbonds

is this still happen (update codex to the latest version - using the , offcial openai windows internet page )