When a Claude Code session sits idle past its prompt-cache lifetime (1 hour on a subscription, 5 minutes on an API key), the next message reloads the whole conversation at 12× to 80× the cost of a warm turn. These five tools stop that from happening by accident.
They use three tactics, alone or together: guard (stop or question the first message into a cold cache), keep warm (ping the cache before it expires) and hand off (start a fresh, small session carrying a summary of the old one). We make L2Cache; the other four are free, MIT-licensed Claude Code plugins and worth knowing about.
| Guard | Keep warm | Hand off | Agents | Price | |
|---|---|---|---|---|---|
| L2Cache | Warns on resume; stops the first message once | Heartbeat line you paste yourself; never sends requests | Yes: /clear starts fresh with the handoff loaded | Claude Code, Codex | Free download; Pro $9.99 once |
| Cold Cache Guard | Holds the first prompt once | No | No (suggests /compact) | Claude Code | Free, MIT |
| cache-keeper | Asks: send, compact first, or cancel | Automatic pings, 4 h default | Yes: /handoff | Claude Code | Free, MIT |
| cache-tax | Stops the first message once, or warns | Automatic pings, 6 h default | No (suggests /clear) | Claude Code | Free, MIT |
| Cache Keep-Warm | No; countdown only | Automatic pings, off by default | No | Claude Code | Free, MIT |
Keep-warm pings are real model requests on your own account or plan. Each one reads the cached context, which costs far less than rewriting it, but not nothing.
L2Cache is a Mac app that reads your Claude Code and Codex session files locally, so it knows each session's size, cache lifetime and last request. When you resume a session whose cache has expired, its hook prints the cost in the terminal before you type ("your next message reloads 241k tokens, ≈ 40× a warm turn"). If you send anyway, it stops that one message once; press ↑ and Return to send it as is. Type /clear instead and the new session starts with a handoff of the old one already loaded.
Before expiry, a menu-bar badge flags very heavy sessions (over 400k tokens) so you can compact while it is cheap. For heavy sessions on a 1-hour cache it offers a one-line heartbeat you paste yourself, at most twice per break; L2Cache never types into your terminal or sends requests on your behalf. The hooks run even when the app is closed, and the same check covers Codex, where /new starts the fresh session. Scripts such as claude -p are never blocked, only warned.
It also keeps searchable history of your agent sessions, terminal, git and clipboard, which the plugins below don't try to do.
Trade-offs: Mac only; no automatic keep-warm. Price: free download, 15-day Pro trial, Pro $9.99 one-time (Black Friday price, regular $19.99).
Two hooks and a bash script. It estimates idle time from the last response and reads context size and cache lifetime from the transcript, then holds the first prompt once when the cache is likely cold (after 55 minutes on a 1-hour cache, 4 on a 5-minute one) and the session is over 100k tokens. A held prompt is never sent or billed; pressing Enter again within two minutes sends it. /compact and /clear always go through, and a stats command counts the reloads you avoided.
Trade-offs: no keep-warm or handoff; needs jq; checks only the main conversation. Price: free, MIT licence.
A status line shows cache state, minutes left, context size and what a rewrite would cost, turning yellow five minutes before expiry. Sending into an expired chat over 150k tokens names the price and asks you to send anyway, compact first or cancel. /keepwarm pings shortly before expiry for four hours by default (up to 24), and /handoff writes a handoff file and offers to start a fresh chat with it. From Nate Herk's claude-code-mods collection.
Trade-offs: needs Claude Code 2.1.287 or later; the full status line is terminal-only; pings cost a little each. Price: free, MIT licence.
By default it drops the first message into a cold cache once and shows what resending would cost; a warn-only mode is available. /keepwarm sends a one-word ping after 50 idle minutes inside the window you choose (six hours by default) and stops if the cache is already gone. It treats "cold" as 60 minutes since the last request and steps in only above 50k tokens. By Karan Bansal.
Trade-offs: needs a 1-hour cache and Claude Code left running during the break; no handoff. Price: free, MIT licence.
A line above the prompt counts down to expiry with the cached size and next ping time. Keep-warm is off until you turn it on per session (/keepwarm on, 3h, until 18:00); it re-sends the last request with a one-line "reply ok" about eight minutes before expiry, never wakes a cache that is already cold, and stops after 20 pings because one rewrite is then cheaper.
Trade-offs: no guard or handoff; only pings caches of 30 minutes or more. Price: free, MIT licence.
Without any tool: run /compact while the cache is still warm, or /clear and paste a short summary instead of resuming a big cold session.
Check your own number: the free Claude Code cache-tax tool reads your ~/.claude/projects folder in your browser and shows how much of your spend went to cold resumes, as a card you can share.
Claude Code caches the conversation so each turn re-reads it cheaply. After the cache lifetime (1 hour on a subscription, 5 minutes on an API key) the next message has to write the whole context into the cache again, which costs 12× to 80× a warm turn depending on the model and cache lifetime.
For big sessions over short breaks, usually: a ping reads the cache at a fraction of the cost of rewriting it. Over long breaks the pings add up, which is why these plugins cap the window, and on a 5-minute cache pings soon cost more than one rewrite.
L2Cache runs the same cold-session check in Codex, where /new starts the fresh session. The four plugins are Claude Code only.
L2Cache and Cold Cache Guard read local files and send nothing. The keep-warm plugins send pings to Anthropic through Claude Code itself, as part of your existing session.
Free download with unlimited clipboard history. Pro is a one-time $9.99 Black Friday price (regular $19.99), with no subscription.
Download L2Cache for Mac