cache-tax

Reviewed at commit c4f8cf2 New version, not yet reviewed

A Claude Code mod that keeps the one-hour prompt cache warm during breaks and stops a cold send once with its estimated rewrite cost. Warming uses model…

Made by
Karan Bansal
What we checked

Keeps the one-hour prompt cache warm during breaks with a short ping on your own Claude account every 50 minutes (uses tokens): for a window you set with /keepwarm, and by default for three hours after you pay a cold rewrite. When a large conversation has gone cold, it asks before sending your message and shows the cost. No other network calls or files; it stores only its settings.

Review details

Static review of the source at the pinned commit; not run. Full review of version 2.4.1 (the diff since e4940af was too large for a delta). Registers engine.create (adds a read-only $.cacheTax.status() for other mods), config.set for theme (passes the result through, only notes light or dark), ui.render AbovePrompt (a status band with embedded SVG/PNG icons), session.start, session.end, classic.SessionStart (uses the resume fields to estimate cold state), command.run for /keepwarm and /cache-tax, prompt.submit, turn.step, turn.complete and session.compact. Runtime calls: $.model.fork with the fixed prompt 'Reply with the single word: warm' (one fork at a time, stops when a ping reads nothing or writes 10% or more of what it reads, retries 429/5xx up to three times), $.clock.after/every/now, $.session.id/model/usage, $.store.get/set/delete (per-session deadline, ping period and refusal time; global always switch and guard mode), $.ui.ask (Send anyway / Don't send), $.ui.log, $.ui.status, $.ui.invalidate, $.ui.resolve, $.config.list (theme), $.env.get('NO_COLOR'), $.command.register and $.command.list (detects the separate hook version to warn about double guards). prompt.submit skips plugin-origin and slash prompts and only acts when the one-hour estimate says cold and the context is at least 50,000 tokens: it asks, or drops the message once when nobody can answer, and lets unattended origins (task notifications, scheduled triggers, peers) through with the price logged; the prompt text is never changed or stored. New in this range: the Auto keepwarm option (on by default, disclosed in plugin.json and README) that arms three hours of pings after a detected paid cold write, a dollar floor for the guard, /keepwarm always with a custom window up to 168h (stored globally, applies to every session), the ask dialog instead of a plain refusal, and the $.cacheTax status API. hooks/status-icons.ts is generated base64 PNG and plain SVG (no scripts or external references). tools/generate-status-icons.py (runs rsvg-convert) is a maintainer script the mod never loads. The ../types import is type-only and resolves to types/index.d.ts. No files, processes or network calls other than the model forks; no npm dependencies.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: no
  • Blocks or changes tool calls: no
  • Reads or writes files: no
  • Runs programs on your machine: no
  • Calls the model (uses tokens): yes
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Screenshot of cache-tax

A Claude Code mod that keeps the one-hour prompt cache warm during breaks and stops a cold send once with its estimated rewrite cost. Warming uses model requests and costs tokens. Requires Claude Code 2.1.287+.

Made this mod? Add a badge to your README

modsforClaude badge for cache-tax

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/cache-tax.svg)](https://modsforclaude.com/mods/cache-tax/)

← All mods