Follow Discord
Sweep 23 Oct 2026 · 21:48Z Build v2.1.310 529 read Stable v2.1.308 Latest v2.1.309 Next v2.1.310 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.310 ·

Compaction after a "prompt too long" error now sizes its first trim from the server's numbers

After a "prompt too long" error, Claude Code now uses the server's reported sizes to judge how much to trim first, instead of a fixed starting amount

You'll notice Improvements
JSON All of v2.1.310
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.

See this entry in the whole of v2.1.310 →

Feedback