codex - 💡(How to fix) Fix Windows sandbox: spawn setup refresh fails on Codex CLI 0.133.0

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…

Error Message

execution error: Io(Custom { kind: Other, error: "windows sandbox: spawn setup refresh" })

Fix Action

Fix / Workaround

Workaround that fixed it

Code Example

npm install -g @openai/codex

---

windows sandbox: spawn setup refresh

---

execution error: Io(Custom { kind: Other, error: "windows sandbox: spawn setup refresh" })

---

npm install -g @openai/codex@0.132.0
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.133.0

Platform

Windows

Install method

npm global install:

npm install -g @openai/codex

Node / npm

Node: v24.12.0 npm: 11.6.2

What happened?

After updating Codex CLI to 0.133.0, shell commands started failing before execution with:

windows sandbox: spawn setup refresh

Even a simple pwd command failed before the shell started. This also reproduced outside the project directory in C:\tmp\codex-test, so it did not appear to be project-specific.

Repro steps

  1. Install/update Codex CLI to 0.133.0 on Windows.
  2. Start Codex.
  3. Ask Codex to run a simple command like pwd.
  4. Observe command execution fails before shell startup.

Expected behavior

Codex should execute simple shell commands normally.

Actual behavior

Tool execution fails before the shell starts:

execution error: Io(Custom { kind: Other, error: "windows sandbox: spawn setup refresh" })

What did not fix it

  • Closing and reopening the terminal
  • Restarting the computer
  • Uninstalling and reinstalling Codex CLI 0.133.0
  • Testing in a clean directory outside the repo

Workaround that fixed it

Downgrading to Codex CLI 0.132.0 fixed command execution:

npm install -g @openai/codex@0.132.0

Related issue

This looks related to prior Windows sandbox setup-refresh failures, for example: https://github.com/openai/codex/issues/21208

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…

FAQ

Expected behavior

Codex should execute simple shell commands normally.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING