Vibeleaderboard
← All Intel
Intel / post

Claude Code idle compaction targets cache-expiry costs

Source
x.com
Date
SemiAnalysis@SemiAnalysis_

COOL & INSIGHTFUL: "Idle compaction" was added to Claude Code TUI in their most recent release (2.1.299). Each Claude Code session (with at least 200k+ context) will now automatically compact after being idle for ~54 minutes, in order to refresh the 1-hour TTL and prevent the user from incurring the cost of uncached input. This will save end users a lot of money! Although, with the way Anthropic investor day is going, maybe they should roll this change back? 🤔

Context

Claude Code, Anthropic's coding tool, now compacts long sessions on its own when they sit idle, timed to beat the expiry of cached input, according to a post from SemiAnalysis. The post says the feature, called idle , arrived in release 2.1.299 and applies to sessions with at least 200,000 tokens of . After about 54 minutes without activity, the compacts automatically to refresh what the post calls the 1-hour TTL, the time-to-live of the cache, so the user is not charged for uncached input when they come back.

The post gives the reason for the timing. Cached input stays valid for an hour, so a user who returns after a longer break would otherwise send the whole long conversation again as uncached input. Compacting at roughly 54 minutes acts while the cache is still live. The post does not explain the 200,000-token floor, though its effect is to confine the behavior to large sessions, where a cache miss means resending the most input.

This rests on one account, and only part of it. Only the opening SemiAnalysis post was collected before collection stopped, so any later posts in the thread were not read, and Anthropic's own release notes were not among the sources collected. The version number and both thresholds are therefore as SemiAnalysis reported them, and the 54-minute figure is given as approximate. The collected post does not describe what compaction keeps or drops from the conversation, or what the compaction step itself costs. Its claim that the change will save users a lot of money comes with no figure, and its aside that Anthropic might want to roll the change back, given how its investor day was going, reads as a joke about lost revenue rather than a reported plan.

Terms in this piece · Glossary
  • Terminal — A program that shows text and accepts typed text.
  • Compaction — Replacing older content in the model's context with a summary of it, usually keeping recent messages, so that a session can go on.
  • Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.
  • Session — One conversation or piece of work as a harness keeps it: a record of messages, tool calls and observations that can be saved and resumed.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Tools in this story
More from SemiAnalysis
Recommended reads