Add an option to hide or collapse code snippets in Codex CLI progress output

Open 💬 2 comments Opened Jul 13, 2026 by Traveller23

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 behavior
  • hide: do not show code snippets in progress output
  • collapsed: 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_

View original on GitHub ↗

2 Comments

rosejn · 29 days ago

Yes please! When managing lots of agents all of the diffs just get in the way of tracking what's happening and where decisions need to be made. Tokens or not, it would be great to silence them in the terminal output so we can just read the actual conversation thread, and optionally the high-level, intermediate thinking steps.

deardaveed · 10 days ago

yeah. this is my biggest gripe of codex-cli right now. there is just so much clutter. there MUST be a way of collapsing/hiding all the clutter from tool calls, thinking boxes, without affecting the quality