Add an option to hide or collapse code snippets in Codex CLI progress output
What variant of Codex are you using?
CLI
What feature would you like to see?
Summary
I would like Codex CLI to support an option that hides or collapses code snippets in intermediate reasoning, progress updates, and tool-call output.
When Codex is working, it often prints code fragments, diffs, or file snippets directly in the terminal. In many cases, I only want to see the natural-language progress summary, such as what file is being inspected, what change is planned, or which validation step is running.
Suggested behavior
Add a display setting such as:
[ui]
code_output = "collapsed"
Possible modes:
show: current behaviorhide: do not show code snippets in progress outputcollapsed: show a placeholder and allow the user to expand the code manually
For example, instead of printing a full code block immediately, Codex CLI could show:
[Code snippet collapsed — press Enter or click to expand]
This could apply to:
- code blocks in assistant progress messages
- large command outputs containing source code
- tool output that includes file snippets
- diffs or patch previews, if the user has not explicitly requested them
Motivation
This would reduce terminal noise and make Codex easier to follow during long coding sessions.
It would also help users who prefer to review actual changes through git diff, their editor, or a dedicated review step instead of seeing code fragments mixed into the live progress log.
Expected result
Users can keep Codex's progress output readable by default, while still being able to expand code when needed.
Additional information
_No response_