Windows: internal PowerShell tool fails with 8009001d while user PowerShell works
What version of the Codex App are you using (From “About Codex” dialog)?
<Fill from About Codex dialog>
What subscription do you have?
ChatGPT Pro
What platform is your computer?
"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"
What issue are you seeing?
Codex App on Windows cannot execute internal PowerShell commands via the Codex tool layer.
User PowerShell works normally in the same workspace, but Codex internal tool execution fails before even simple commands run.
Codex environment_context:
- cwd: D:\codex
- shell: powershell
- timezone: Asia/Seoul
User PowerShell works:
- Get-Date works
- Get-Location shows D:\codex\.codex-tasks\design-md-analysis\packages\cli
- Test-Path D:\codex returns True
Codex internal tool fails:
- Get-Date
- Get-Location
- Test-Path D:\codex
- Test-Path D:\codex\.codex-tasks\design-md-analysis
- bun --version
- node --version
- npm --version
All commands fail with:
- Exit code: -65536
- Output includes: 8009001d
- The output appears garbled/mojibake, but consistently contains
Windows PowerShelland8009001d.
This still happens after:
- restarting the Codex app
- running Codex as administrator
- updating/reinstalling the Codex app
Earlier there was also suspicion of a bad cwd mapping such as C:\mnt\d\codex, but in the current session environment_context reports D:\codex. However, Codex cannot confirm Get-Location because internal PowerShell execution fails first.
What steps can reproduce the bug?
Uploaded thread: 181a4917-b0ac-4581-8c77-5c51c136d27e
- Open Codex App on Windows.
- Open workspace D:\codex.
- Confirm environment_context shows:
- cwd: D:\codex
- shell: powershell
- Ask Codex to run any internal PowerShell command, for example:
```powershell
Get-Date
- Observe that the command fails before execution with 8009001d.
Get-Location
Test-Path D:\codex
bun --version
node --version
npm --version
What is the expected behavior?
_No response_
Additional information
This does not appear to be a project/repository issue.
No package files were modified.
No install/build/test command was intentionally run.
The failure happens even with Get-Date, so it occurs before runtime PATH or project tooling becomes relevant.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
What's happening here? I see a lot of people over past 2 weeks with this... none of those seem to be resolved. I was working this morning. I had to restart and now "8009001d". Not a lot to go on to get "working" again
I literally am having to switching over to competitor product.. that in spite of everyone gushing over doesn't do as good of a job for what I have been working on. As such I end up spending twice as much time fixing its code than I do with GPT5.4...
I sincerely hope someone @ OpenAI with access to the codex source is actually looking the reports of the 8009001d issue.
I hit a very similar Windows failure pattern today. Sharing the triage path in case it helps separate the likely failure layers.
In my case, the important distinction was to test PowerShell startup itself before assuming Git, npm, gh, or project tooling was broken.
From a non-PowerShell shell such as
cmd.exe, these were the most useful checks:What I observed before reboot:
Windows PowerShell also failed before command execution:
At the same time,
cmd.exe,git --version,gh --version, andnode --versionworked fromcmd.exe. That suggests this class of failure should be treated as a shell/runtime launch failure first, not as a Git/GitHub/npm failure.After a Windows reboot, the same checks recovered:
So the root trigger is still unknown, but the most useful diagnostic split seems to be:
pwsh -NoLogo -NoProfile -Command 1fails, do not spend time on profile scripts or quoting yet. The failure is earlier than user command parsing.cmd.exeand the target CLIs work, do not classify this as a Git/GitHub/npm problem.``
cmd
``cmd /d /s /c "set PATH & set Path"
On Windows, duplicate
PATH/Pathentries in the spawned environment would be a strong signal that Codex is constructing a malformed process environment before PowerShell starts.The
InitialSessionState -> GetSaferPolicy -> GetAppLockerPolicy -> GetSystemLockdownPolicystack also makes AppLocker / WDAC / SAFER policy lookup worth checking, especially when the failure happens before any actual command body runs.I am seeing the same failure pattern on another Windows machine. Adding a compact repro/environment report.
Environment:
codex-cli 0.128.0@openai/codex@0.128.0latest:0.128.026.429.3425.0C:\Users\gaola\AppData\Roaming\npm\codexwinget upgrade --id 9PLM9XGG6VKS: no available upgradepwsh: not installedPowerShell works outside the Codex tool layer:
Codex internal shell tool fails before command execution:
Observed impact:
Expected behavior:
Local downstream tracking issue for our environment: RT0305/AI_INFRASTRUCTURE#61.
Closing as a duplicate of #14057.