A long Claude Code conversation is cheap to continue while you keep working in it. The same conversation gets expensive after you leave it alone for more than an hour, and the first message after the break can use a large part of your 5-hour limit. The reason is the prompt cache, and Claude Code added a feature in October 2026 called idle compaction to reduce the damage. This post covers what the docs say, what it costs, and the habits I would change.
What happens when you come back to an old chat
Claude Code sends the whole conversation to the model with every message. That sounds wasteful, but most of it is read from a cache at a much lower rate. The costs page describes it like this:
"With prompt caching, Claude Code re-reads that history at the cached token rate, so a one-line question in a session that has been open all day still draws usage for the whole conversation."
The cache does not last forever. The prompt caching page says cached content expires after a period with no activity, and that each request that hits the cache resets the timer. On a Claude subscription, inside your plan's included usage, Claude Code asks for a one-hour cache lifetime. After the hour passes, the cheap copy is gone, and the costs page states what follows:
"Cache misses: your first message after a break longer than the cache lifetime misses the cache and reprocesses your full context."
So a lunch break, a meeting, or a session you reopen the next morning all end the same way. Your next message, even a short one, pays the full price for every token in the conversation.
What the gap looks like in dollars
Anthropic does not publish plan limits as token counts, so I cannot tell you the exact share of the 5-hour limit that one cache miss uses. API prices show the size of the gap, though. The Claude Code changelog for version 2.1.321 lists Claude Fable 5.2 at $8 per million input tokens and $0.20 per million tokens for cache reads. Input costs 40 times more than a cache read.
Take a conversation that has grown to 300,000 tokens. One more message with a warm cache reads those tokens for about $0.06. The same message after the cache expired sends them as new input, which is at least $2.40 before the model writes a word. The prompt caching page adds that the one-hour cache charges a higher rate for cache writes, so the real number is higher. On a subscription you pay in limit instead of dollars, but it is the same work on Anthropic's side.
What idle compaction does
Version 2.1.299, released on October 14, 2026, added a fix that runs while you are away:
"Added idle compaction in the terminal: a 200K+ token conversation left idle for about 54 minutes is compacted before its one-hour prompt cache expires, so your next message doesn't reprocess it all."
Compaction replaces the long history with a summary. Claude Code does it at about 54 minutes because the cache is still warm at that point, so the summary is made from cheap cached tokens. When you come back, your next message carries the short summary and not the full 200,000 tokens. Version 2.1.314 brought the same feature to VS Code and the Code tab in Claude Desktop.
Version 2.1.304 added a second guard for Pro and Max plans. When resuming an inactive conversation would use a noticeable share of your 5-hour limit, Claude Code now warns you and offers two choices: resume anyway, or start a new conversation and let Claude look up the old one when you refer to it.
The limits of the fix
Idle compaction helps, and it also has costs and gaps that are worth knowing before you rely on it.
- It only applies to conversations of 200,000 tokens or more. A 150,000-token conversation that sits for two hours still gets reprocessed in full on your next message.
- The compaction is a request too. The costs page says idle compaction "can use tokens while you're idle", so you spend some usage on a session you may never return to.
- A summary drops detail. If you were in the middle of a hard debugging session, the compacted version may not hold everything you built up.
- It depends on the one-hour cache. The docs say that once you go over your plan's limit and draw on usage credits, the main conversation drops to a five-minute cache.
You can turn it off with the Idle compaction row in /config, or with "idleCompaction": false in settings.json. The environment variable CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS changes the 200,000-token minimum.
What I would do to save usage
- Run
/clearwhen you switch to unrelated work. The costs page says it plainly: when you want a fresh start instead of continuity,/clearcosts nothing. Use/renamefirst so you can find the session again with/resume. - Before a break of more than an hour, decide if the session still has value. If the task is done, clear it. If it is not done and the conversation is large, leave idle compaction on and let it do the work.
- When Claude Code warns you about resuming an old conversation, take the new conversation in most cases. Claude can look up the old one, and you keep your limit for the next task.
- Open
/usageafter a long day. It shows what contributes to your limit usage, and large cache misses are on that list.
For a team, this is a habit problem more than a tooling problem. Ten engineers who each reopen yesterday's large session every morning pay for ten full reprocess requests before any work starts. A short rule in your team notes (clear between tasks, start new after a long break) removes most of that cost.
How to see it on your own account
- Work in one session until
/contextshows a large conversation. - Run
/usageand note the 5-hour limit percentage. - Leave the session idle for more than an hour, then send one short message.
- Run
/usageagain and compare. Then repeat on another day with idle compaction turned off in/config.
The difference between the two runs is what the one-hour cache is worth to you.
Work with me
I help people and teams see where their AI and cloud spend goes, then cut the parts that do not pay for themselves. I spent 6 years at Amazon before going independent. If your team uses Claude Code or Codex and the limits or the bill are a problem, book a call at cloudyeti.io/meet.
Book a call