bug: quiet mode still printing json formatted text to terminal
Resolved 💬 7 comments Opened Apr 23, 2025 by Stewart86 Closed Aug 7, 2025
💡 Likely answer: A maintainer (LuciNyan, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
v0.1.2504221401
Which model were you using?
o4-mini
What platform is your computer?
Linux 6.14.3-arch1-1 x86_64 unknown
What steps can reproduce the bug?
when using codex -q "explain this project.." I am still seeing JSON output.
What is the expected behavior?
Should only return final result from assistant. nothing else, unless it is stderr.
What do you see instead?
I am seeing the JSON output of the reasoning, function calls etc.
7 Comments
The
console.loginonItemwithinrunQuietModeseems intentional but unclear. Looking forward to understanding the intended logging design and happy to implement any suggested improvements.Yeah, I saw the code too. but if we are to use Codex in a shell environment where we pipe the response to other command / process,
console.logwhich is stillstdout, I supposed, will be piped into the next command, which just defeats the purpose.edit: well, I guess maybe there can be use cases where we want to examine the the entire reasoning steps and process (what has been done etc.). But most often than not, if we are running on quiet mode, I supposed, we should only be expecting the final "summarized" output? Perhaps what we need to additional prompt to make sure AI summarize the final response instead of vomiting out everything?
@Stewart86 yeah I think that makes a lot of sense.
re: @LuciNyan
I'm also very confused about this bit. There's a comment in cli.tsx suggesting that the output of quiet mode should only be the final message
It seems like the onItem/runQuietMode logic and this comment were both committed in the initial commit from OpenAI. Not sure what the plan is here.
This is still broken, kinda confusing that in the cli reference there's an example using both
quietandjsonflag...!Image
The quiet mode can't output the same results as the non-quiet mode. For quiet mode, codex only outputs the
lscommand results when using the example queryexplain this codebase to me.Any updates? Is there a plan to output only the final answer? That would make this more useful for combining with other agents/tools.
Thank you for the feedback! Please try again on the latest version of Codex CLI. If the issue persists, we would be happy to take a look at it in the
codex-rs/implementation. For more details, please refer to our project update: https://github.com/openai/codex/discussions/1174.