← sources

Keep Claude Code’s 1-hour cache warm during breaks. On Fable 5.1, rewriting it costs 80x a cache read.

source: reddit (reddit:ClaudeCode)published 2026-09-17 17:48ingested 2026-09-18 02:41

retained text

You come back to a long session and ask for a recap. The expensive part can be rewriting the old context before Claude answers.

I built **cache-tax** to handle both sides:

* **Set it before you step away.** `/keepwarm` arms six hours. After 50 idle minutes, it sends a request over your session without adding heartbeat messages to the conversation. The timer runs inside Claude Code.
* **See the estimate if you return cold.** For a 50k+ context idle over an hour, it stops your next ordinary message once with the price. Resend to continue, or `/clear` and start from a note.

The GIF is my real test. A two-line recap on a 330k-token session triggered a **$6.61 estimate**. I sent it again; the reported cache write was **$6.28**.

Every ping checks its usage. It stops if it reads nothing or writes at least 10% of what it reads. After a paid cold write, it automatically arms three hours. `/keepwarm off` stops it.

Pings cost tokens too. The [rates](https://platform.claude.com/docs/en/about-claude/pricing) are $20 per million tokens for a 1-hour write and $0.25 for a read on Fable 5.1. These are API prices, not extra subscription charges. I haven’t measured quota savings, and changed prompts or tools can still break the cache.

[Free and open source](https://github.com/karanb192/claude-code-mods/tree/main/plugins/cache-tax). The Mod needs `CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1`. A regular hook version provides price warnings without that flag.

[https://claude-code-mods.karanbansal.in](https://claude-code-mods.karanbansal.in)

New to prompt caching? [Anthropic explains how Claude Code uses it here](https://code.claude.com/docs/en/prompt-caching).

document fetched 2026-09-18 00:41 · canonical https://reddit.com/r/ClaudeCode/comments/1wj108u/keep_claude_codes_1hour_cache_warm_during_breaks