CLI stdout intermittently lost for shell commands (e.g. `brew search`)

Open 💬 6 comments Opened Jan 22, 2026 by Tu-Zhenzhao
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

v0.88.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5.2 medium

What platform is your computer?

macOS on M2

What terminal emulator and version are you using (if applicable)?

native Terminal

What issue are you seeing?

Shell commands that normally produce stdout intermittently return (no output) in Codex CLI v0.88.0, even though the command clearly executes.

Example:

  • Running brew search claude sometimes shows partial output once, then on subsequent runs Codex reports:

• Ran brew search claude
└ (no output)

This breaks Codex agent workflows because the agent cannot see or reason over the command output.

Key observations:

  • The command does run (Homebrew executes normally).
  • Output is sometimes visible on first run, then disappears on later runs.
  • Adding a pipe (e.g. | head or | cat) makes the output reliably appear.
  • Downgrading Codex CLI to v0.47.0 completely fixes the issue.

This strongly suggests a regression in stdout capture / process execution handling in newer Codex CLI versions.

What steps can reproduce the bug?

npm i -g @openai/codex@0.88.0.

Start Codex CLI. and let codex run the command like:

brew search claude

Observe that:

  • On first run, some output may appear.
  • On subsequent runs, Codex often reports: no output

Now run:

brew search claude | head 

or cat

Observe that output appears reliably when piped.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

6 Comments

github-actions[bot] contributor · 5 months ago

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

  • #4959
  • #5649
  • #5859

Powered by Codex Action

etraut-openai contributor · 5 months ago

You specifically mentioned Codex 0.88. Does that mean you think this is a regression since 0.87?

Do you have any non-default configuration options enabled?

If you're able to repro this, please use the /feedback slash command to upload your logs and session details and post the thread ID here.

Tu-Zhenzhao · 5 months ago

@etraut-openai

I did not change any default configuration. I mentioned v0.88 is just because I encounter this problem in v0.88 I did not test v0.87 my previous version is v0.47 so I am not sure if this is also happening in v0.87

This is the history when using v0.88

› Can you try to run `brew search claude` see if you can see any output if not then
  stop and let me know


───────────────────────────────────────────────────────────────────────────────────────

• I ran brew search claude and it returned exit code 0 but produced no output.

the session id is 019be559-b403-7300-a97d-e69553cc4e11

Then I upgraded to v0.89 and try again, I got


› try to run `brew search claude` see if you can see the output, if not let me know


✔ You approved codex to run brew search claude this time

• Ran brew search claude
  └ (no output)

─ Worked for 13s ──────────────────────────────────────────────────────────────────────

• I can see the output — it’s just empty.

  brew search claude exits successfully but returns no matches on your system (no
  formulae/casks named claude).

and the session id is 019be4d7-1278-7972-aa55-af8c73e66cd9

Looks like the issue still exists in latest version.

etraut-openai contributor · 5 months ago

We've had a few similar problems reported in the past, and all of those turned out to be a shell configuration issue. You'll likely need to do some debugging on your machine to figure this out. Review your shell config files and make sure they don't contain anything that would interfere with shell execution within Codex.

Tu-Zhenzhao · 5 months ago
We've had a few similar problems reported in the past, and all of those turned out to be a shell configuration issue. You'll likely need to do some debugging on your machine to figure this out. Review your shell config files and make sure they don't contain anything that would interfere with shell execution within Codex.

Sounds reasonable, I will check myself

Tu-Zhenzhao · 5 months ago

I initially had a real shell config issue (interactive zsh startup interfering). And fixed all the potential configuration from my shell issue.

Current state:

  • echo hello → output visible
  • brew --version → output visible
  • Any command involving brew search claude → no output at all, even when followed by ; echo "__END__"
  • Exit code is 0
  • This reproduces with:
brew search claude
zsh -lc 'brew search claude'

• Same command works reliably in a multi-line batch, but fails when run alone
• Downgrading Codex CLI to v0.47.0 makes the issue disappear entirely

This suggests a stdout capture issue in Codex CLI v0.88.0 triggered by brew search (likely pager/TTY-related), not remaining shell startup noise.

Also for the command that Codex using if it use brew search claude | head the output can be captured, but pure brew search claude cannot