tui: add codex resume --history-lines to cap replayed scrollback
Resolved 💬 2 comments Opened Feb 26, 2026 by wegel Closed Apr 3, 2026
Summary
Add a codex resume --history-lines <LINES> option to cap replayed scrollback output when resuming a session.
Why
For long sessions, codex resume can spend noticeable time printing a large backlog before the prompt is usable. In practice, most of that output is low-value when the goal is to quickly continue work.
A replay line cap makes resume startup faster and keeps terminal output focused on recent context.
Proposed behavior
- New flag:
codex resume --history-lines <positive-int> - Applies only to replayed resume output (not normal live output after startup)
- Default behavior remains unchanged when the flag is omitted
Ready implementation
I have a complete, tested implementation in my fork:
- Branch: https://github.com/wegel/codex/tree/pr/history-lines-limit
- Compare: https://github.com/openai/codex/compare/main...wegel:pr/history-lines-limit?expand=1
- Commit:
b6480fa365fdf10dadb0c6532f92ff1cb1952383
Validation run
cargo test -p codex-cli resume_history_lines_flag_sets_limit -- --nocapture
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗