upvote
On the subscription plan it is 1h for the main agent, its subagents get 5m with some exceptions that also get 1h.

API is all 5m but apparently keeping it warm every 4.5 mins on API is fine.

This is what i heard.

reply
It's not Claude Code so much as provider. If you're on a subscription plan this article doesn't apply to you. If you're using Vertex API or similar it defaults to 5m.
reply
It applies on a subscription too. Not using the cache burns your usage faster.
reply
Yes but the cache on subscription plans is 1hr
reply
Not for subagents it isnt, 5 minutes for them
reply
Okay and? The article is not about subagents, and subagents are a natural fit for the shorter cache window.
reply
For some context, on Codex subscriptions, the cache is forever
reply
I guess that refers to cache pricing? (Surely after some time the tokens are no longer cached, but you mean they still charge you as though they were?) Either way, that's surprising.
reply
I also make it compact at 200K tokens and not 1M. Has anyone seen a benefit to using 1M context wth Fable?
reply
Several studies have found that performance degrades sharply after 100k tokens or so, even in models with much larger contexts. (The further out you get the lossier the attention gets from what I understood.)

(Which is funny, because you pay a premium on many providers for the worse attention!)

The last study I found was from a little while ago though, and there's been a lot of development in attention mechanisms since then. So it might be less bad now.

reply