
Context Compaction: Run Claude Agents Past 200K Tokens
Summary
Use Anthropic's compact-2026-01-12 beta so long agentic loops survive past the 200K context window.
When Anthropic corrected its Claude Sonnet 5 launch numbers on July 1, 2026, the interesting detail was not the higher BrowseComp score. It was how they got it: a 10-million-token run with context compaction and programmatic tool calling. A single agent chewed through 50x the model's context window and still finished the task. That one line sent a lot of developers looking for the same trick, because most long agent loops die well before they get interesting.
The failure mode is boring and universal. Every turn of an agent resends the whole transcript. Tool results pile up, input tokens climb linearly, cost climbs with them, and somewhere around 200K tokens the request stops fitting. Anthropic calls the quality side of this context rot: even when it fits, a bloated transcript makes the model slower and less accurate. Compaction is the fix, and as of the compact-2026-01-12 beta it runs server-side in a couple of lines.
Keep reading — it's free
Enter your email to keep reading — plus the best of AI & tech, daily. Free, forever.
Already a member? Sign in
Comments
Be the first to comment