Skip to content

Add way to hide tool calls/output in TUI #18396

Open

Description

@destroyo

What variant of Codex are you using?

codex-cli 0.121.0

What feature would you like to see?

This is how my terminal look after every other command.

• The handover file is written and the skill now documents the “reply ok or provide replacement filename” workflow. I’ll run the handover listing helper once to confirm the file
  appears newest-first.

• Explored
  └ Read git-review-sidebar-scroll-handover-skill.md

• Ran /usr/bin/python3 /Users/ma/.codex/skills/handover/scripts/list-handovers.py
  └ git-review-sidebar-scroll-handover-skill.md

• Ran rg -n "reply with `ok`|replacement filename|path separators" /Users/ma/.codex/skills/handover/SKILL.md
  └ zsh:1: command not found: ok
    35:3. Ask the user to reply with `ok` to accept the proposed filename or send a replacement filename.
    36:4. If the user sends a replacement filename, normalize and validate it before writing:
    40:   - Do not allow path separators; handovers must stay inside `./.codex/handover`.

• Called
  └ ram.node.create({"body":"Decision: created project handover at .codex/handover/git-review-sidebar-scroll-handover-skill.md and updated /Users/ma/.codex/skills/handover/
        SKILL.md to use the explicit filename workflow: propose filename, user replies ok or replacement, normalize/validate, then write.","branchId":"B-
        00016","conversationId":"C-00006","provenance":"assistant","stability":"stable","state":"completed","type":"decision"})
    {"record": {"body": "Decision: created project handover at .codex/handover/git-review-sidebar-scroll-handover-skill.md and updated /Users/ma/.codex/skills/handover/SKILL.md to
        use the explicit filename workflow: propose filename, user replies ok or replacement, normalize/validate, then write.", "conversationID": "C-00006", "createdAt": "2026-04-
        17T20:27:55Z", "homeBranchID": "B-00016", "id": "D-00356", "kind": "decision", "provenance": {"kind": "assistant"}, "stability": "stable", "state": "completed",
        "updatedAt": "2026-04-17T20:27:55Z"}, "recordType": "node"}

Trying to parse the content from the tools output is a pain. Any way we can collapse those lines by default?

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal display
    on Apr 17, 2026
  2. changed the title [-]I don’t see a supported way to hide tool calls/output by default in Codex right now.[/-] [+]Add way to hide tool calls/output in TUI[/+] on Apr 17, 2026
  3. szybnev commented on Jun 14, 2026

    @szybnev

    +1

  4. sabmark commented on Jul 13, 2026

    @sabmark

    +1

  5. AmelioMansour commented on Jul 14, 2026

    @AmelioMansour

    A useful refinement would be a latest-turn-only display mode rather than hiding all tool activity.

    Desired behavior:

    • Keep commands and tool output from the current/latest completed turn visible.
    • Once a newer turn starts or completes, automatically collapse or hide tool cells from older turns.
    • Keep the user prompts and assistant responses visible.
    • Preserve the full transcript for the model and for explicit transcript inspection.

    For example:

    [tui]
    tool_output_history = "latest-turn" # all | latest-turn | hidden

    This would keep the current work inspectable without letting command output dominate scrollback during longer conversations. /clear is not an adequate workaround because it resets the task context instead of only cleaning up the presentation.

    Environment: Codex CLI 0.144.1, Windows/PowerShell.

  6. awaismirza92 commented on Jul 16, 2026

    @awaismirza92

    Please add a focus mode, similar to Claude Code’s /focus, that shows only user prompts and final responses while hiding tool calls and command output. Full details should remain accessible via Ctrl+T.

  7. rautita commented on Aug 11, 2026

    @rautita

    Another vote for this. In long interactive CLI sessions, repeated Ran ..., shell commands, find/git output, and similar tool activity quickly dominate the transcript and make the actual conversation hard to scan.

    A configurable TUI mode such as tool_calls = "hidden" / "collapsed" would be very useful, while keeping approvals, errors, and safety-critical prompts visible. The complete tool transcript could remain accessible through Ctrl+T or an explicit transcript view.

    The key requirement is to keep the interactive CLI workflow, not switch to codex exec just to get a cleaner display.

  8. jeanmonet commented on Aug 12, 2026

    @jeanmonet

    Another concrete use case is an MCP tool with a large generated code or query argument. Codex currently renders the full serialized invocation, for example:

    * Called
      context-mode.ctx_execute({"language":"javascript","code":"<long generated program>"})
      <tool result>
    

    For this case, fully hiding tool activity is not necessarily required. A compact, meaningful one-line description would be much more useful than displaying the complete payload.

    A possible design (names only illustrative):

    [tui]
    tool_calls = "compact"          # full | compact | name-only | hidden
    tool_argument_max_chars = 200
    tool_result_max_chars = 1000

    Per-MCP-server overrides would also help because tools have very different payload shapes:

    [tui.mcp_servers.context-mode]
    tool_calls = "compact"
    tool_argument_max_chars = 0
    tool_result_max_chars = 500

    For compact mode, Codex could prefer an optional one-sentence invocation summary supplied with the call, for example summary: "Inspect worker completion state", or equivalent standardized MCP metadata. If no summary is supplied, it could fall back to server.tool(...) with bounded arguments.

    The complete arguments and result should remain preserved in the transcript and available through an explicit expand/detail action. Approvals, errors, and safety-relevant messages should remain visible regardless of display mode.

    Separate argument and result limits matter: code-execution and search tools can have a very large input but a small, useful result. This would preserve auditability while preventing generated source code or queries from dominating terminal scrollback.

  9. etraut-openai commented on Aug 14, 2026

    @etraut-openai
    Contributor

    This commit reduces the tool call output significantly and brings the TUI in line with the desktop app in terms of what is displayed for tool calls. You can still use Ctrl+T to show full tool outputs. This change will be in the 0.148.0 release. Let's see how that feels. I'm hoping that we can avoid adding another toggle or config option since we already have Ctrl+T.

  10. zzelner commented on Aug 24, 2026

    @zzelner

    Still reproducible on codex-cli 0.149.1 on macOS arm64, after the 0.148.0 display reduction referenced above.

    In the normal TUI, successful app-backed tool calls still render as multi-line entries such as:

    • Called
      └ codex_apps.github.fetch_pr({...})
        └ Action completed.
    

    Calls such as codex_apps.github.fetch_file also display serialized arguments and status across multiple wrapped rows. A short read-only investigation can fill the viewport with these entries and separate the useful conversation from the final result. This is not raw-output mode.

    The remaining gap appears especially noticeable for app/MCP calls. Ideally, completed successful calls would render as one compact line—or as a turn-level “N tool calls” group—with full arguments and results available through Ctrl+T or an explicit expand action. Active calls, failures, approvals, and security-relevant events should remain visible.

  11. jeanmonet commented on Aug 26, 2026

    @jeanmonet

    One implementation detail explains why this persists for ordinary MCP tools. In the current renderer:

    let node_repl = self.result_kind() == McpResultKind::NodeRepl;
    let compact = node_repl && mode == McpToolCallRenderMode::Display;

    Therefore an ordinary MCP call such as context-mode.ctx_execute_file is classified as Standard, compact remains false, and normal TUI history uses format_mcp_invocation, which prints the full generated program and arguments.

    Source: https://github.com/openai/codex/blob/main/codex-rs/tui/src/history_cell/mcp.rs#L123-L165

    The desired change is presentation-only:

    • normal TUI: • Called context-mode.ctx_execute_file (or a bounded summary);
    • Ctrl+T transcript: complete invocation and result;
    • MCP data available to the model: complete and unchanged.

    A global or per-server compact / name-only display option would provide this without changing MCP behavior or model context.

  12. jeanmonet commented on Aug 28, 2026

    @jeanmonet

    @zzelner could someone please look into this? It would be very much appreciated. The cli output is polluted and unusable because of this limitation, and frankly becoming more annoying by the day.

  13. jo9900 commented on Sep 5, 2026

    @jo9900

    I recently switched from Claude Code to Codex, and this issue has been incredibly frustrating. The tool-call output still makes longer sessions unnecessarily difficult to follow.

  14. jeanmonet commented on Sep 5, 2026

    @jeanmonet

    Just look at this horror of codex cli outputs:

    Image
  15. WladmirJunior commented on Sep 10, 2026

    @WladmirJunior

    @etraut-openai, I built a retroactive, opt-in /focus prototype with sanitized before/after captures; GitHub denied PR creation, so would you consider an exception to the external-PR policy or use this as a reference?

  16. mbastawisy commented on Sep 11, 2026

    @mbastawisy

    Still reproducible with codex-cli 0.154.0 on macOS.

    The difference is especially noticeable when continuing the same conversation between Codex CLI and Codex Desktop. Desktop keeps intermediate activity behind a single expandable Worked for … row, while the CLI transcript displays each Explored, Ran, and tool-call entry inline.

    For example, a documentation lookup using Context7 can produce several npx ctx7@latest command rows before a relatively short final answer, making the conversation difficult to scan.

    It would be useful to have an opt-in TUI preference such as:

    [tui]
    activity_display = "collapsed" # expanded | collapsed | hidden

    For collapsed mode:

    • Group completed command and tool activity for each turn behind one compact row, similar to Codex Desktop.
    • Keep active commands, approval requests, failures, and important warnings visible while they require attention.
    • Preserve every command and its output in the full transcript, accessible with Ctrl+T or another explicit expand action.
    • Apply the selected presentation consistently when resuming or replaying conversation history.
    • Treat this as presentation-only; it should not remove tool results from model context or stored history.

    The existing detailed CLI presentation can remain the default. This would simply let users choose a conversation-first view while retaining full auditability on demand.

  17. jeanmonet commented on Sep 19, 2026

    @jeanmonet

    codex 155.1, still an issue:

    Image
  18. jeanmonet commented on Sep 23, 2026

    @jeanmonet

    codex 156.1, still an issue.

  19. codefoster commented on Sep 25, 2026

    @codefoster

    Another user case from Windows Terminal: during a short documentation lookup, Codex printed a separate activity row for each web search, page open, and text search. Those rows filled the screen while the assistant's actual explanation was only a few lines, making the conversation hard to follow.

    Please add an opt-in, per-turn collapsed activity view in the CLI: show one compact row such as “12 searches and 2 commands” for completed work, with a key or click to expand the full actions and outputs. Keep the user's messages and the assistant's updates and final answers visible. This should apply to web activity as well as shell commands, without removing anything from the saved transcript or model context.

  20. jeanmonet commented on Oct 17, 2026

    @jeanmonet

    0.163.0 still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions