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.324,
ImprovementsSection of the release
Unclear It is not clear whether anything sets the token budget yet, so the extra kept messages may not happen in practice.
What
Compaction means Claude Code summarizes older parts of a conversation so it fits in the model's limit. When a request fails because the prompt is too long, Claude Code compacts on the spot.
That step can now be given a token budget for recent messages. Tokens are the small chunks of text the model counts. Claude Code counts how many of the most recent message groups fit in that budget and keeps whichever is larger: that count or the number it already kept.
There is also a new way of handling the case where Claude Code cannot work out from the error how far over the limit the prompt is.
Why
After a prompt-too-long error, compaction can hold on to more of the latest conversation, so Claude loses less recent context.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear whether anything sets the token budget yet, so the extra kept messages may not happen in practice.