Keeps forgetting that it's already using Powershell

Resolved 💬 3 comments Opened Mar 13, 2026 by doublemover Closed Mar 16, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #13741

Powered by Codex Action

etraut-openai contributor · 5 months ago

Thanks for reporting. This is model behavior, not something that's under the control of the Codex harness. We'll share the feedback with the team responsible for training our codex models. If you see other model behavior that you'd like to report, please use the /feedback command. That will provide us with additional details including logs and conversation text.

doublemover · 5 months ago

I was hoping the response to this would be an initiative to perhaps augment the harness to utilize aliases or some sort of translation layer to allow codex to operate as it was trained to without needing to adjust the model