Fails to see stderr output (of `swift test`)

Resolved 💬 2 comments Opened Nov 14, 2025 by aehlke Closed Jan 17, 2026

What version of Codex is running?

0.58.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.1-codex

What platform is your computer?

macOS Tahoe

What issue are you seeing?

When I run swift test it produces a bunch of stderr logs including a fatalError. Codex CLI even shows me the fatalError line in the output summary. But Codex repeatedly says it returns no error code and the logs do not mention any failure or error. Then I asked it to pipe stderr to a file and check that, and suddenly it can see the error. It looks like it's only considering stdout and thus it misses the issues reported onto stderr.

Also, it shows a "red dot" for the swift test command, so Codex CLI definitely understands that the command failed. Despite that, the model says it succeeded.

What steps can reproduce the bug?

Try using swift test with code that does not build and produces a compiler error. Or just any command that reports an error on stderr but not stdout (and I think Codex is lying about the status code being 0 because Codex CLI shows the "red dot" for the command but I didn't confirm)

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

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