Shell Commands not working
Resolved 💬 4 comments Opened Mar 16, 2026 by Haemi87 Closed Mar 19, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
26.311.21342
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
Inside the Codex desktop app, every shell_command invocation fails immediately with exit code 1, even for trivial PowerShell commands.
What steps can reproduce the bug?
- Open Codex desktop app on Windows.
- Start a session in a local workspace.
- Run any trivial shell command through the agent, for example:
Write-Output 'ok'pwdGet-Location
- Observe that the command fails immediately with exit code 1.
- No stdout or stderr is returned.
What is the expected behavior?
Simple PowerShell commands should run successfully and return normal output.
Additional information
Environment at time of failure:
- Shell: PowerShell
- PowerShell version shown in terminal:
7.5.5 - Workspace path is inside OneDrive:
C:\Users\<user>\OneDrive - ...\Desktop\...\ihpAppEditor
The issue also reproduces when using:
login: false- explicit
powershell -NoProfile -NonInteractive -Command ... - file redirection /
Out-File Get-Contentafter writing files
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Found the cause. I used PowerShell 7.5 from the Store. After deinstalling it, it used the default 5.1 version and it works now.
codex should still support newer powershell
Yes it should. But it didn't. I've also updated to PowerShell 7.6 RC1. Same issues. I could reopen it with a new title: "Shell commands not working with PowerShell versions from store (>=7.5)"