You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make command folding and output truncation in Codex CLI TUI configurable or disable-able #4550
Currently, the Codex CLI TUI forcibly folds multi-line commands and command output, showing only a few lines and replacing the rest with an ellipsis line (e.g., … +X lines). This makes it very difficult to review, debug, or copy full scripts or command outputs generated by the model, especially for heredoc-heavy workflows (e.g., python3 - <<'PY' ...).
There is no user-exposed setting in the CLI or config file to disable or configure this folding/truncation. The behavior is hard-coded in the TUI. Many users would prefer to see the full command/output or at least have the ability to customize the folding threshold.
I would also like to see this enhancement. I would find it infinitely useful without any deeper layers adjustments.
Reacted by Lachlan McMillan, Joseph McAllister, yoo hyeong chan, Escape0707, Jay The Reaper, Gregory Leleytner, Joseph Barbier, Indigo6, Nasser Boan, Diego Mesa and 1 more
I want to add that while this convenient feature is not implemented yet. I found I can view past run full command and its output when in the "double-tap-ESC history message editing" TUI.
I don't know why Google AI Mode and ChatGPT Pro all can't point that workaround out for me, but since they all direct me here for "existing issue", I guess I'll just "add this to the context". /s
Edit: The obvious disadvantage of this workaround is that I have to press ESC to get into this TUI, thus I can't inspect commands and outputs as they are getting run by the working Codex agent. I have to wait until it finishes.
This makes safe development much harder because you cannot reliably inspect full tool output inline.
Current workaround is exporting results to files and re-reading them, which is obviously silly for normal CLI flow.
I understand external contribution load is high, but this is a critical UX issue and cannot be fixed downstream in user config alone because the truncation behavior is hardcoded in the renderer.
Maybe need to surface more of the UX so that community can extend via plugins and bypass the acceptance requirements if dev pipeline is so full that these sorts of things stay open for half a year?
Accurate fix (current Codex layout)
Note: current paths are under codex-rs/tui_app_server/src/* (not codex-rs/tui/src/*).
To make it clear why this is a critical UX/security issue:
In the past few weeks we are dealing with increased security attacks through AI-assisted malware that is using all sorts of bleeding edge obfuscation tactics.
The fact that codex is truncating tool response with no way to force a review means this is yet another surface vector to slip things past even manual tool use - not to mention unattended agents.
@TheReaperJay Bro thanks for the patch, but I just want to note that even if they don't accept non-contributor PRs and close them, the best way to get people try your patch is still to file a PR and mention it here rather than in a long and unorganized comment...
Cool thanks @escape0707 - I read through the contributing guideline and saw that they just auto close the PR and assume they just straight up ignore it and move to a graveyard but you're right I'll give that a shot anyway!
Fwiw codex found this one for me and I can see there are lots of other issues opened for it too so I think you're right and it might surface it more.
absolutely deranged UX!
on par with while i am typing, giving a random 'approval' focus-stealing style. (why not a M- or C- required to approve if recent keystrokes)
Still an issue in Codex CLI v0.145.0. Tool calls, especially MCP calls returning large JSON payloads, overwhelm the transcript and make the actual conversation difficult to follow.
The VS Code Codex interface handles this much better by keeping tool details collapsed and available on demand. The CLI should offer equivalent behaviour.
Suggested configuration:
[tui]
tool_output_display = "collapsed"# hidden | collapsed | full
"Collapsed" should show one concise status line per call, such as Tool call completed, without arguments or output. Users should be able to expand an individual call when debugging. This should apply consistently to shell commands, MCP tools, searches, patches, and other tool types.
This is separate from reasoning visibility. hide_agent_reasoning and model_verbosity do not address tool call transcript noise. Please consider matching the VS Code default in the CLI.
Thanks all!
Reacted by alex-farsignal, weireweire, Ron Budnar and Diego Mesa
Adding a current-version use case from Codex CLI 0.157.1 on Windows with PowerShell. This matches the latest stable release when checked on 2026-09-27.
I want to stay in the normal interactive view while seeing more of the commands and tool results. Repeatedly opening Show details or switching into transcript mode interrupts the workflow, especially when following a sequence of PowerShell commands.
A persistent preference for the number of preview lines would help, for example 20 or 50 lines before folding. An option to expand tool output by default would also be useful. Ideally this would cover shell commands and MCP/tool results, with the existing per-block expand/collapse controls still available.
The current CLI help and published configuration reference do not expose this preference. tool_output_token_limit controls how much output is stored in history; it does not control the visible preview size. /raw and --no-alt-screen address selection and scrollback.
The key request is to make the normal view's preview size configurable so inspecting routine output does not require opening a separate view each time.
Is this ever going to be worked on? The issue has been open for a year now (100 years in AI-assisted-development terms?) with not even a comment from maintainers. Clearly this isn't some niche feature that a single person wants, and neither is it so hard to implement 🤷
Activity
kzhrv commentedon Nov 6, 2025
I would also like to see this enhancement. I would find it infinitely useful without any deeper layers adjustments.
bakaburg1 commentedon Jan 15, 2026
is this planned? I'd love to see what's going on instead of just
escape0707 commentedon Mar 14, 2026
I want to add that while this convenient feature is not implemented yet. I found I can view past run full command and its output when in the "double-tap-ESC history message editing" TUI.
I don't know why Google AI Mode and ChatGPT Pro all can't point that workaround out for me, but since they all direct me here for "existing issue", I guess I'll just "add this to the context". /s
Edit: The obvious disadvantage of this workaround is that I have to press ESC to get into this TUI, thus I can't inspect commands and outputs as they are getting run by the working Codex agent. I have to wait until it finishes.
TheReaperJay commentedon Mar 28, 2026
2026, aka 10 years later in AI land, and this is still the current Codex UX for anything longer than a few lines:
This makes safe development much harder because you cannot reliably inspect full tool output inline.
Current workaround is exporting results to files and re-reading them, which is obviously silly for normal CLI flow.
I understand external contribution load is high, but this is a critical UX issue and cannot be fixed downstream in user config alone because the truncation behavior is hardcoded in the renderer.
Maybe need to surface more of the UX so that community can extend via plugins and bypass the acceptance requirements if dev pipeline is so full that these sorts of things stay open for half a year?
Accurate fix (current Codex layout)
Note: current paths are under codex-rs/tui_app_server/src/* (not codex-rs/tui/src/*).
1)
codex-rs/core/src/config/types.rsAdd enum:
Add field to Tui:
2)
codex-rs/core/src/config/mod.rsImport and expose runtime config field:
Wire from TOML:
3)
codex-rs/tui_app_server/src/exec_cell/model.rsStore mode on ExecCell and carry it through rebuilds:
Constructor keeps default behavior:
Accessors:
And in
with_added_call,preserve tool_output_display.4)
codex-rs/tui_app_server/src/exec_cell/render.rsImport:
Update constructor path to receive mode and set it:
Overflow-safe ellipsis math:
Gate truncation:
5)
codex-rs/tui_app_server/src/chatwidget.rsPass the new arg at all new_active_exec_command(...) call sites:
6)
codex-rs/tui_app_server/src/pager_overlay.rsUpdate test call site with explicit mode:
7)
codex-rs/core/src/config/config_tests.rsUpdate expected structs (Tui and Config) to include:
(and import ToolOutputDisplay in the test module).
8) User config
~/.codex/config.toml:collapsed preserves current behavior, full disables the collapse path for tool output rendering.
———
In the meantime, anyone blocked by this can apply the patch and rebuild.
Repo (script: fetch latest, apply patch, build/install):
https://github.com/TheReaperJay/codex-full-tool-output-installer/tree/master
Current patch target is pinned to the layout used by Codex CLI 0.117.0 / commit e39ddc6, so expect refreshes as upstream files move.
TheReaperJay commentedon Mar 28, 2026
To make it clear why this is a critical UX/security issue:
In the past few weeks we are dealing with increased security attacks through AI-assisted malware that is using all sorts of bleeding edge obfuscation tactics.
The fact that codex is truncating tool response with no way to force a review means this is yet another surface vector to slip things past even manual tool use - not to mention unattended agents.
escape0707 commentedon Mar 28, 2026
@TheReaperJay Bro thanks for the patch, but I just want to note that even if they don't accept non-contributor PRs and close them, the best way to get people try your patch is still to file a PR and mention it here rather than in a long and unorganized comment...
TheReaperJay commentedon Mar 28, 2026
Cool thanks @escape0707 - I read through the contributing guideline and saw that they just auto close the PR and assume they just straight up ignore it and move to a graveyard but you're right I'll give that a shot anyway!
Fwiw codex found this one for me and I can see there are lots of other issues opened for it too so I think you're right and it might surface it more.
kzhrv commentedon Mar 28, 2026
@TheReaperJay great lead on this issue!
Make a PR and link it here! We should take any chance to surface this issue just as @escape0707 said.
graehl commentedon Apr 5, 2026
absolutely deranged UX!
on par with while i am typing, giving a random 'approval' focus-stealing style. (why not a M- or C- required to approve if recent keystrokes)
benpalmer1 commentedon Jul 29, 2026
Still an issue in Codex CLI v0.145.0. Tool calls, especially MCP calls returning large JSON payloads, overwhelm the transcript and make the actual conversation difficult to follow.
The VS Code Codex interface handles this much better by keeping tool details collapsed and available on demand. The CLI should offer equivalent behaviour.
Suggested configuration:
"Collapsed" should show one concise status line per call, such as
Tool call completed, without arguments or output. Users should be able to expand an individual call when debugging. This should apply consistently to shell commands, MCP tools, searches, patches, and other tool types.This is separate from reasoning visibility.
hide_agent_reasoningandmodel_verbositydo not address tool call transcript noise. Please consider matching the VS Code default in the CLI.Thanks all!
kzhrv commentedon Sep 1, 2026
I have stopped using codex because of this issue.
JohnnyTheCoder1 commentedon Sep 27, 2026
Adding a current-version use case from Codex CLI 0.157.1 on Windows with PowerShell. This matches the latest stable release when checked on 2026-09-27.
I want to stay in the normal interactive view while seeing more of the commands and tool results. Repeatedly opening Show details or switching into transcript mode interrupts the workflow, especially when following a sequence of PowerShell commands.
A persistent preference for the number of preview lines would help, for example 20 or 50 lines before folding. An option to expand tool output by default would also be useful. Ideally this would cover shell commands and MCP/tool results, with the existing per-block expand/collapse controls still available.
The current CLI help and published configuration reference do not expose this preference.
tool_output_token_limitcontrols how much output is stored in history; it does not control the visible preview size./rawand--no-alt-screenaddress selection and scrollback.The key request is to make the normal view's preview size configurable so inspecting routine output does not require opening a separate view each time.
serpro69 commentedon Oct 5, 2026
Is this ever going to be worked on? The issue has been open for a year now (100 years in AI-assisted-development terms?) with not even a comment from maintainers. Clearly this isn't some niche feature that a single person wants, and neither is it so hard to implement 🤷