Static

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

First reported by Gist.github ·

The signal ●○○○ Compiled by AI from Gist.github and Hacker News
Why you might care

Your token usage for Claude Code will decrease by up to 20% each month.

What happened

A technical analysis reveals that Claude Code's background agents are consuming a significant portion of user tokens, estimated at 15-20%, on a recurring task. Every approximately 30 seconds, each background agent sends its entire transcript to its own model to generate a brief status update. This "agent_summary" action, which does not appear in the main conversation or contribute to the model's understanding, has been on by default since version 2.1.232 and lacks a user-facing setting to disable it. Data from OpenTelemetry exports indicates that these summary requests account for a substantial amount of Claude Code's API spend and requests, with one measurement showing "agent_summary" costing more than the main conversation itself. A workaround has been developed in the form of a JavaScript preload script for Bun that intercepts and disables these specific timer functions, thereby preventing the token consumption.

What it means

This discovery highlights a critical inefficiency in the operational overhead of large language model agents, particularly within code-focused development environments. The "agent_summary" feature, while intended for internal status updates, represents a costly, hidden drain on resources, consuming valuable tokens that could otherwise be used for actual task execution or conversational turns. The reliance on a preload script to disable this feature underscores a lack of user control and transparency in the deployment of such agentic functionalities, suggesting a broader industry trend where background processes can significantly impact perceived cost and performance without explicit user opt-in or opt-out.

The implications extend to how LLM applications are designed and billed, pushing developers to scrutinize the token economics of internal agent communication versus user-facing output. Users who rely on Claude Code for cost-sensitive projects may find this workaround essential to manage their expenditures, while the existence of such hidden costs could influence future adoption and trust in AI development tools. The ongoing battle between efficiency and feature richness in AI agents is clearly illustrated, with the community actively seeking methods to optimize resource utilization.

AI-written summary. May contain errors.

Claude