Skip to content

Make command folding and output truncation in Codex CLI TUI configurable or disable-able #4550

@Konjac-XZ

Description

@Konjac-XZ

Problem

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.

References

Requested Solution

  • Add a user-facing configuration option (CLI flag or config.toml) to:
    • Disable command folding/output truncation entirely (always show full content)
    • Or, allow customizing the number of lines shown before folding (both for command lines and output)
  • Optionally, provide a per-session or per-command override (e.g., a hotkey to expand/collapse in the TUI)

Workarounds (not sufficient)

  • Using headless/non-interactive mode avoids the TUI, but disables the interactive session.
  • Building from source to raise caps is not user-friendly.

Impact

  • Users running or reviewing long scripts (e.g., model-generated bash/python heredocs) can see the full command, copy/edit/debug as needed.
  • Makes Codex CLI more transparent and user-friendly for advanced workflows.

Filed by @Konjac-XZ. If more details are needed, please let me know.

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