claude-code - 💡(How to fix) Fix [BUG] Opus 4.8: compaction partially overwrites visible chat scrollback above the summary (was previously retained)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

(none — no error is produced; this is a silent display behavior change)

  • No API error — session remains fully functional, only the recent visible history is clipped

Code Example

(none — no error is produced; this is a silent display behavior change)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

After a session compacts, a chunk of the most recent transcript — roughly the last 500–1000 characters before the compaction point — is removed/overwritten from the visible scrollback. The rest of the history above it is retained; it's specifically the tail end of the recent conversation that gets clipped.

Previously this content stayed on screen. The session continues working normally — no errors, no 400s. This is purely a scrollback/display regression, distinct from the thinking-block 400 compaction bugs (e.g. #63450)

What Should Happen?

The pre-compaction transcript should remain visible and scrollable in the terminal, as it did before. Dropping older messages from the model's working context is expected behavior; removing them from the visible scrollback is not.

Error Messages/Logs

(none — no error is produced; this is a silent display behavior change)

Steps to Reproduce

  1. Start a Claude Code session and converse until it auto-compacts (or trigger compaction).
  2. After the compaction summary appears, scroll up to the boundary just before the summary.
  3. Observe: a chunk of the most recent transcript (~500–1000 characters) immediately preceding the compaction is missing/overwritten, while earlier history above it is still present.

Reproduces across two independent, unrelated sessions (different projects), so it is not project- or content-specific.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Opus 4.7

Claude Code Version

2.1.156 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • The loss is partial and localized: roughly the last 500–1000 characters of the most recent transcript before compaction, not the entire pre-summary history.
  • Install type: native/standalone (~/.local/bin/claude)
  • Cross-session: reproduced in two separate, topically-unrelated sessions on the same machine.
  • No API error — session remains fully functional, only the recent visible history is clipped

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Opus 4.8: compaction partially overwrites visible chat scrollback above the summary (was previously retained)