A curated awesome-list of tools, papers, benchmarks and vendor pages on what AI tokens cost, where they get wasted, and how to cut spend.
karanb192/cache-tax
A Claude Code mod that keeps the prompt cache warm during breaks and estimates the rewrite cost before a cold send.
- Stars
- 357
- Forks
- 54
- Open issues
- 20
- Last commit
- yesterday
What is it?
Cache Tax is a mod for Claude Code that addresses the cost of resuming a long session after the prompt cache has expired. Before a break, the /keepwarm command arms a bounded window; during it, a fork of the session sends a small ping at intervals so the cached context stays alive. The ping is sent only while the window is active and stops if the cache readback shows it is no longer warm.
When you return to a cold session with a large context, the mod holds back your first ordinary message once and shows the estimated cost of rewriting the cache. Resending the message proceeds as normal, and /clear lets you start over from a note. A status row above the prompt shows the warming state, next ping and the last readback. Pricing estimates use list prices per model, and the mod notes that subscription plans do not bill these as extra charges.
Key features
- 01Keeps the prompt cache warm with periodic pings during a set window
- 02Shows the estimated rewrite cost before a cold send and can hold the message once
- 03Stops warming automatically when the cache readback shows it has gone cold
- 04Provides /cache-tax status and a status row above the prompt
- 05Installs as a Claude Code plugin from a marketplace
Use cases
- Pausing a long coding session for lunch or a meeting without paying for a full context rewrite
- Deciding whether to resume a stale session or start fresh from a summary note
- Monitoring cache state and cost during long Claude Code sessions on API-key billing
Quick start
- 1
Add the marketplace
claude plugin marketplace add karanb192/claude-code-mods - 2
Install the cache-tax plugin
claude plugin install cache-tax@claude-code-mods - 3
Restart Claude Code or reload plugins in an open session
/reload-plugins - 4
In a warm session, arm keepwarm for six hours
/keepwarm
Things to know
- Requires Claude Code 2.1.287 or later, and Claude Code must stay running for pings to happen.
- Each keepwarm ping costs tokens, so it is not free.
- API-key and cloud-provider sessions default to a five-minute cache and need promptCacheTtl set to "1h".
In collections
Topics
FAQ
- What is cache-tax?
- A Claude Code mod that keeps the prompt cache warm during breaks and estimates the rewrite cost before a cold send. Cache Tax is a mod for Claude Code that addresses the cost of resuming a long session after the prompt cache has expired. Before a break, the /keepwarm command arms a bounded window; during it, a fork of the session sends a small ping at intervals so the cached context stays alive. The ping is sent only while the window is active and stops if the cache readback shows it is no longer warm.
- Is cache-tax free to use? What license does it have?
- cache-tax is open source under the MIT license. Check the license terms before using it in commercial products.
- Is cache-tax still maintained?
- Actively maintained. The last commit to cache-tax was on Nov 5, 2026.
- What can I use cache-tax for?
- Pausing a long coding session for lunch or a meeting without paying for a full context rewrite Deciding whether to resume a stale session or start fresh from a summary note Monitoring cache state and cost during long Claude Code sessions on API-key billing
- How do I install cache-tax?
- Add the marketplace: claude plugin marketplace add karanb192/claude-code-mods Install the cache-tax plugin: claude plugin install cache-tax@claude-code-mods Restart Claude Code or reload plugins in an open session: /reload-plugins In a warm session, arm keepwarm for six hours: /keepwarm
- Where can I get cache-tax?
- The source code and installation instructions are on GitHub: https://github.com/karanb192/cache-tax
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Local proxy that captures the raw API traffic of Claude Code and Codex and attributes token cost to each source in the request.
A plugin for Claude Code, Codex, Copilot CLI and Pi that learns from past sessions in a repository to cut coding-agent token costs.
A self-hosted LLM gateway for AI coding tools like Claude Code and Cursor that routes requests across providers and compresses tool output to cut token usage.
A Claude Code mod that holds subagent fan-out, heavy-context prompts and retry loops before they consume your plan's usage window.
Terminal arcade games (snake, Tetris, Doom-style shooter, 2048 and more) that run above the Claude Code prompt while Claude works.