Claude Code token usage: one in five requests is an agent status
Claude Code token usage grows because of hidden agent summaries: users measure them at 16–22% of session cost. Let's see where they come from.
This article in other languages:العربيةDeutschEspañolFrançaisItaliano日本語Polski简体中文
In this article
Flamerix AI published a gist with measurements showing that Claude Code spends 16.4% of session cost on a short, 3–5-word status line in the agents panel. On October 29 the post reached the Hacker News front page and collected more than 130 points within an hour. It matters to anyone worried about Claude Code token usage, especially people who run many background agents.
What drives Claude Code token usage?
The culprit is a mechanism called agent_summary. According to the gist’s author, it works like this:
- Every 30 seconds or so, separately for each background agent, Claude Code sends that agent’s entire transcript to the model.
- It asks the model to describe the latest action “in 3–5 words” (quoting: “describe your most recent action in 3-5 words”).
- The result goes only to the agents panel, as a short status line.
The mechanism has been on by default since version 2.1.232 (August 2026), and there is no official setting to turn it off.
How much does it cost?
The gist’s numbers come from an OpenTelemetry export covering the week before the summaries were disabled:
- 16.4% of estimated cost went to
agent_summary, more than to the main conversation (15.7%), - 19.7% of all API requests, roughly one in five,
- 96% of that cost was on Opus,
- the ratio of input to output tokens was about 9,000 to 1.
Interestingly, around 98% of these calls hit the prompt cache, so they are cheap. The trouble is the remaining ~2%: without the cache, they account for more than a third of the summaries’ cost.
The costs are Claude Code’s own estimates (the cost_usd field), not an invoice, so let’s take them with a grain of salt.
Is this new?
The problem has been known since August. On August 15 user @rflcrz opened issue #86879 in the Claude Code repository. In a 4-hour session with 27 subagents (1,496 requests), agent_summary calls made up 22.7% of requests and 18% of weighted tokens, each returning about 65 output tokens on average.
In the comments, other users report similar results: 15–22% in sessions with more than 20 subagents, and 26% of cache-read tokens in version 2.1.276. One of them noticed that the CLAUDE_CODE_ENABLE_NARRATION=0 variable disabled the summaries in version 2.1.241, but no longer worked in 2.1.245.
The issue carries the area:cost label and is still open. As of October 29, nobody from Anthropic has replied to it.
How can we check this on our own setup?
Claude Code has built-in telemetry export via OpenTelemetry. We turn it on with CLAUDE_CODE_ENABLE_TELEMETRY=1 and configure a logs exporter. Every API request then shows up as a claude_code.api_request event with a query_source attribute that says which subsystem sent it. All it takes is grouping the events by query_source and summing cost_usd, which is exactly how the gist’s author found the problem.
Can we turn it off?
Not officially. The gist’s author shared a workaround: a no-agent-summary.js script preloaded through Bun (BUN_OPTIONS="--preload …") that swaps the summary timer for an inactive one, without modifying the binary. For him, agent_summary’s share of cost dropped from 16.4% to zero.
Before we use it, it’s worth knowing the limitations:
- The script was tested on Linux only, not on macOS or Windows.
- It works by matching the source code, so any Claude Code update can silently break it (check that it still works after every update).
- The agents panel stops showing a status.
- It’s a community project under the MIT license, unaffiliated with Anthropic.
If we don’t want to inject anything into Claude Code, the simpler option is just to run fewer background agents at once, since the cost of summaries grows with their number. I write more about working with Claude Code in my Claude Code tutorial, and about how fast you can burn through a budget on Opus in the post on fast mode.
FAQ
Why does Claude Code use so many tokens?
Mainly because every request sends the conversation context to the model. User measurements show that with many background agents, a sizable share (16–22% of cost) also goes to hidden agent_summary calls, which send the agent’s entire transcript about every 30 seconds.
Can I turn off agent_summary in the settings?
As of October 29, there is no official switch. Issue #86879 asks for a dedicated flag, for the summaries to be covered by the CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC variable, or for a configurable interval.
Does this affect me if I don’t use background agents?
Summaries are generated for background agents, so the problem grows with their number. The easiest way to check is in telemetry, by grouping requests by query_source.