You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: tool-called PowerShell fails before command execution, even for trivial commands like 'exit 0' #18465
CLIIssues related to the Codex CLIbugSomething isn't workingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Windows: tool-called PowerShell fails before command execution, even for trivial commands like 'exit 0'
What version of Codex is running?
codex-cli 0.121.0
Which model were you using?
gpt-5.4
What platform is your computer?
Windows
What issue are you seeing?
When Codex invokes PowerShell through its shell tool, the tool call fails before the actual command executes.
This does not appear to be a general PowerShell issue on the host machine. PowerShell can be launched manually outside Codex, but Codex tool calls fail immediately, even for trivial commands.
What steps can reproduce the bug?
Start Codex on Windows
Ask Codex to run a simple shell command, for example:
exit 0
Write-Output hello
[Environment]::CurrentDirectory
Observe that the tool call fails before the command actually runs
What is the expected behavior?
Codex should successfully start PowerShell and execute the requested command.
Manual PowerShell invocation outside Codex works normally, so this appears to be specific to Codex's shell/tool execution path rather than PowerShell itself.
Impact:
shell commands cannot be executed reliably from Codex
Thanks. After comparing the linked issues, this looks much closer to #13917 than to #18451. The key symptom here is that Codex-hosted PowerShell fails before command execution with 8009001d, while manual PowerShell outside Codex works normally.\n\nSince #13917 was already marked by a collaborator as a duplicate of #9062, I am closing this as a duplicate of #9062 to consolidate tracking there.
CLIIssues related to the Codex CLIbugSomething isn't workingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Apr 18, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
aahljhljhlj-ux commentedon Apr 18, 2026
Thanks. After comparing the linked issues, this looks much closer to #13917 than to #18451. The key symptom here is that Codex-hosted PowerShell fails before command execution with 8009001d, while manual PowerShell outside Codex works normally.\n\nSince #13917 was already marked by a collaborator as a duplicate of #9062, I am closing this as a duplicate of #9062 to consolidate tracking there.