Claude Code raises the automatic compaction threshold for long sessions
Claude Code 2.1.334 now starts automatic compaction at around 400,000 tokens for many models with a one-million-token context window. On Amazon Bedrock, the fixed part of the system prompt can be cached separately.
Who is affected and how
- DevOps, security
- Separate the fixed part of the prompt on Bedrock, then measure token usage during long runs.
Sources
- Key Updates in Claude Code v2.1.334 - Auto-compact Raised to Around 400K and System Prompt Caching for Bedrock | DevelopersIOdev.classmethod.jp · Dec 2, 2026
- Claude Prompt Caching Explained: Prices, the 5-Minute Timer and Claude Codefello ai · Dec 2, 2026
- Claude Code v2.1.334: 283 Changes & 400K Auto-Compactionpaidfreedroid · Dec 2, 2026
Machine-generated summary based on the titles and excerpts of the source articles. The facts come from the linked article.
What do you make of this piece?
The split shows after 20 votes.
Why? Your answer is not shown publicly; it helps the editors.