After upgrading to Claude Code v2.1.89, scrolling up in the terminal chat causes the conversation to disappear, and the chat history is directly "lost."



It's not that the model compresses the context; it's the new rendering engine that changed—virtualized scrolling, only rendering the current viewport content, so the history messages "disappear" from the interface.

The same issue occurs in iTerm2 and the built-in terminal; the problem lies at the Claude Code layer.

The solution is simple: wrap it with tmux.
tmux has its own independent scrollback buffer, unaffected by application-level rendering. Just three configuration lines:
set -g history-limit 50000
set -g mouse on
set -sg escape-time 10
With 50,000 lines of history, you can scroll directly with the mouse wheel, and lowering the ESC delay doesn't affect interaction.
I added a shell function: typing 'cc' automatically starts tmux + Claude Code, and reconnects to an existing session.
Used it for a night, and I never lost history again.
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pin