Skip to content

Win: After upgrading Codex, I'm getting "windows sandbox: runner error: CreateProcessAsUserW failed: 1920" #20570

Open

Description

@Msirkovsky

What version of Codex CLI is running?

0.128.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.5

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

Terminal

What issue are you seeing?

Codex can't read any file and shows this error:
Ran cmd /c dir
└ execution error: Io(Custom { kind: Other, error: "windows sandbox: runner error: CreateProcessAsUserW failed: 1920" })

• I’m blocked by the local execution environment before I can read or edit the repo. Every shell call fails at process launch with:

windows sandbox: runner error: CreateProcessAsUserW failed: 1920

That means I couldn’t open {redacted}, inspect the codebase, apply patches, or run tests. I also checked MCP resources and the GitHub connector fallback, but this local CodeReviewer workspace is not exposed there.

Once the shell runner is working again, I can continue from the plan file and implement it end to end.

What steps can reproduce the bug?

  1. Start codex: "codex -a never -s workspace-write"
  2. Ask to implement any plan

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    bug
    on May 1, 2026
  2. added
    CLI
    windows-os
    sandbox
    tool-calls
    on May 1, 2026
  3. github-actions commented on May 1, 2026

    @github-actions
    Contributor
  4. daniel-gll commented on May 4, 2026

    @daniel-gll

    Same issue "windows sandbox: runner error: CreateProcessAsUserW failed: 1920". Windows 10, Powershell 7.6.1

  5. wavman commented on May 6, 2026

    @wavman

    Same issue with Windows 11 25H2, PowerShell 7.6.1 and Codex Desktop 0.128.0.

  6. yubaoquan commented on Jun 22, 2026

    @yubaoquan

    Adding another Windows data point for this issue.

    I am seeing the same sandbox runner failure:

    windows sandbox: runner error: CreateProcessAsUserW failed: 1920
    

    In my case it is intermittent rather than a total failure of every command. After restarting Codex Desktop, I ran a small set of sandboxed commands in the same workspace:

    • In a parallel batch, rg --files ... succeeded, while Get-Location, Get-ChildItem, and git status --short failed before the command actually executed with the same CreateProcessAsUserW failed: 1920 error.
    • Retrying serially, rg --files, git status --short, and Get-Content -Raw README.md succeeded.
    • Get-ChildItem ... still failed with CreateProcessAsUserW failed: 1920.
    • Running the same kind of diagnostic commands with escalated/non-sandboxed execution works.

    So this looks like the same Windows sandbox process-spawn family as this issue and the linked duplicates, but not necessarily a simple "all commands always fail" case. PowerShell/cmdlet launches and concurrent shell starts seem more likely to trigger it, while some direct executables such as rg can still succeed.

    The failure happens at the sandbox runner/process creation layer, before user command output is produced.

  7. bearwind commented on Jun 23, 2026

    @bearwind

    The same issue can be reproduced in Codex Desktop 26.616.71553. It completely breaks the 'Approve for me' and 'Full Access' functionality, resulting in a terrible user experience!

  8. Stache73 commented on Jun 26, 2026

    @Stache73

    Adding another Windows/Codex Desktop data point for the same CreateProcessAsUserW failed: 1920 sandbox runner failure.

    Environment:

    • Codex Desktop package folder: OpenAI.Codex_26.623.4041.0_x64__2p2nqsd0c76g0
    • OS context available to this thread: Windows, PowerShell shell, workspace-write sandbox
    • Workspace root: C:\Users\arvid\Documents\Codex\2026-06-26\i
    • Observed date: 2026-06-26

    Observed behaviour:

    • Normal sandboxed shell commands fail before PowerShell starts.
    • Read-only Get-Content -Path C:\Users\arvid\Documents\Codex\AGENTS.md fails with:
    windows sandbox: runner error: CreateProcessAsUserW failed: 1920
    
    • Trivial commands also fail with the same error:
      • Get-Location
      • Write-Output ok

    Recovery attempts:

    • Fully closed and reopened Codex Desktop.
    • Resumed the thread and retried the same normal sandboxed read.
    • The error persisted after restart.

    Workaround:

    • Running the same read-only command through escalated/non-sandboxed execution succeeds.
    • Example: Get-Content -Path C:\Users\arvid\Documents\Codex\AGENTS.md succeeds when run with escalated read-only access.

    Duplicate/release-note check before commenting:

    • This issue appears to be the exact existing tracker for failed: 1920.
    • I also checked recent openai/codex release notes via GitHub release rust-v0.142.2 published 2026-06-25 and did not see this sandbox launch failure called out there.
  9. Stache73 commented on Jun 27, 2026

    @Stache73

    Still present in the latest Codex Desktop release on this machine.

    Observed on:

    • Package folder: OpenAI.Codex_26.623.5546.0_x64__2p2nqsd0c76g0
    • Date observed: 2026-06-28
    • OS context: Windows, Codex Desktop
    • Shell context: PowerShell launched through Codex Desktop tooling

    Repro evidence from this session:

    • A read-only command such as Get-Content -Path "C:\Users\arvid\Documents\Codex\AGENTS.md" failed before PowerShell could execute.
    • The failure was:

    windows sandbox: runner error: CreateProcessAsUserW failed: 1920

    The same command succeeded when retried with the non-sandboxed/escalated workaround, so this still appears to be the sandbox process-launch failure rather than a problem with the PowerShell command or file path.

  10. Stache73 commented on Jun 29, 2026

    @Stache73

    Still reproducing on the latest Codex Desktop update available to me.

    Environment:

    • Date: 2026-06-30
    • Windows package folder: OpenAI.Codex_26.623.9142.0_x64__2p2nqsd0c76g0
    • Shell attempted by Codex: PowerShell

    Repro from a fresh Codex Desktop thread:

    1. Run a simple sandboxed PowerShell read command, for example:
      Get-AppxPackage OpenAI.Codex | Select-Object Name, Version, PackageFullName
    2. PowerShell does not start.
    3. Codex reports:
      windows sandbox: runner error: CreateProcessAsUserW failed: 1920

    The same failure happened earlier in the same thread when trying to read an attached text file with Get-Content, before PowerShell could start. Retrying the same read-only command outside the sandbox worked, so this still appears to be the sandbox process-launch failure rather than the target command itself.

    One extra note: when run outside the sandbox in this environment, Get-AppxPackage itself could not load the Appx module (Operation is not supported on this platform. (0x80131539)), so I used the installed WindowsApps package folder name above as the version source.

  11. Stache73 commented on Jul 1, 2026

    @Stache73

    Still reproducing after the latest Codex Desktop update available on this machine.

    Environment:

    • Date observed: 2026-07-01
    • Windows package folder: OpenAI.Codex_26.623.11225.0_x64__2p2nqsd0c76g0
    • Shell attempted by Codex: PowerShell
    • Sandbox mode/context: workspace-write / managed restricted filesystem

    Repro evidence from this session:

    1. Codex attempted a read-only attachment inspection:
      Get-Content -Path 'C:\Users\arvid\.codex\attachments\29a1da82-ead4-413c-b781-5d745a1ac35f\pasted-text.txt'
    2. PowerShell did not start.
    3. The tool call failed before command output with:
      windows sandbox: runner error: CreateProcessAsUserW failed: 1920
    4. Retrying the same read-only inspection outside the sandbox / with escalation succeeded.

    I also checked the current upstream state before posting:

    So this still appears to be the same Windows sandbox process-launch failure rather than a problem with the PowerShell command, attachment path, or file permissions.

  12. yubaoquan commented on Jul 9, 2026

    @yubaoquan
  13. mfmasud commented on Jul 29, 2026

    @mfmasud

    Resolved this by uninstall the pwsh and install it from https://github.com/PowerShell/PowerShell/releases

    Yes, this is what worked for me. I had installed PowerShell 7 LTS using the .msix option in the past. After uninstalling it and switching to the direct win-x64.msi option, I no longer face the sandbox error.

  14. johnaweiss commented on Jul 29, 2026

    @johnaweiss

    Resolved this by uninstall the pwsh and install it from https://github.com/PowerShell/PowerShell/releases

    you have to use the "preview" version?

  15. johnaweiss commented on Jul 29, 2026

    @johnaweiss

    switching to the direct win-x64.msi option, I no longer face the sandbox error.

    how do you "switch"?

  16. mfmasud commented on Jul 29, 2026

    @mfmasud

    switching to the direct win-x64.msi option, I no longer face the sandbox error.

    how do you "switch"?

    By "switch" I mean uninstall the previous version and install the other version. I used version 7.6.4. In the downloads there is a LTS version and a non-LTS version, and I installed the non-LTS edition.

  17. yubaoquan commented on Jul 31, 2026

    @yubaoquan

    Resolved this by uninstall the pwsh and install it from https://github.com/PowerShell/PowerShell/releases

    you have to use the "preview" version?

    No need to use the preview version I think.

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

    CLIbugsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions