Understanding Claude Code context window compaction
Claude Code silently compresses your conversation when context fills. claude-devtools shows the boundary, the token delta, and what was discarded — so you can see exactly what Claude no longer remembers.
When Claude Code hits its context limit, it silently compresses your conversation and continues. Most tools don't even show that this happened.
claude-devtools detects compaction boundaries, measures the token delta before and after, and visualizes how your context fills, compresses, and refills over the course of a session. You can see exactly what was in the window at any point, and how the composition shifted after each compaction event.
This is critical for debugging sessions where Claude "forgot" something — you can see precisely when and what was compressed away.
A typical compaction debugging flow:
- Open the session in claude-devtools
- Look at the Session Context Panel for compaction markers
- Hover the boundary to see the token count delta (often 80–95% of the window discarded)
- Scroll to the messages immediately after the boundary — that's where Claude's "memory" begins after the cut
- If the lost content matters, you usually need to re-prime the new context with the relevant files via
@-mention
For a worked example of this flow, see why did Claude forget?.
Related
How to view Claude Code token usage
Per-turn token attribution across 7 categories — CLAUDE.md, skills, @-mentions, tool I/O, thinking, team overhead, and user text. Actual numbers, not the opaque progress bar.
Debugging Claude Code subagents and teams
Each subagent renders as its own execution tree with tool traces, tokens, duration, and cost. Nested agents render recursively. Teammate messages are color-coded by sender.