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
The app settings show Integrated terminal shell = PowerShell, but the agent runtime for my thread reports shell=cmd. Because of that, PowerShell commands like Get-Content fail unless they are explicitly wrapped in powershell -Command .... #14205
appIssues related to the Codex desktop appbugSomething isn't workingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
What version of the Codex App are you using (From “About Codex” dialog)?
26.306.996.0
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows [Version 10.0.26200.7840] x64
What issue are you seeing?
The app settings show Integrated terminal shell = PowerShell, but the agent runtime for my thread reports shell=cmd.
Because of that, PowerShell-native commands such as Get-Content fail unless they are explicitly wrapped or rewritten for cmd. In my case, this made the configured shell behavior feel inconsistent and confusing.
It is unclear whether the PowerShell setting only affects the visible integrated terminal while agent/tool execution still uses cmd, or whether this is an actual bug.
What steps can reproduce the bug?
Steps to reproduce:
Open Codex settings and set Integrated terminal shell to PowerShell.
Start a thread.
In the thread/runtime context, the shell is reported as cmd.
Run a PowerShell-native command such as Get-Content somefile.txt.
The command fails as if it is being executed in cmd.
What is the expected behavior?
Expected behavior:
If PowerShell is selected, agent command execution should either use PowerShell consistently, or the app should clearly distinguish between the shell used for the integrated terminal and the shell used for agent/tool execution.
In Codex settings, Integrated terminal shell is set to PowerShell, but in the thread/runtime context the shell is reported as cmd.
Because of that, PowerShell-native commands like Get-Content fail unless explicitly invoked through PowerShell, which makes the shell behavior feel inconsistent.
No, this is certainly a Codex issue. Codex has (for some reason I can't really comprehend) hardcoded the shell to Powershell. From GPT 5.5 xHigh investigation itself:
"You cannot make the Windows-native Codex agent use Git Bash as its actual command runner. Git Bash is only supported as the integrated terminal choice. OpenAI’s Windows docs say the Windows-native agent runs commands in PowerShell, while the integrated terminal can separately be PowerShell, Command Prompt, Git Bash, or WSL."
The verbiage is kinda weird but, TL;DR: You cannot change the shell Codex uses.
appIssues related to the Codex desktop appbugSomething isn't workingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Mar 10, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
shell_nameused inenvironment_contextas a configuration item. #13176Powered by Codex Action
Dj-Shortcut commentedon Mar 10, 2026
I can reproduce a very similar issue on Windows.
In Codex settings,
Integrated terminal shellis set toPowerShell, but in the thread/runtime context the shell is reported ascmd.Because of that, PowerShell-native commands like
Get-Contentfail unless explicitly invoked through PowerShell, which makes the shell behavior feel inconsistent.Reniactor commentedon May 30, 2026
Why do you close this without linking the solution @Dj-Shortcut
Dj-Shortcut commentedon May 30, 2026
sorry i don't fully remember, i think it's a Windows issue and not codex? would you like me to re open for you?
Reniactor commentedon May 30, 2026
No, this is certainly a Codex issue. Codex has (for some reason I can't really comprehend) hardcoded the shell to Powershell. From GPT 5.5 xHigh investigation itself:
"You cannot make the Windows-native Codex agent use Git Bash as its actual command runner. Git Bash is only supported as the integrated terminal choice. OpenAI’s Windows docs say the Windows-native agent runs commands in PowerShell, while the integrated terminal can separately be PowerShell, Command Prompt, Git Bash, or WSL."
The verbiage is kinda weird but, TL;DR: You cannot change the shell Codex uses.