Who it is forA developer returning to a long Claude Code session after the cache has gone cold, who wants to know the cost before paying it.
The problemA cold resend silently rewrites the whole cached context, and the user has no price in front of them before the send.
The outcomeThe user sees an estimated rewrite price, resends only if they accept it, or clears the session and starts from a note.
What you need first
- Claude Code 2.1.287 or later
- A one-hour cache (included subscription usage defaults to one hour; API-key, usage-credit and cloud-provider sessions default to five minutes and need promptCacheTtl set to "1h")
- Claude Code left running during the break
Steps
- Install the plugin as described in the keepwarm use case, then restart Claude Code or run
/reload-plugins. - Run
/cache-taxto see the current cache estimate, warming window and this session's cold-write tally. - Keep the default with
/cache-tax guard refuse, or switch to/cache-tax guard warnto see the price and send without a drop. - When a cold send is dropped, read the estimated rewrite price, then send the message again to pay it, or run
/clearand start from a note.
Prompt for your agent
In the karanb192/cache-tax repo, with the cache-tax plugin installed, run /cache-tax in a resumed Claude Code session. Report the cache estimate and cold-write tally, and state whether the guard is set to warn or refuse. Verify that the guard mode matches the value you set with /cache-tax guard.
Caveat. The refusal figure is an upper bound and the README says these are API-equivalent costs, not extra subscription charges.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page