Retest of issue 24871 still fails just differently
Open 💬 3 comments Opened Jun 13, 2026 by advgiraffe
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
OpenAI.Codex_26.609.4994.0_x64
What subscription do you have?
Pro x20
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
I retested on the build that appears to include the fix to issue 24871
- Codex Desktop package:
OpenAI.Codex_26.609.4994.0_x64 - Bundled AppData CLI:
codex-cli 0.140.0-alpha.2 - Windows sandbox config during normal Desktop testing:
[windows] sandbox = "unelevated" [mcp_servers.node_repl] args = [](no--disable-sandboxworkaround)
Good news: the original Desktop/browser symptom appears fixed under the current config.
In a fresh Desktop session:
- normal shell commands worked
node_replexecuted successfully- Codex in-app browser backend was available and could create/read/close a fresh
about:blank - Chrome extension backend was available and could create/read/close a fresh
about:blank - no existing user tabs, URLs, cookies, or page contents were inspected
- no fresh
stdout_eoforos error 740appeared - sandbox log only contained historical May entries for the old
os error 740failure
However, the direct Windows sandbox CLI path still fails on the same machine, even outside Codex Desktop and even from an Administrator PowerShell:
$codex = "C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\<hash>\codex.exe"
& $codex --version
# codex-cli 0.140.0-alpha.2
& $codex -c 'windows.sandbox="unelevated"' sandbox windows -- "$env:WINDIR\System32\cmd.exe" /c echo CODEX_UNELEVATED_ABS_OK
# windows sandbox failed: CreateProcessAsUserW failed: 2
& $codex -c 'windows.sandbox="elevated"' sandbox windows -- "$env:WINDIR\System32\cmd.exe" /c echo CODEX_ELEVATED_ABS_OK
# windows sandbox failed: runner error: CreateProcessAsUserW failed: 2
& $codex -c 'windows.sandbox="elevated"' sandbox windows -- "C:\Program Files\Git\cmd\git.exe" -C "C:\path\to\repo" status --short --branch
# windows sandbox failed: runner error: CreateProcessAsUserW failed: 2
### What steps can reproduce the bug?
PowerShell:
```powershell
$codex = "C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\<hash>\codex.exe"
& $codex --version
# codex-cli 0.140.0-alpha.2
& $codex -c 'windows.sandbox="unelevated"' sandbox windows -- "$env:WINDIR\System32\cmd.exe" /c echo CODEX_UNELEVATED_ABS_OK
# windows sandbox failed: CreateProcessAsUserW failed: 2
& $codex -c 'windows.sandbox="elevated"' sandbox windows -- "$env:WINDIR\System32\cmd.exe" /c echo CODEX_ELEVATED_ABS_OK
# windows sandbox failed: runner error: CreateProcessAsUserW failed: 2
& $codex -c 'windows.sandbox="elevated"' sandbox windows -- "C:\Program Files\Git\cmd\git.exe" -C "C:\path\to\repo" status --short --branch
# windows sandbox failed: runner error: CreateProcessAsUserW failed: 2
### What is the expected behavior?
codex should be able to launch processes to do work
### Additional information
I also tested targeting PowerShell 7 directly:
& $codex -c 'windows.sandbox="unelevated"' sandbox windows -- "C:\Program Files\PowerShell\7\pwsh.exe" -NoProfile -Command "Write-Output CODEX_UNELEVATED_PWSH_OK"
# windows sandbox failed: CreateProcessAsUserW failed: 2
So this looks partially fixed from a Desktop/browser usability perspective, but the direct codex.exe sandbox windows ... runner path still appears broken with CreateProcessAsUserW failed: 2 on 0.140.0-alpha.2.
Is the remaining direct sandbox runner failure expected/known, or should this issue be reopened / split into a follow-up?
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Flagged potential dup has different error messages from this although they appear similar
TL;DR: I found the cause of
failed: 2. Please try this command first; it may help expose any remaining issues more clearly:It prints:
My debugging:
These commands failed with
CreateProcessAsUserW failed: 2:Using ProcMon, I found that
codex-command-runner-0.142.5.exewas actually launched successfully. The failure happened later because the runner tried to resolve paths like:So
windowsis being treated as part of the command to execute.I also noticed that when Codex is installed via
npm install -g @openai/codex, the npm/PowerShell shim can make the ProcMon command line look confusing. In one trace, the finalcodex.execommand line did not preserve--exactly as typed. However, I also tested the standalone Windows exe directly and it failed the same way, so the shim does not seem to be the root cause.I am still not sure when/why this changed, but many examples I found use
sandbox windows ..., which seems misleading for current versions.One more note: during debugging I also cleared these files/directories, but I am not sure whether this affected the final result:
---
Update: If you ran:
and then hit the
Cannot find the specified moduleerror forcodex-windows-sandbox-setup.exedescribed here: https://github.com/openai/codex/issues/29089For
0.142.5, clear the four sandbox files/directories as shown above, then let Codex re-trigger the sandbox command from within an interactive chat session. This appears to be related to proxy detection.