Last assistant message re-displays on context compression/session re-initialization
Description
When a session's context window gets compressed mid-conversation, the last assistant message is re-printed/re-displayed to the user. This creates a repetitive experience — especially in long sessions where compression happens multiple times, the same message keeps appearing.
Steps to Reproduce
- Start a long conversation in Claude Code
- Continue the conversation until context compression triggers
- Observe: the last assistant message is reprinted verbatim before the session continues
Expected Behavior
The session should resume without re-displaying the last assistant message. The user already saw it — reprinting it adds no value and creates a jarring experience, especially when it happens repeatedly in the same session.
Actual Behavior
The last assistant message is re-displayed every time the session re-initializes or context is compressed. In a long session this can happen multiple times, showing the same block of text over and over.
Environment
- Claude Code CLI (macOS)
- Opus 4.6 (1M context)
- Long-running sessions with multiple tool calls
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗