Windows Desktop sandbox fails with setup refresh failed / CreateProcessAsUserW failed
已打开 04:13AM - 13 May 26 UTC
bug
windows-os
sandbox
app
### What version of the Codex App are you using (From “About Codex” dialog)?
26….506.3741.0
### What subscription do you have?
ChatGPT Plus
### What platform is your computer?
Windows 11, x64
### What issue are you seeing?
I am using Codex Desktop on Windows.
Normal sandbox command execution fails even for simple read-only PowerShell commands.
Codex App version:
26.506.3741.0
Subscription:
ChatGPT Plus
Platform:
Windows 11, x64
What happens:
When I run simple commands in the normal sandbox, they fail before executing.
Commands tested:
Get-Location
Get-Content -Tail 20 "H:\MyDrive\<PROJECT_FOLDER>\<MARKDOWN_FILE>.md"
For the project on H:\MyDrive\<PROJECT_FOLDER>, the error is:
windows sandbox: setup refresh failed with status exit code: 1
I also tested a copied local project folder under Documents.
In that local Documents project, normal sandbox execution failed with:
windows sandbox: runner error: CreateProcessAsUserW failed: 1312
I did not use external execution during these tests.
What works:
The same PowerShell commands work when run with external execution.
So the file path and the PowerShell commands themselves seem to be valid.
What I already tried:
- Restarted the Codex app
- Restarted the PC
- Tested the original project folder on Google Drive / H: drive
- Tested a copied local project folder under Documents
- Tested minimal commands such as Get-Location
The issue still happens after restarting the app and the PC.
Sandbox log:
The sandbox log exists at:
C:\Users\<USER>\.codex\.sandbox\sandbox.log
The relevant log lines for the H: drive project include:
write ACE grant failed on H:\MyDrive\<PROJECT_FOLDER>:
SetNamedSecurityInfoW failed: 87
setup refresh completed with errors
setup error: setup refresh had errors
setup refresh: exited with status ExitStatus(1)
This looks like the sandbox setup/ACL grant step is failing before the command is executed.
Expected behavior:
Read-only commands such as Get-Location and Get-Content -Tail 20 should run successfully in the normal sandbox.
Actual behavior:
Normal sandbox execution fails with either:
windows sandbox: setup refresh failed with status exit code: 1
or:
windows sandbox: runner error: CreateProcessAsUserW failed: 1312
External execution works, but I would prefer to use the normal sandbox for safer verification.
### What steps can reproduce the bug?
1. Open Codex Desktop on Windows.
2. Open a project folder.
3. Use the normal sandbox, not external execution.
4. Ask Codex to run a simple read-only PowerShell command:
Get-Location
5. Ask Codex to run another read-only command:
Get-Content -Tail 20 "H:\MyDrive\<PROJECT_FOLDER>\<MARKDOWN_FILE>.md"
6. The normal sandbox fails before the commands run.
7. Restart the Codex app and try again.
8. Restart the PC and try again.
9. The same sandbox error still happens.
### What is the expected behavior?
Read-only PowerShell commands such as Get-Location and Get-Content -Tail 20 should run successfully in the normal sandbox.
The normal sandbox should initialize correctly and execute the command without requiring external execution.
### Additional information
Codex App version:
26.506.3741.0
Subscription:
ChatGPT Plus
Platform:
Windows 11, x64
The issue happens in both:
- A project folder on Google Drive / H: drive
- A copied local project folder under Documents
Errors observed:
- On the H: drive project:
windows sandbox: setup refresh failed with status exit code: 1
- On the local Documents project:
windows sandbox: runner error: CreateProcessAsUserW failed: 1312
The same PowerShell commands work with external execution.
I already tried:
- Restarting the Codex app
- Restarting the PC
- Testing a Google Drive / H: drive project folder
- Testing a copied local Documents project folder
- Testing minimal commands such as Get-Location
Relevant sandbox log path:
C:\Users\<USER>\.codex\.sandbox\sandbox.log
Relevant sandbox log lines:
write ACE grant failed on H:\MyDrive\<PROJECT_FOLDER>:
SetNamedSecurityInfoW failed: 87
setup refresh completed with errors
setup error: setup refresh had errors
setup refresh: exited with status ExitStatus(1)
This looks like the sandbox setup / ACL grant step is failing before the command is executed.