Skip to content

Avoid clearing the terminal scrollback #2479

@frangio

Description

@frangio

There's a few instances where Claude Code will clear the terminal automatically and delete all scrollback.

  • When resizing the terminal.
  • With the /clear command.
  • When switching to detailed transcript.

None of these should clear the user's terminal scrollback.

If Claude Code needs more control of the terminal history it should operate in the alternate screen. Perhaps the alternate screen is only needed for the detailed transcript, I actually thought this was the way it worked originally, I don't know if it was changed at some point or I hallucinated it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:tuibugSomething isn't workinghas reproHas detailed reproduction steps

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions