ClaudeHack
0.000

Don't let a long session idle past the one-hour cache lifetime

Usage & Limits·14 hours ago·verified 14 hours ago·easy·~2 min setup·verified

Claude Code re-reads your whole conversation at the cached rate. Come back after a long lunch and the first message reprocesses all of it at full price.

The problem

A session left open all day feels free until you send a one-line question and it draws usage for the entire conversation, because the break was long enough to lose the cache.

The hack

Treat the cache lifetime as a real deadline. On a subscription it is an hour of inactivity; if you are going to be away longer, close the session out deliberately rather than leaving a huge context to go cold.

Why it works

Claude Code sends your full conversation with every request and reads that history at the cached token rate. The first message after a break longer than the cache lifetime misses the cache and reprocesses everything at the uncached rate.

Setup

1. Run `/usage` and check the behavior flags — cache misses and long context are flagged when either accounts for 10% or more of recent usage. 2. Before stepping away from a large session, finish the thread: commit, and write anything worth keeping to a file. 3. Coming back to a big session, prefer `/clear` and let Claude re-read the repo over paying to reprocess the whole history. 4. On Pro and Max, accept the offer to resume from a summary when it appears. 5. Watch out for scheduled tasks on an idle session — they fire on their interval and send your full context each time.

Additional details

The lifetime is not the same everywhere, which is the part that catches people out: - One hour on a subscription plan. - Five minutes once you are drawing on extra usage credits. - Five minutes by default on an API key or a cloud provider. So the habit that is safe on a Max plan becomes expensive the moment you tip into credits. Two related notes. Adding "be brief" to `CLAUDE.md` does almost nothing for this, because the cost is dominated by re-reading history rather than by output length. And `/compact` is not a free escape hatch either — it reads the conversation it summarizes, so compacting a very large context is itself a large request. `/clear` costs nothing.

Source

youtube·View original →·by Chase AI

Does this still work?

0 said it works · 0 said it's broken

Related

Discussion

No comments yet. Be the first to say whether this worked for you.