Weird shell escape / quoting issues when running commands

Resolved 💬 3 comments Opened Nov 20, 2025 by ci Closed Nov 20, 2025

What version of Codex is running?

codex-cli 0.60.1

What subscription do you have?

Pro

Which model were you using?

gpt-5.1-codex-max xhigh

What platform is your computer?

Darwin 24.3.0 arm64 arm

What issue are you seeing?

Running shell commands adds extra quoting around && or | and the LLM gets super confused, fails to do anything. OSX & fish shell

› run ls && rg test | head -1


• Ran ls '&&' rg test '|' head -1
  └ ls: &&: No such file or directory
    ls: -1: No such file or directory
    … +2 lines
    ls: test: No such file or directory
    ls: |: No such file or directory

• Explored
  └ List ls
    Search test

─ Worked for 28s ──────────────..

• Ran ls && rg test | head -1 (via bash for shell operators). Output:

  - test123
  - rg found no matches for "test", so nothing from the pipe.

What steps can reproduce the bug?

Uploaded thread: 019aa18e-97a3-7330-b9e1-7576e2c3ddd8

In my case just running run ls && rg test | head -1 makes it happen. Happens with any model.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗