codex - 💡(How to fix) Fix Windows: internal PowerShell tool fails with 8009001d while user PowerShell works [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19100Fetched 2026-04-24 06:01:02
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×2cross-referenced ×1

Root Cause

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.

RAW_BUFFERClick to expand / collapse

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 PowerShell and 8009001d.

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

  1. Open Codex App on Windows.
  2. Open workspace D:\codex.
  3. Confirm environment_context shows:
    • cwd: D:\codex
    • shell: powershell
  4. Ask Codex to run any internal PowerShell command, for example:
    Get-Date
  5. 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.

extent analysis

TL;DR

The issue is likely related to the Codex App's internal PowerShell execution on Windows, and a potential workaround could involve investigating the cwd mapping and environment variables.

Guidance

  • Verify the cwd mapping in the Codex App's environment_context to ensure it matches the expected directory D:\codex.
  • Check the system's environment variables, particularly PATH, to ensure that the PowerShell executable is correctly referenced.
  • Investigate the error code 8009001d and its relation to Windows PowerShell to understand the root cause of the failure.
  • Consider testing the Codex App with a different shell, if possible, to isolate the issue to PowerShell or the Codex App itself.

Example

No code snippet is provided as the issue seems to be related to the environment and configuration rather than a specific code snippet.

Notes

The issue appears to be specific to the Codex App on Windows and its interaction with PowerShell. Further investigation into the environment variables, cwd mapping, and error code is necessary to determine the root cause.

Recommendation

Apply workaround: Investigate and adjust the cwd mapping and environment variables to ensure correct configuration, as the issue seems to be related to the environment rather than a specific version of the Codex App.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows: internal PowerShell tool fails with 8009001d while user PowerShell works [2 comments, 3 participants]