Independent AI intelligence Two editions daily · ET
Fervor AI

Analysis · October 29, 2026 · concept

Claude CodeOpenTelemetryclaude-codeagent-harnessagent-infrastructure

Claude Code's Biggest Hidden Cost Might Be a Three-Word Status Line

One developer's telemetry says background agents resend their whole transcript to Opus on a timer just to write "Reading test files." Here's how to check what your own agents spend while you're not looking.

Most people judge an AI coding agent by what it shows them. The answer in the chat, the diff, the little spinner that says what a background agent is doing right now.

That spinner is the interesting part. It looks free. It is three or four words. And according to a measurement that hit Hacker News this week, in one developer's telemetry it took 16.4% of estimated spend, more than the main conversation did.

The result is an uncomfortable idea for anyone running agents at scale: the most expensive work an agent does may be work you never asked for and never see. If you only read the transcript, you are reading the part of the bill that's easiest to find.

This piece walks through what was found, why a status line can cost that much, and the ten-minute check that tells you whether it's happening in your setup.

What the gist found

In a GitHub Gist that reached Hacker News this week, a developer publishing as Flamerix AI used a blunt title: "Claude Code burns ~15–20% of your tokens on a 3-word status line." Claude Code is Anthropic's command-line coding agent, and "background agents" are the helper agents it runs alongside your main session while you keep working.

Here's the mechanism the author describes. Every background agent shows a short status line in Claude Code's agent panel, something like "Reading test files." To write that line, Claude Code takes the agent's entire transcript (every message, file read and tool result so far) and sends it to the agent's model, which is usually Opus. It does this on a timer, about every 30 seconds per agent, while the agent is working.

The author found this by turning on Claude Code's OpenTelemetry export (OpenTelemetry is an open standard for shipping logs and metrics from a program to a dashboard) and sorting every API call by which part of Claude Code made it. One bucket, agent_summary, came out at 16.4% of estimated spend and 19.7% of API requests. The main conversation was 15.7%. About 96% of the summary spend went to Opus, and the ratio of input to output was near 9,000 to 1: a mountain of transcript in, three words out.

Two more details make it worse. The gist says the weekly share sat between 3.5 and 7% in the author's July telemetry before climbing to that level, and that these requests are not written to the session logs on disk. You only see them if you export telemetry.

It isn't one person's anomaly either. A community feature request on the Claude Code repo reports similar numbers from other users: 22.7% of requests in one four-hour session with 27 subagents, and 15 to 22% of weighted tokens in sessions with 20 or more subagents. As of this writing, that thread shows no reply from Anthropic staff.

Why a status line can cost this much

Picture asking a colleague for a one-line update on a project. Now picture doing it by handing them the entire case file, every 30 seconds, and waiting while they skim it so they can say "still reviewing contracts."

That's the shape of the problem. The output is tiny. The input is the whole history, and the history grows the longer the agent works. A background agent that has read twenty files carries all twenty in its transcript, so each status check gets more expensive than the last.

Multiply by agents. Run five background agents for an hour and you have roughly 600 summary calls, each one resending a growing transcript.

One thing softens this, and it matters for an honest reading. Most of that resent transcript is identical from call to call, so much of it can hit the prompt cache (a discount for re-sending text the model saw recently). One commenter on the GitHub issue found the summary calls in a session ate 26% of the cache reads but produced only about 20 output tokens each. Cache reads typically bill at a steep discount to fresh input. So "16% of spend" and "16% of tokens" are different numbers, and the gist is careful to report the first, using Claude Code's own cost estimate.

The switch that only turns it on

The obvious question is how to turn it off. The gist's answer, from reading Claude Code's bundled code, is that you mostly can't.

The SDK option agentProgressSummaries defaults to false, but the author says the documented switch "only turns it on." According to the gist, the feature has been on by default since version 2.1.232 in August 2026, and since 2.1.300 the interval comes from a server setting clamped between 30 and 240 seconds. A cheaper "short" mode that sends about 2,000 tokens of notes instead of the full transcript shipped in 2.1.310, switched off.

There are two blunt off-ramps, and both cost you a feature:

  • CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1 turns off most background execution, including the run_in_background parameter and the Ctrl+B shortcut. The Claude Code docs list exceptions, and background sessions in agent view have their own switch, CLAUDE_CODE_DISABLE_AGENT_VIEW=1.
  • CLAUDE_CODE_FORK_SUBAGENT=0 turns off fork mode, which lets Claude start copies of the current conversation on its own.

The gist's own fix is a small script that intercepts the summary timer. I'd be careful with it. The author tested on Linux only, says an update "can silently undo it," and warns that changing client behavior may conflict with the terms of the service you use. That's a lot of fragility to put on a machine you rely on.

This is bigger than one spinner

Strip out the Claude Code specifics and a pattern shows up that you'll see again and again this year: agent work is moving out of the chat window.

LangChain said on October 28 that more than 70% of runs on its Managed Deep Agents product come from schedules, not from a person typing. Microsoft's new Copilot harness in Foundry Agent Service runs the agent loop for you, and the same post warns that interrupted hosted-agent work restarts from its original input. Neither of those runs shows up as a conversation you'd ever read.

So here's the idea worth keeping: an agent's cost lives in its loops, not its answers. Timers, retries, background summaries, scheduled check-ins. None of them produce anything you look at, and all of them bill.

The practical consequence is simple. A per-task cost you calculate from the conversation is a floor, not a total. The only way to see the rest is to sort spend by what made each call.

Put this into practice

You can run this check in about ten minutes. It works on a personal machine, and you don't need a dashboard to start.

1. Turn on telemetry for one session. Claude Code's monitoring docs list the switches. The simplest version prints events straight to your terminal:

export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_LOGS_EXPORTER=console

The docs note that CLAUDE_CODE_ENABLE_TELEMETRY is ignored in project and local settings, so set it in your shell or user settings. For anything beyond a quick look, send events to a real collector over OTLP (the OpenTelemetry protocol) with OTEL_LOGS_EXPORTER=otlp plus OTEL_EXPORTER_OTLP_PROTOCOL and OTEL_EXPORTER_OTLP_ENDPOINT. The docs say there's no default protocol, so set it explicitly. The api_request events travel on the logs exporter, not the metrics one. Treat the export like any log that may carry project details, and send it only to a collector you control.

2. Run a normal session with a background agent or two. Do real work. A toy prompt won't build a long transcript, and long transcripts are where the cost shows.

3. Group the claude_code.api_request events by query_source. Each event carries a query_source field naming the subsystem that made the call (the docs give repl_main_thread, compact and subagent names as examples), along with the model, input and output tokens, cache-read tokens and an estimated cost_usd. Add up cost_usd per query_source. That one table is the whole finding.

4. Read the result honestly. Expect a large share for your main thread and your subagents. If agent_summary sits in the double digits, you're seeing what the gist saw. Compare cache-read tokens with fresh input tokens before you panic, since cached tokens are cheaper.

5. Decide what to change. You have three reasonable moves:

  • Run fewer background agents at once. The cost scales with the count and with how long each one lives.
  • If you don't use background tasks or fork mode, the environment variables above remove the summaries along with those features.
  • Add your numbers to the GitHub issue. A supported off switch is what everyone actually wants, and measurements move feature requests.

If you pay through a subscription rather than the API, the gist makes a point worth repeating: the "cost" here is rate-limit headroom. You hit your limits sooner, and you can't see why in the chat.

6. Keep the habit. Do this check after every major Claude Code update, and do the same exercise for any agent tool you run. Every serious agent platform has some background loop. The question is whether you've ever looked.

Honest limitations

Treat the 16.4% as one developer's number, not a universal rate. It comes from the author's own telemetry over specific weeks, it depends heavily on how many background agents you run and for how long, and someone who rarely backgrounds work may see almost none of it.

The spend figures are estimates. They come from Claude Code's cost_usd field, which the docs themselves call an estimate, not from invoices.

The claims about defaults, the switch that only turns things on, and the server-controlled interval come from the author reading Claude Code's bundled code, not from Anthropic documentation. They could change in any release, and the gist was tested on Linux only.

And Anthropic hasn't explained the design in public as far as I could find. There may be reasons for full-transcript summaries (accuracy of the status line, for one) that an outside reading of the code can't see.

The part of the bill you can actually read

Nobody is forced to run blind here. Claude Code already ships the telemetry that exposes this, and it names every subsystem that spends your money. The gap is that almost nobody turns it on.

Pick one session this week, export the events, and sort them by query_source. Either you'll confirm your agents spend where you think they do, or you'll find your own three-word status line. Both answers are worth ten minutes.

Sources: Flamerix AI gist, read October 29, 2026; anthropics/claude-code issue #86879; Claude Code monitoring docs; Claude Code environment variables; LangChain, "Why aren't you building proactive agents yet?"; Microsoft Foundry, Copilot harness. Claude Code versions referenced: 2.1.232 to 2.1.312, as reported in the gist.