tui: add codex resume --history-lines to cap replayed scrollback

Resolved 💬 2 comments Opened Feb 26, 2026 by wegel Closed Apr 3, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

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:

Validation run

  • cargo test -p codex-cli resume_history_lines_flag_sets_limit -- --nocapture

View original on GitHub ↗

2 Comments

teneko · 6 months ago

Yep, it happened to me that I actually had to wait about 3-5 minutes until I actually could continue the session. That's rough.

etraut-openai contributor · 4 months ago

This feature request hasn't received enough upvotes, so closing.