windows sandbox: spawn setup refresh, fails several times on a new session or after /clear, and then it works
Resolved 💬 3 comments Opened May 5, 2026 by brunolm Closed May 5, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.128.0
What subscription do you have?
Pro
Which model were you using?
GPT 5.5
What platform is your computer?
Microsoft Windows NT 10.0.26220.0 x64
What terminal emulator and version are you using (if applicable)?
Windows Terminal (WSL / PowerShell)
What issue are you seeing?
First time
• Ran Get-Content -Path C:\BrunoLM\Projects\dotfiles\common\.codex\skills\brunolm-code-review\SKILL.md
└ execution error: Io(Custom { kind: Other, error: "windows sandbox: spawn setup refresh" })
on to the PR data.
• Ran Get-Content -LiteralPath 'C:\BrunoLM\Projects\dotfiles\common\.codex\skills\brunolm-code-review\SKILL.md'
└ execution error: Io(Custom { kind: Other, error: "windows sandbox: spawn setup refresh" })
• Ran Get-Location
└ execution error: Io(Custom { kind: Other, error: "windows sandbox: spawn setup refresh" })
• Ran Get-Location
└
Path
----
P:\bla\bla
• Ran Get-Content -LiteralPath 'C:\BrunoLM\Projects\dotfiles\common\.codex\skills\brunolm-code-review\SKILL.md'
└ ---
- Don't repeat the same finding across multiple files - call it out once and list the other locations.
• I’ve confirmed the review workflow. Next I’m pulling the PR metadata and file list so I can scope the review before
reading the patch in detail.
• Running gh pr view [...]
After warmup it seems to work correctly, but it has to fail several times before it starts working as it should.
› read the brunolm-code-review skill file
• I’ll open the brunolm-code-review skill file from disk and keep its instructions in context.
• Ran Get-Content -LiteralPath 'C:\BrunoLM\Projects\dotfiles\common\.codex\skills\brunolm-code-review\SKILL.md'
└ ---
name: brunolm-code-review
… +104 lines (ctrl + t to view transcript)
After doing a /clear
› read the brunolm-code-review skill file
• Using brunolm-code-review because you named it; I’m opening its SKILL.md now.
• Ran Get-Content -LiteralPath 'C:\BrunoLM\Projects\dotfiles\common\.codex\skills\brunolm-code-review\SKILL.md'
└ execution error: Io(Custom { kind: Other, error: "windows sandbox: spawn setup refresh" })
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• The first read hit a sandbox startup error, so I’m retrying the same file read with an explicit PowerShell command.
• Ran & 'C:\Program Files\PowerShell\7\pwsh.exe' -NoLogo -NoProfile -Command "Get-Content -LiteralPath 'C:
│ \BrunoLM\Projects\dotfiles\common\.codex\skills\brunolm-code-review\SKILL.md'"
└ execution error: Io(Custom { kind: Other, error: "windows sandbox: spawn setup refresh" })
• Ran Get-Content -LiteralPath 'C:\BrunoLM\Projects\dotfiles\common\.codex\skills\brunolm-code-review\SKILL.md'
└ ---
name: brunolm-code-review
… +104 lines (ctrl + t to view transcript)
- Don't invent issues to pad the list. A review with only nits is a fine review.
- Don't repeat the same finding across multiple files - call it out once and list the other locations.
What steps can reproduce the bug?
codex- read file.md
What is the expected behavior?
command to execute successfully
Additional information
several errors before it succeeds a simple file read
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Solution
When moving
codex.exeto another folder, you must also movecodex-windows-sandbox-setup.exeandcodex-command-runner.exealong with it.Additional sanitized data point that may be related:
0.133.0windows sandbox: spawn setup refreshcodex-windows-sandbox-setup.exefailed to spawn with Windows OS error740(The requested operation requires elevation)vendor/x86_64-pc-windows-msvc/codex-resourcescodexwas absentThis occurred without manually moving
codex.exe; the installed helper layout already appeared to be undercodex-resources. Local workaround was to route project-local reads/searches through an IDE integration and use narrowly approved escalation only when exact shell behavior was required.