Codex VS Code extension cannot execute any local shell command on Windows (PowerShell 8009001d / CreateProcessWithLogonW 1056)
Open 💬 3 comments Opened Apr 8, 2026 by fengxiaozi-liu
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the IDE extension are you using?
openai.chatgpt-26.325.31654-win32-x64
What subscription do you have?
plus
Which IDE are you using?
vscode
What platform is your computer?
Windows_NT x64 10.0.26200
What issue are you seeing?
The Codex VS Code extension cannot execute any local shell command in my environment.
Symptoms:
- Any command executed by Codex fails before the command actually runs
- Even minimal commands such as
Get-Locationfail - Codex cannot read local files such as
feature.md - Manual PowerShell works normally
- VS Code integrated terminal works normally
Observed errors:
- Internal Windows PowerShell error with code
8009001d - Sometimes
CreateProcessWithLogonW failed: 1056
What I verified:
powershell -NoProfileworks correctly when run manuallySystemRoot,WINDIR, andComSpecare present in my PowerShell environment- VS Code terminal works
code --statusshowspty-host,OpenConsole.exe,powershell.exe, andcodex.exe app-serverare running- Reinstalling VS Code did not fix it
- Reinstalling the extension and deleting the extension directory did not fix it
- The same problem happens in a new Codex conversation
Environment:
- VS Code 1.114.0
- Windows 10.0.26200 x64
- Extension version: openai.chatgpt-26.325.31654-win32-x64
Minimal reproduction:
- Open VS Code
- Open a workspace
- Start a Codex chat
- Ask Codex to run a minimal local command such as
Get-Location - The command fails with the errors above
<img width="859" height="207" alt="Image" src="https://github.com/user-attachments/assets/8f2b82bc-b5de-4c59-ae35-dcab7b7664bf" />
What steps can reproduce the bug?
I can provide code --status output and extension logs if needed.
What is the expected behavior?
_No response_
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
+1 — same bug, same Windows build (10.0.26200.8246), Codex CLI 0.121.0.
Timeline:
Windows PowerShell managed load error 8009001dFixes attempted (none worked):
sfc /scannow(fixed corrupted files but bug persisted)DISM /RestoreHealthCodexSandboxOffline/CodexSandboxOnlineusers + group + reinstalled (Codex recreated them fresh)windows.sandbox = "unelevated"--dangerously-bypass-approvals-and-sandboxVerified working when invoked externally:
powershell.exe -NoProfile -Command "..."— OKpowershell.exe -NoProfile -EncodedCommand ...— OK (CLIXML output normal)powershell.exe -NoProfile -File script.ps1— OKVerified broken in Codex:
shell_commandregardless of target (dir,Get-ChildItem,rg,git, evencmd /c dir)Root cause hypothesis:
NTE_PROVIDER_DLL_FAIL (0x8009001D)comes from CNG Provider signature validation during in-process CLR hosting ofSystem.Management.Automation.dll. Externalpowershell.exeinvocations bypass this path and work fine. Build 26200 appears to have regressed CNG behavior for managed assembly strong-name verification viahostfxr-based hosting.Current workaround:
Running Codex inside WSL2 (Ubuntu) — works perfectly, confirms issue is Windows-side only.
Please consider shipping a release that spawns
powershell.exeas external process (viastd::process::Command) instead of in-process CLR hosting, at least as a fallback on Windows 11 build 26200+.This sandbox has been a nightmare for me ever since I started using Codex, and there is no way to disable it fully as Codex will not allow you to prompt anything until you set it up again. Looks like running Codex under WSL is the solution (which is good as it fits my use case well), but it honestly just looks like the Codex team has shipped a poor attempt at a sandbox for Windows. This is probably partially an issue with Windows itself, but it still doesn't mean it should've been shipped for Codex.