When you run background agents in Claude Code, a model call fires about every 30 seconds per agent, just to write a short status line in the agents panel. Here is how it works...
Every 30 seconds, Claude Code forks a request that includes the full transcript of that agent (everything the agent did so far, literally everything). The model returns 3 to 5 words, like "Reading runAgent.ts", and that is all you see in the panel.
The key thing to note is that the input is the whole transcript, so cost depends on transcript size and how often the cache is hit (assume a good 90% hit rate, still...). At Opus 5.5 list prices, one call on a 200k token transcript costs:
- about $0.04 on a cache hit.
- about $0.80 to $1.60 on a cache miss.
So, a busy agent making 120 calls an hour costs about $4.80 per hour at 200k tokens, even if every call hits the cache. Because it scales with transcript size, the longer your subagents work, the longer the transcript, and the more the cost.
You can also measure it by enabling OTel and comparing the cost of agent_summary against repl_main_thread.
If you are a heavy user of background agents or subagents, you might be shocked to see the tokens you are spending on this :)
Hope this helps.
@das_rdsm@raycast Checked the tinycast website yesterday and didn’t find any extensions section. Just checked again. Thanks for correcting me, will try it now