NewsCrawler.org

Claude Code regularly sends each background agent's transcript to its model

Claude Code regularly sends each background agent's transcript to its model
Image: news.hada.io

Every ~30 seconds, for every background agent, Claude Code sends that agent's entire transcript to the agent's own model (usually Opus) and asks it to describe the most recent action in 3–5 words. The answer only updates the agent's status line in the agents panel and never reaches the model or the user's conversation; there is no setting that turns this off, and since 2.1.232 (August 2026) it has been on by default. The author noticed it by grouping claude_code.api_request events by query_source in the OpenTelemetry[1] export: agent_summary requests cost more than the main conversation itself, and a linked issue collects four independent measurements of 18–26 %. The spend figure is Claude Code's own per-request estimate (cost_usd), so on a subscription what the user loses is rate-limit headroom.

The fix, no-agent-summary.js, is a Bun preload[2] of about 80 lines: it wraps setTimeout and setInterval, and whenever a timer callback's source text contains a summarizer anchor such as the [AgentSummary] Timer fired log line, it returns an inert handle instead of arming the timer; the binary itself is not modified. This roundabout route is needed because the module ships as precompiled Bun bytecode, so editing its JavaScript text does nothing, and the inert timer uses exactly 2³¹−1 ms because Node and Bun treat a larger delay as 1 ms. The interval belongs to the server — a per-model-family flag clamped to 30–240 s whose default is already the minimum — and the SDK option agentProgressSummaries defaults to false, but every code path that writes it sets true, so nothing disables the timer.

About 98 % of these calls re-read the transcript from the prompt cache[3], while the ~2 % that hit a cold cache carry over a third of the cost; the requests are not written to the session logs on disk, so only the OpenTelemetry export shows them. A shorter mode shipped in 2.1.310 sends about 2k tokens of notes instead of the full transcript, optionally written by a smaller model, but the default is still the full transcript and only server flags can change it. With the hook installed the author measured zero agent_summary requests, and since matching is by source text, an update that renames the anchor can silently bring the summaries back.

Read the original gist.github.comDiscussion on GeekNews

Discussion

Commenters mostly read this as another case of Claude Code burning tokens for no clear reason, and several argue the incentives are misaligned when an inference provider also ships the harness its customers run; one calls the hidden spend fraud. A commenter who tested it calls the picture more nuanced: only subagents are affected, reads mostly hit the cache, and the share was ~8 % at most in their sessions. Others point out that Anthropic also embeds the user's email in the system prompt, and one reports a full 5-hour window dropping from 25 % to 13 % of the weekly limit after a recent fix.

Sources

Published: First seen: Читать по-русски

Open as a page