I want to be able to specify the shell Codex uses
Open 💬 7 comments Opened Mar 1, 2026 by Arcnor
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
CLI
What feature would you like to see?
On Windows, Codex currently uses the Powershell shell to work (at least with the sandbox enabled) which causes all sort of issues. I'd like to be able to use MinGW Bash with it (I don't want to use WSL for various reasons) or any other kind of shell (ZSH or anything). You already support controlling the shell environment somehow with the shell_environment_policy config section, it will be nice if this included the shell to use itself.
Additional information
_No response_
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I agree, that would be very convenient, and this feature has been missing for a long time-especially considering that native PowerShell Codex runs all commands in the harness under CMD, which breaks even a large amount of PowerShell syntax. Sometimes, Codex comes up with some incredible and frustrating workarounds just to execute a simple command because it can't figure out which syntax is valid and which isn't. This leads to overquoting hell and other undesirable consequences. So yes, that would be absolutely fantastic.
Yeah, same lol. Mine was closed with dumb reason - https://github.com/openai/codex/issues/11184
For context, in Claude I can use "CLAUDE_CODE_SHELL" to configure this.
I also vote for that. WSL usage on code which is located outside it, is slow and in general I might not want to have WSL installed at all. The shell specific commands which Codex is using from WSL are fully available in MinGW Bash/Git Bash.
not having this is a deal breaker
+1
Can't be so hard to make the shell configurable since the agent already supports multiple