logoalt Hacker News

Claude's 5-minute timer is 23% of your coding bill

79 points • by danvdb • today at 4:27 PM • 29 comments • view on HN

Comments

8cvor6j844qw_d6 • today at 6:15 PM

If I'm not mistaken, on subscription plans your main agent defaults to 1 hour cache with subagents spawned by the main session on 5 minute cache timer.

Best ensure your subagents avoid getting blocked if there's any wait or command that takes more than 5 minute.

➕ show 1 reply
rishabhaiover • today at 6:11 PM

This is a big contributor to long-running sessions. I built a small CLI that opens in a tmux popup and shows what my Cursor agents cost: https://github.com/rishabhBudhouliya/tend.

It uses a ridgeline chart to show how big each chat's context has grown and what it's spending.

extr • today at 5:55 PM

This is obvious if you just put cache timeout in your statusline. If the nature of your work is such that every time you return to the window the 5m cache is expired, bump it up.

bensyverson • today at 5:46 PM

Isn't Claude Code on a 1hr cache?

➕ show 1 reply
theanonymousone • today at 5:49 PM

Where can I find cache "duration" of different providers? I have never seen such information, despite it being a very big deal in cost estimation. Or maybe it's dynamic?

➕ show 2 replies
julianlam • today at 5:46 PM

Requisite smarmy comment about how this is not an issue with local models.

There's even the ability to persist your kv cache to disk, so future session resumptions load back into context instantly without needing to do a full prefill ingestion by the LLM. (CachyLLaMA, iirc, not sure where the project is now)

➕ show 1 reply
superjan • today at 5:54 PM

What helps: run agents in a VM so they can have full control and don’t need to wait for your approval. Firewall it from your local network.

And start a new blank session with its own branch (and have the agent update the project readme) so you can restart without context.

➕ show 1 reply
refulgentis • today at 5:47 PM

These AI written articles are exhaustingly long, and the #s included make it feel very scientific but are one offs for one person.

It's self-labelled as a 15m read and a human in the loop should recognize it's about 3m, tops. Here:

LLM API context caches, by default, only last for 5 minutes on Anthropic and 30m on OpenAI.

If you use Claude, there's an hour cache for 2x the cost of the 5 minute one.

If you use OpenAI, there's a 12 hour cache for 2.5x the cost of the 30m one.

FWIW, it's very Chicken Little / "the sky is falling!!111!": the idea is if you walked away for > 5m between every Claude request, re-caching would be 23% of your bill.

➕ show 3 replies
vikramkr • today at 5:48 PM

Neon really cooked with tamping down on the inane incomprehensible Claude slop huh? It's so damn annoying when they spew this poetic babbling gibberish.

TDLR prompts are cached. Prompt cache hit == $. Cache miss == $$$$$$$. Claude ttl is 5 min. Codex ttl is 30 min. If u take longer than 5 min between turns then $$$$

NooneAtAll5 • today at 5:50 PM

just use deepseek

10-100x cheaper is not something to sneeze at

➕ show 3 replies
k_ivanow • today at 5:31 PM

[dead]