Skip to content

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

Closed as not planned

Description

@wegel

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

Activity

  1. added
    enhancement
    CLI
    TUI
    on Feb 26, 2026
  2. teneko commented on Feb 26, 2026

    @teneko

    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.

  3. removed
    CLI
    on Feb 27, 2026
  4. etraut-openai commented on Apr 3, 2026

    @etraut-openai
    Contributor

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

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

    TUIenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions