You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
CompactionArea: what it touches
ImprovementsKind: in v2.1.310,
ImprovementsSection of the release
What
When the model rejects a request because the prompt is too long, Claude Code compacts the conversation (summarizes and shortens it) and tries again. That error reports how far over the limit the prompt was and its actual size.
Claude Code now uses those two numbers to estimate how its own count of tokens (the units the model measures text in) compares with the server's count, and sizes its first trim from that. Before, it started from a fixed gap. The estimate is also recorded in the usage data for each compaction attempt.
Why
A first trim that matches the server's own count should mean fewer rounds of trimming and retrying before the conversation fits.