[BUG] Response swallowed at context compression boundary — summary says "answer already given" but client never rendered it
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [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?
When context compression fires at the same turn boundary as an assistant response, the response is captured in the compaction summary but never rendered in the client UI. The user sees no reply and must re-ask the question.
Evidence: The next session's compaction summary contained the text "The answer (already given inline)" describing a response to a specific question — confirming the response was in the transcript — but the client chat window showed no message after the question.
Steps to Reproduce
- Work in a long session until the context window is near the compression threshold.
- Ask a question that triggers a moderately sized response.
- If compression fires during or immediately after that turn, the response appears in the compaction summary but is absent from the rendered conversation.
- The user sees the question with no reply below it.
Expected Behavior
The response is rendered in the UI regardless of whether compression fires on the same turn.
Actual Behavior
The response is absent from the UI. The following session's compaction summary references the response as previously delivered, creating a divergence between the transcript and what the user saw.
Claude Model
Sonnet
Claude Code Version
2.1.121 (Claude Code)
Platform
Anthropic API
Operating System
Windows 11 Enterprise
Related Issues
#29890, #40319 (different root cause but same compaction area)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗