[BUG] Opus 4.8: compaction partially overwrites visible chat scrollback above the summary (was previously retained)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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
- Start a Claude Code session and converse until it auto-compacts (or trigger compaction).
- After the compaction summary appears, scroll up to the boundary just before the summary.
- 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
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗