Skip to content

Unable to execute shell commands #2892

Closed

Description

@StellioKontos

What version of Codex is running?

codex-cli 0.27.0

Which model were you using?

unrelated

What platform is your computer?

Windows

What steps can reproduce the bug?

I do not know how to reproduce this. I simply installed the CLI through the steps provided and ran it.
The problem persists whether I open codex through CMD and PowerShell, also with administrator privileges.

I also use Gemini CLI which works fine.

What is the expected behavior?

The CLI running shell commands.

What do you see instead?

Image

When trying to run shell commands, the CLI reports "program not found"

Additional information

It is not able to execute any shell commands.
It appears creating/writing files uses the built‑in apply_patch API, but reading files uses shell, therefore it is able to write files but not read them.

I purchased a Plus subscription specifically for Coxed; really hope somebody can shed some light on this.

Activity

  1. added
    bug
    on Aug 29, 2025
  2. FreddyE1982 commented on Aug 29, 2025

    @FreddyE1982

    windows is really problematic. I strongly suggest activating "Windows Subsystem For Linux", installing Ubuntu and installing codex cli there.

    alternatively you can try putting this in the AGENTS.md:

    You are on Windows. Use ONLY windows commands. Use ONLY powershell. If a command fails find out the correct syntax and extend AGENTS.md to note down that syntax for future use

  3. Priyabhunia commented on Aug 29, 2025

    @Priyabhunia

    windows is really problematic. I strongly suggest activating "Windows Subsystem For Linux", installing Ubuntu and installing codex cli there.

    alternatively you can try putting this in the AGENTS.md:

    You are on Windows. Use ONLY windows commands. Use ONLY powershell. If a command fails find out the correct syntax and extend AGENTS.md to note down that syntax for future use

    still you have to deal with some MCP related failure issue

  4. sfz009900 commented on Aug 29, 2025

    @sfz009900

    Same here, MCP doesn't work for me either. I just use a VSCode plugin.

  5. Priyabhunia commented on Aug 29, 2025

    @Priyabhunia

    Same here, MCP doesn't work for me either. I just use a VSCode plugin.

    I am not in wsl yet but I think image dragdrop also wont work .can you confirm it

  6. zheli1119 commented on Sep 8, 2025

    @zheli1119

    I highly suspect your issue is due to this problem; you can try modifying shell.rs and rebuilding. #3253

  7. added
    windows-os
    on Oct 29, 2025
  8. etraut-openai commented on Nov 25, 2025

    @etraut-openai
    Contributor

    We've made significant improvements for Windows — both WSL and native — recently, so you should no longer see this problem with the latest versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions