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?

  1. Open Codex desktop app on Windows.
  2. Start a session in a local workspace.
  3. Run any trivial shell command through the agent, for example:
  • Write-Output 'ok'
  • pwd
  • Get-Location
  1. Observe that the command fails immediately with exit code 1.
  2. 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-Content after writing files

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 5 months ago

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

  • #14423
  • #14264

Powered by Codex Action

Haemi87 · 5 months ago

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.

ivanjx · 5 months ago

codex should still support newer powershell

Haemi87 · 5 months ago

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)"