codex - 💡(How to fix) Fix Windows Desktop sandbox fails with setup refresh failed / CreateProcessAsUserW failed [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#22428Fetched 2026-05-14 03:36:10
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

For the project on H:\MyDrive<PROJECT_FOLDER>, the error is: windows sandbox: runner error: CreateProcessAsUserW failed: 1312 setup error: setup refresh had errors windows sandbox: runner error: CreateProcessAsUserW failed: 1312 9. The same sandbox error still happens. windows sandbox: runner error: CreateProcessAsUserW failed: 1312 setup error: setup refresh had errors

RAW_BUFFERClick to expand / collapse

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

  1. Ask Codex to run another read-only command:

Get-Content -Tail 20 "H:\MyDrive<PROJECT_FOLDER><MARKDOWN_FILE>.md"

  1. The normal sandbox fails before the commands run.
  2. Restart the Codex app and try again.
  3. Restart the PC and try again.
  4. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows Desktop sandbox fails with setup refresh failed / CreateProcessAsUserW failed [1 participants]