codex - 💡(How to fix) Fix Windows sandbox cannot spawn shell processes after escalation disabled [1 comments, 2 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#19189Fetched 2026-04-24 05:59:09
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
0
Author
Timeline (top)
labeled ×5cross-referenced ×2commented ×1unlabeled ×1

Error Message

  windows sandbox: runner error: CreateProcessAsUserW failed: 5

  ### Repro

  Try either of these from the shell tool:

  rg -n "example" src

  bash -lc 'pwd'

  Both fail with the same sandbox runner error before the command
  executes.

  - Normal sandboxed shell commands failed with
    CreateProcessAsUserW failed: 5.
  - Escalated shell commands worked.

  approval policy is currently never. Do not provide
  sandbox_permissions for any reason

  After that:

  - Normal PowerShell still failed.
  - Bash also failed.
  - Escalation could no longer be requested.
  - apply_patch still worked.
  inside the workspace, or escalation should remain available when
  the Windows sandbox cannot create the process.

  ### Notes

  Windows error code 5 from CreateProcessAsUserW is Access Denied.
  The failure appears to occur in the sandbox runner before
  launching the requested command.

Fix Action

Fix / Workaround

  • Normal PowerShell still failed.
    • Bash also failed.
    • Escalation could no longer be requested.
    • apply_patch still worked. inside the workspace, or escalation should remain available when the Windows sandbox cannot create the process.
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

v0.124.0

What subscription do you have?

pro

Which model were you using?

5.5

What platform is your computer?

windows 11 pro

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

Powershell7

What issue are you seeing?

Error

windows sandbox: runner error: CreateProcessAsUserW failed: 5

### Repro

Try either of these from the shell tool:

rg -n "example" src

bash -lc 'pwd'

Both fail with the same sandbox runner error before the command
executes.

- Normal sandboxed shell commands failed with
  CreateProcessAsUserW failed: 5.
- Escalated shell commands worked.

approval policy is currently never. Do not provide
sandbox_permissions for any reason

After that:

- Normal PowerShell still failed.
- Bash also failed.
- Escalation could no longer be requested.
- apply_patch still worked.
inside the workspace, or escalation should remain available when
the Windows sandbox cannot create the process.

### Notes

Windows error code 5 from CreateProcessAsUserW is Access Denied.
The failure appears to occur in the sandbox runner before
launching the requested command.

### What steps can reproduce the bug?

go on full access gpt 5.5 had to use escalted powershell to get it to work which is weird 

### What is the expected behavior?

codex should be able to use its commands was fine a moment ago before i updated 

### Additional information

_No response_

extent analysis

TL;DR

The issue is likely due to a permission error in the Windows sandbox, and using escalated shell commands may provide a temporary workaround.

Guidance

  • The error code 5 from CreateProcessAsUserW indicates an "Access Denied" issue, suggesting a permissions problem.
  • Try using escalated shell commands, as they have been reported to work in similar situations.
  • Verify that the issue persists after attempting to use escalated commands, to confirm if it's a general permission issue or specific to the sandbox runner.
  • Consider checking the system's security policies and settings to see if there have been any recent changes that could be causing the permission denial.

Example

No code example is provided, as the issue seems to be related to system permissions and configuration rather than code.

Notes

The provided information suggests that the issue may be related to the Windows sandbox and permission settings, but without more details about the system configuration and recent changes, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Using escalated shell commands may provide a temporary solution until the underlying permission issue can be resolved.

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