← Back to context

Comment by bcherny

19 hours ago

> 1hr -> 5min on March 6th

This is not accurate. The main agent typically uses a 1h cache (except for API customers, which can enable 1h but it is not on by default because it costs more). Sub-agents typically use a 5m cache.

Then my original question stands: why did this become an issue seemingly overnight if nothing changed?

So if I run a test suite or compile my rust program in a sub agent I’m going to get cache misses? Boo.

  • Sub agents don't have much context and don't stay around for long, so misses in that case are trivial.

    • As of yesterday subagents were often getting the entire session copied to them. Happened to me when 2 turns with Claude spawned a subagent, caused 2 compactions, and burned 15% of my 5-hour limit (Max 5x).

    • how long they stay around after the cache miss is irrelevant if I am burning all the prior tokens again. also, how much context they have depends entirely on the task and your workflow. I you have a subagent implement a feature and use the compile + test loop to ensure it is implemented correctly before a supervisor agent reviews what was implemented vs asked then yes, subagents do have a lot of context.

... so how do API users enable 1hr caching? I haven't found a setting anywhere.