Keeps forgetting that it's already using Powershell
What version of Codex CLI is running?
codex-cli 0.114.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.4 xhigh
What platform is your computer?
Win11 x64
What terminal emulator and version are you using (if applicable)?
PS 7.x
What issue are you seeing?
Since Codex 5.2, and extending through Codex 5.3 and Chat 5.4, no amount of instruction (in agents.md or otherwise) seems to be effective at getting it to understand that it's already running inside of powershell!
High seems to be the reasoning level that messes this up the least, when xhigh really stumbles it will run in circles because of this far longer than Medium will. I've never used Low outside of subagents but based on the number of times flubbed powershell commands have eaten the TUI display I'd say it's bad there.
It constantly attempts to call powershell directly by various means when it does not need to.
Additionally I've not been able to usefully instruct or guide it to understand how quoting, escaping, and heredocs work. I've tried a lot. You just have to accept that it's going to happen and let it figure it out on its own and pay the Powershell Token Tax.
Paradoxically sometimes it writes really awesome powershell scripts that work perfectly on the first try.
Bonus theme bug also making an appearance in this example, which was 5.4 xhigh
<img width="403" height="171" alt="Image" src="https://github.com/user-attachments/assets/3de38314-6caf-48ce-9c46-2a50b238e554" />
What steps can reproduce the bug?
Use codex in powershell
What is the expected behavior?
It's consistently really good at powershell and never burns tokens re-figuring out how to quote or escape things, or utilize heredocs.
Additional information
“If orders are not thoroughly understood, then the general is to blame.” - Sun Tzu
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗