[BUG] Chat history scrollback visually rewinds to old state while live model retains true context (visual desync)

Resolved 💬 3 comments Opened Apr 21, 2026 by 0xnfrith Closed Apr 24, 2026

Preflight

  • [x] Searched existing issues — closest (#42670, #826) are about scrollback clearing or auto-scrolling; this is a different symptom where scrollback renders stale content
  • [x] Single bug report
  • [x] Latest version

What's Wrong?

Randomly during a session, the Claude Code TUI's visible chat history snaps back to a much earlier point in the conversation. It looks as if all recent messages have been lost — but they haven't. If I ask the model what we were just discussing, it answers from the real, current conversation state. So the underlying session/context is intact; only the TUI's rendered transcript is showing stale content.

What Should Happen?

The scrollback view should always reflect the current, true conversation state. If a re-render happens, it should paint the most recent messages, not a snapshot from earlier in the session.

Steps to Reproduce

Unfortunately non-deterministic. Observed behaviour:

  1. Long-running session (many turns, mixed tool use + long shell output).
  2. At some point (trigger not isolated — may be tied to resize, tmux redraw, or compaction), the scrollback jumps backward and renders as if we're mid-way through a much earlier exchange.
  3. Scrolling up/down does not restore the recent history from the view; the view appears committed to the old state.
  4. Typing a discreet query ("what were we just doing?") returns an accurate answer referencing the true, recent history — confirming the model still has full context, only the render is stale.

Version

2.1.116 (Claude Code)

Regression

I don't know

Platform

Anthropic API

OS

macOS (26.4.1)

Terminal

Other — Ghostty (inside tmux 3.5a)

Additional

  • May be related to alternate-screen-buffer handling (#42670) and redraw logic under tmux — but symptom is different (stale paint vs. cleared scrollback).
  • Will attach a screenshot of the desynced state in a follow-up comment.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗