Merged PR #391 prevents execution of commands with pipes (e.g. `grep -R ... -n | head -n 20`)

Resolved 💬 0 comments Opened Apr 19, 2025 by tekacs Closed Apr 21, 2025

What version of Codex is running?

0.1.2504181820

Which model were you using?

_No response_

What platform is your computer?

_No response_

What steps can reproduce the bug?

  • Run codex in the wake of 7a0d37bc755eb1374869d0ace57d9af04f5b07bc / #391.
  • Wait for codex to try to run any of its grep -R ... -n | head -n 20 commands.

What is the expected behavior?

_No response_

What do you see instead?

  • Syntax errors arise:
    command

    $ grep -n "finally:" some-file | head

    command.stdout (code: 0, duration: 0s)

    Usage: grep [OPTION]... PATTERNS [FILE]...
    Try 'grep --help' for more information.

Additional information

This is fully resolved by backing out PR #391.

It's occurring with a system/host shell of fish, so that might be part of the divergence that causes an issue.

I'm just running with that PR reverted until this issue is resolved. I'd be happy to implement a fix, but I haven't the time yet to investigate what the PR was seeking to fix in the first place.

View original on GitHub ↗