Skip to content

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

Open

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

  1. added
    app
    on Jun 7, 2026
  2. added
    bug
    windows-os
    sandbox
    on Jun 7, 2026
  3. Mahkhmood9 commented on Jun 7, 2026

    @Mahkhmood9

    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

  4. AndrewXiGua commented on Jun 12, 2026

    @AndrewXiGua

    +1

  5. russ0133 commented on Jun 15, 2026

    @russ0133

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

  6. IllusionVK commented on Jun 17, 2026

    @IllusionVK

    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)

  7. russ0133 commented on Jun 17, 2026

    @russ0133

    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.

  8. willray88 commented on Jun 17, 2026

    @willray88

    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.

  9. Mahkhmood9 commented on Jun 29, 2026

    @Mahkhmood9

    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 )

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

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions