This is a good idea if it could manage it in an acceptable way.
For example, there might be something I intended to complete in one sitting, but took two sittings in the same day unexpectedly. Maybe it could just be a few cache delays per day or something, tagged in advance somehow.
I've directly inspected calls for pro/Max plans and as of today they have 1hr cache expiries. This has definitely degraded to 5 min in the past but that's the behavior today.
If you're paying API rates, you can choose 5m or 1hr yourself (and pay different rates).
Keeping a 1hr cache warm could still be useful, sure, but outside that, I don't see much use of this today.
This is just making it more expensive for everyone else, right?
How Claude handles its sessions is none of my business. I'm going to let them do the best they can to provide good service for everyone, and if they can't/won't, I'll switch to a provider that can.
Using these massive models is already pretty danged extravagant, I'm not going to demand to be at the front of the queue at all times, too.
Cached input tokens cost 10% of uncached. So if you’re model runs for 45 minutes, generates 300k output tokens and asks you a question, it costs 10x more if you wait 5.01 minutes to answer.
Sure, you may be willing to pay 10x more (or get 10x less for your subscription). But the time limit is arbitrary and has nothing to do with other peoples’ workloads. So I think your point is a non sequitur.
Interested in how the critics of approaches like this defend an agentic session (with Fable, for example) that stops and runs a multi-hour ML training session. It's a script, so the actual LLM convo goes stale, but then when the results get returned to the main thread you get an expensive cache hit without doing anything.
You would have avoided that cache hit if the LLM session was kept "alive" for those few hours. Why not automate the part where you keep the large main thread alive until you're ready to analyze the results?
I assumed (perhaps incorrectly, but it was a guess since I never dug into it) that less used "hot pockets" of previous inference gradually got more stale as time went on, and the conversation went elsewhere and didn't need those bits.
Hearing one byte refreshes the whole thing is huge! 5min is wayy too slow, because sometimes I want to spent more than 5 min looking at a diff before choosing where to go next.
Kind of outrageous, I hope this kind of feature gets built into claude code =D
Nice! Codex’s TTL on 5.6 is, I believe, 30 minutes, and when combined with how generous they are with resets of weekly limits and having completely gotten rid of 5hr limits, means Claude Code is just a total rip off right now. Not to mention their silent Fable nerfing and Chinese fearmongering.
If you're running the subscription, by default you are paying 2x for cache writes and you're getting an hour for expiry. So refreshing based on 5 min is wasteful. You need to detect whether you are in 5 min or 1 hour mode.
this is so cool. claude should actually opensource part of their harness so the community can improve it
context windows and sessions already get maxed out faster with fable and opus 5 and cost a ton. this should lead to significant savings. checking it out
*(and ingesting into mer personal ai builder /hamzaish. opensource)
22 comments
[ 5.2 ms ] story [ 19.3 ms ] threadFor example, there might be something I intended to complete in one sitting, but took two sittings in the same day unexpectedly. Maybe it could just be a few cache delays per day or something, tagged in advance somehow.
Was the ~22% claimed in the repo is measured against the 5m default, or with the 1h flag on?
If you're paying API rates, you can choose 5m or 1hr yourself (and pay different rates).
Keeping a 1hr cache warm could still be useful, sure, but outside that, I don't see much use of this today.
How Claude handles its sessions is none of my business. I'm going to let them do the best they can to provide good service for everyone, and if they can't/won't, I'll switch to a provider that can.
Using these massive models is already pretty danged extravagant, I'm not going to demand to be at the front of the queue at all times, too.
Cached input tokens cost 10% of uncached. So if you’re model runs for 45 minutes, generates 300k output tokens and asks you a question, it costs 10x more if you wait 5.01 minutes to answer.
Sure, you may be willing to pay 10x more (or get 10x less for your subscription). But the time limit is arbitrary and has nothing to do with other peoples’ workloads. So I think your point is a non sequitur.
You would have avoided that cache hit if the LLM session was kept "alive" for those few hours. Why not automate the part where you keep the large main thread alive until you're ready to analyze the results?
Hearing one byte refreshes the whole thing is huge! 5min is wayy too slow, because sometimes I want to spent more than 5 min looking at a diff before choosing where to go next.
Kind of outrageous, I hope this kind of feature gets built into claude code =D
https://code.claude.com/docs/en/prompt-caching#on-a-claude-s...
(Thank you to EliasWatson for giving me this link just a few days ago, as I was previously confused too.)
context windows and sessions already get maxed out faster with fable and opus 5 and cost a ton. this should lead to significant savings. checking it out
*(and ingesting into mer personal ai builder /hamzaish. opensource)