Repository navigation
Description
What version of Codex CLI is running?
codex-cli 0.161.0 (winget). Also reproduced with 0.164.0 via npx @openai/[email protected]. Desktop app: OpenAI.Codex 26.1007.9446.0.
What subscription do you have?
Plus
Which model were you using?
gpt-5.6-sol (irrelevant: the failure happens before any command runs)
What platform is your computer?
Microsoft Windows 11, build 10.0.26200.9711, x64
What terminal emulator and version are you using (if applicable)?
Headless via codex exec and the app-server (Ruddr); also reproduced with codex sandbox -- ... from a normal shell.
What issue are you seeing?
Under every Windows sandbox implementation, nearly all processes started inside the sandbox fail at startup with STATUS_DLL_INIT_FAILED (0xC0000142 / -1073741502). Only danger-full-access works.
| Mode | Result |
|---|---|
elevated (desktop app running) |
helper_unknown_error: setup refresh had errors: os error 32 on the locked node_repl.exe (same as #51862) |
elevated (desktop app fully quit) |
setup refresh passes, then timed out after 15000ms connecting runner pipe-in; the System log has an Application Popup (Event 26): codex-command-runner-0.161.0.exe - Application Error : The application was unable to start correctly (0xc0000142) |
unelevated |
cmd.exe itself starts, but children fail: whoami.exe, findstr.exe, git.exe, powershell.exe → -1073741502. One .NET Framework exe (csc.exe -help) succeeds. |
mxc |
identical to unelevated |
danger-full-access |
everything works |
Minimal repro (probe.cmd, run in the workspace):
@echo off
"%SystemRoot%\System32\whoami.exe" >nul & echo whoami_exit=%ERRORLEVEL%
"%SystemRoot%\System32\findstr.exe" /? >nul & echo findstr_exit=%ERRORLEVEL%
"%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\csc.exe" -help >nul & echo dotnetfx_exit=%ERRORLEVEL%
git --version & echo git_exit=%ERRORLEVEL%> codex -c windows.sandbox=mxc sandbox -- cmd.exe /d /c probe.cmd
whoami_exit=-1073741502
findstr_exit=-1073741502
dotnetfx_exit=0
git_exit=-1073741502
Same output with -c windows.sandbox=unelevated, on 0.161.0 and 0.164.0, and from a cwd on C: as well as D:.
Ruled out:
- AppInit_DLLs empty,
LoadAppInit_DLLs=0(native and WOW6432Node); no IFEO entries for the affected executables - Environment intact inside the sandbox (
SystemRoot,PSModulePathpresent) - Desktop heap at defaults (
SharedSection=1024,20480,768) - Smart App Control off (
VerifiedAndReputablePolicyState=0) - CLI version (0.161.0 and 0.164.0 behave identically)
windows.sandbox_private_desktopcan no longer be toggled (removed in Always use private desktops for legacy Windows sandboxes #46554), so I couldn't test whether the private desktop is involved
Possibly relevant: McAfee consumer security is running; Kaspersky/Quick Heal are registered in SecurityCenter but their AV services are not running. Not yet tested with McAfee disabled.
What steps can reproduce the bug?
- On the machine above, run
codex -c windows.sandbox=mxc sandbox -- cmd.exe /d /c probe.cmd(orunelevated). - Observe
-1073741502for most child executables. - With
elevated(desktop app quit so Windows: setup refresh fails (helper_unknown_error) because node_repl.exe in cua_node runtime is locked by Codex's own process (os error 32) #51862 doesn't trigger),codex sandbox -- cmd.exe /d /c echo hifails with a runner pipe timeout, and Event 26 showscodex-command-runnercrashing with 0xc0000142.
What is the expected behavior?
Sandboxed commands start normally, as they do under danger-full-access.
Additional information
Sandbox log excerpts (from %USERPROFILE%\.codex\.sandbox\sandbox.2026-10-25.log):
runtime read/execute validation failed: validate runtime read/execute access on C:\Users\<user>\AppData\Local\OpenAI\Codex\runtimes\cua_node\a9ba6825a525118c\bin\node_repl.exe: open ACL target for root-only update: The process cannot access the file because it is being used by another process. (os error 32)
setup refresh completed with errors
...
helper launch resolution: using copied command-runner path C:\Users\<user>\.codex\.sandbox-bin\codex-command-runner-0.161.0.exe
Related: #51862 (node_repl lock), #7466 / #17847 (same exit code, older versions), #29427 (0xc0000142 in setup helper).
Activity
shymonke commentedon Oct 25, 2026
Update: reproduced on codex-cli 0.164.0 (npm, sole install on PATH). Change vs 0.161.0:
whoami.exenow starts under unelevated/mxc, butgit.exeandpowershell.exestill exit-1073741502(0xC0000142);elevatedstill fails withtimed out after 15000ms connecting runner pipe-in(desktop app quit). A realcodex exec/app-server run withread-onlygets 0xC0000142 forGet-Locationandgit --version; the same run withdanger-full-accesssucceeds (git version 2.55.0.windows.3).denelon commentedon Nov 5, 2026
A Microsoft MXC issue documents a similar
STATUS_DLL_INIT_FAILEDpattern that may provide useful diagnostic context:Both reports observe
0xC0000142during process startup, withcmd.exeable to run while applications such as PowerShell and Git or other USER32-importing workloads fail. The MXC issue specifically reproduces the behavior from a non-interactive session-0 host, whereas this Codex report does not establish that hosting context and also reproduces failures with non-MXC sandbox implementations. The matching status and workload pattern may therefore help distinguish a shared Windows UI/session dependency from a broader Codex or host-environment problem, but it does not establish a common root cause.Drafted with GitHub Copilot assistance.