Claude Code burns up to 20% of tokens on a 3-word status line
An analysis by Flamerix AI finds that Claude Code sends each background agent's full transcript to the model about every 30 seconds, just to generate a 3–5 word status line. That reportedly accounts for roughly 16–20% of costs. A small script switches it off, since there's no official setting for it.

What this is about
The company Flamerix AI has published a script that switches off an inconspicuous but expensive feature in Claude Code, Anthropic's coding assistant for the terminal. According to the authors, Claude Code sends each background agent's complete conversation transcript to that agent's model about every 30 seconds. That's usually Opus, the most capable and most expensive model. The task: "Describe your last action in 3–5 words." The answer only ends up in the status line of the agent panel. It reaches neither the model nor your conversation.
According to the source, no setting turns this off. Since version 2.1.232 (August 2026), the feature has been active by default. The analysis comes from a GitHub gist that is being discussed on Hacker News. This is a claim from a third-party vendor, not a confirmation from Anthropic.
How the problem was found
The oddity showed up in Claude Code's OpenTelemetry output. OpenTelemetry is a standard for exporting measurement data such as individual API requests. If you group the claude_code.api_request events by the query_source field, "agent_summary" appears as its own line item. At Flamerix AI (measured by DRIM), this item cost more than the main conversation itself:
| query_source = agent_summary | Week before the hook | 2 days after |
|---|---|---|
| Share of all Claude Code costs | 16.4% (main conversation: 15.7%) | 0% |
| Share of all API requests | 19.7%, about one in five | 0% |
| Share of costs on Opus | 96% | – |
| Input per output token | ≈ 9,000 : 1 | – |
"Costs" here means Claude Code's own per-request estimate (cost_usd), not an invoice. If you're on a subscription, what you lose is mostly headroom under the rate limit, meaning your allowed usage quota. The tracking issue #86879 bundles four independent measurements of 18–26%. The ratio of about 9,000 input tokens to 1 output token shows the imbalance: a huge amount is read to write almost nothing.
How the script works
no-agent-summary.js is a "Bun preload." Bun is the JavaScript runtime Claude Code runs on, and a preload is code that gets loaded before the actual program. The binary itself isn't modified. The script wraps setTimeout and setInterval. If the source of a timer function contains a known anchor, such as the log line [AgentSummary] Timer fired, the script returns a timer that does nothing. All other timers run as normal.
Why so roundabout? The module ships as precompiled Bun bytecode, so editing text in the binary gets you nowhere. The API client also doesn't go through fetch, which could otherwise be wrapped. But Function.prototype.toString returns the source of a callback function even from bytecode. The do-nothing timer uses exactly 2³¹−1 milliseconds, because Node and Bun treat larger values as 1 ms. An "infinite" value would fire immediately.
Installation in brief (Linux): download the script, run claude daemon stop --any, and start Claude Code with BUN_OPTIONS="--preload <path>". To make it permanent, use shell profiles, systemd environment files, or a wrapper named claude on your PATH. Important: restart the daemon after installing, because the daemon, the pty host, and pre-warmed sessions inherit the environment of the process that started the daemon. Headless runs (claude -p, cron, CI, editor integrations) need the variable too.
With CC_AGENT_SUMMARY_MODE you can switch between off (the default, suppresses the timer) and pass (just loads, changes nothing, useful as an A/B control).
Why the official switches don't help
The authors searched the bundle and list several dead ends:
- The documented SDK option
agentProgressSummariesis set tofalse, but in the code it's part of an OR condition, and every write path sets it totrue. Sofalsechanges nothing. - The server decides the interval (per model family, clamped to 30–240 s). The default is already the minimum, and no value disables the timer.
DISABLE_NON_ESSENTIAL_MODEL_CALLSdoesn't appear in the binary at all.CLAUDE_CODE_FORK_SUBAGENT=0andCLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1do stop it, but they take fork subagents and background agents down with it.- The prompt cache (cached inputs that are billed at a lower rate) makes it cheaper, but not cheap: about 98% of calls read from the cache, and the remaining ~2% with a cold cache cause over a third of the cost.
- Cost tools that analyze session logs don't see these requests, because they aren't written to disk (#104358). Only the OpenTelemetry export shows them.
Interestingly, version 2.1.310 already includes a cheaper "short mode" (about 2,000 tokens of notes instead of the full transcript, optionally written by a smaller model). But it's turned off and can only be changed with a server flag.
Timeline and verification
The feature first appeared in the code in 2.1.32 (Feb. 5), became reachable as an SDK option in 2.1.72, reached the interactive CLI in 2.1.117, and has been on by default since 2.1.232 (Aug. 13). Since 2.1.300 (Oct. 14), the interval can be set server-side. The authors' weekly cost share rose from 3.5–7% in July to around 16% in mid-October.
Versions 2.1.257 through 2.1.312 were tested. In an agent run of about 2.5 minutes, there were roughly 5 summary forks without the hook and zero with the hook in off mode. Because an update can silently break the approach (for example through renamed log lines or a different timer mechanism), you should check after every update. Look at the log file via CC_AGENT_SUMMARY_LOG and confirm in telemetry that agent_summary stays at zero.
What to keep in mind
This isn't a model. It's a helper script, and you don't "download and run" it the way you would an AI model. In practice you need Linux (macOS and Windows are untested, and on Windows the hook probably never takes effect), a Claude Code installation, and access to shell environment variables. You'll only see the effect if you export telemetry. The visible side effect: the agents' status line in the panel is no longer updated, and in the SDK task_progress contains no summary. Subagents, background agents, and skills run normally. The overhead is small (claude --version: about 10 → 17 ms, a single measurement).
Our take
The numbers come from a single vendor plus user reports in the issue tracker, and Anthropic hasn't commented in the source. Still, the fact that four independent measurements land in a similar range suggests this is a real pattern. For subscribers with many background agents in particular, it could save a noticeable chunk of quota.
On the critical side: the script interferes with a client's runtime behavior and, according to the authors, may violate terms of service. Liability and vetting are on you. It's also fragile, since it relies on text anchors in the source code. A clean fix would be an official switch or enabling the short mode that's already built in. Until then, this is an instructive example of how hidden side requests drive up the costs of AI tools, and why telemetry matters so much.
Sources
- Hacker News gist.github.com
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.