You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
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?
Start codex: "codex -a never -s workspace-write"
Ask to implement any plan
What is the expected behavior?
No response
Additional information
No response
Reacted by Daniel, Carlos Albaladejo, PanZhongxin, Quentin Jaccarino, Frulfump, Hugo ATTAL, bit, Marc Bernard, Mykhailo, astrovvv and 1 more
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.
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!
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.
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.
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:
Run a simple sandboxed PowerShell read command, for example: Get-AppxPackage OpenAI.Codex | Select-Object Name, Version, PackageFullName
PowerShell does not start.
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.
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.
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.
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.
CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon May 1, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
daniel-gll commentedon May 4, 2026
Same issue "windows sandbox: runner error: CreateProcessAsUserW failed: 1920". Windows 10, Powershell 7.6.1
wavman commentedon May 6, 2026
Same issue with Windows 11 25H2, PowerShell 7.6.1 and Codex Desktop 0.128.0.
yubaoquan commentedon Jun 22, 2026
Adding another Windows data point for this issue.
I am seeing the same sandbox runner failure:
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:
rg --files ...succeeded, whileGet-Location,Get-ChildItem, andgit status --shortfailed before the command actually executed with the sameCreateProcessAsUserW failed: 1920error.rg --files,git status --short, andGet-Content -Raw README.mdsucceeded.Get-ChildItem ...still failed withCreateProcessAsUserW failed: 1920.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
rgcan still succeed.The failure happens at the sandbox runner/process creation layer, before user command output is produced.
bearwind commentedon Jun 23, 2026
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!
Stache73 commentedon Jun 26, 2026
Adding another Windows/Codex Desktop data point for the same
CreateProcessAsUserW failed: 1920sandbox runner failure.Environment:
OpenAI.Codex_26.623.4041.0_x64__2p2nqsd0c76g0C:\Users\arvid\Documents\Codex\2026-06-26\iObserved behaviour:
Get-Content -Path C:\Users\arvid\Documents\Codex\AGENTS.mdfails with:Get-LocationWrite-Output okRecovery attempts:
Workaround:
Get-Content -Path C:\Users\arvid\Documents\Codex\AGENTS.mdsucceeds when run with escalated read-only access.Duplicate/release-note check before commenting:
failed: 1920.openai/codexrelease notes via GitHub releaserust-v0.142.2published 2026-06-25 and did not see this sandbox launch failure called out there.Stache73 commentedon Jun 27, 2026
Still present in the latest Codex Desktop release on this machine.
Observed on:
OpenAI.Codex_26.623.5546.0_x64__2p2nqsd0c76g0Repro evidence from this session:
Get-Content -Path "C:\Users\arvid\Documents\Codex\AGENTS.md"failed before PowerShell could execute.windows sandbox: runner error: CreateProcessAsUserW failed: 1920The 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.
Stache73 commentedon Jun 29, 2026
Still reproducing on the latest Codex Desktop update available to me.
Environment:
OpenAI.Codex_26.623.9142.0_x64__2p2nqsd0c76g0Repro from a fresh Codex Desktop thread:
Get-AppxPackage OpenAI.Codex | Select-Object Name, Version, PackageFullNamewindows sandbox: runner error: CreateProcessAsUserW failed: 1920The 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-AppxPackageitself 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.Stache73 commentedon Jul 1, 2026
Still reproducing after the latest Codex Desktop update available on this machine.
Environment:
OpenAI.Codex_26.623.11225.0_x64__2p2nqsd0c76g0Repro evidence from this session:
Get-Content -Path 'C:\Users\arvid\.codex\attachments\29a1da82-ead4-413c-b781-5d745a1ac35f\pasted-text.txt'windows sandbox: runner error: CreateProcessAsUserW failed: 1920I also checked the current upstream state before posting:
rust-v0.142.5, published 2026-07-01.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.
yubaoquan commentedon Jul 9, 2026
Resolved this by uninstall the pwsh and install it from https://github.com/PowerShell/PowerShell/releases
mfmasud commentedon Jul 29, 2026
Yes, this is what worked for me. I had installed PowerShell 7 LTS using the
.msixoption in the past. After uninstalling it and switching to the directwin-x64.msioption, I no longer face the sandbox error.johnaweiss commentedon Jul 29, 2026
you have to use the "preview" version?
johnaweiss commentedon Jul 29, 2026
how do you "switch"?
mfmasud commentedon Jul 29, 2026
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.yubaoquan commentedon Jul 31, 2026
No need to use the preview version I think.