Excessive token usage: sub-agent performed 234 web searches over 45 minutes for a simple template enhancement

Resolved 💬 2 comments Opened Mar 20, 2026 by syedqzaidi Closed Mar 20, 2026

Summary

During a routine task (enhancing 2 YAML role template files with additional content), Claude Code consumed approximately 123K tokens and took ~1.5 hours of wall-clock time due to excessive sub-agent behavior. The task should have required a fraction of that.

What happened

I was using Claude Code (Opus 4.6, 1M context) to upgrade two role template YAML files as part of a structured project. The templates needed Level B (Major Enhancement) — adding specific missing sections (KPI tables, routing tables, escalation matrices) to existing well-structured files. The plan document already specified exactly which frameworks and content to add. No open-ended research was needed.

Claude Code chose to:

  1. Spin up a Triage Agent — read both templates and score them (reasonable, ~52K tokens)
  2. Spin up 2 parallel Research Agents — one per role, tasked with web research:
  • Research Agent 1 (dir-strategy): Made 234 tool calls (mostly WebSearch/WebFetch), consumed ~69K tokens, and ran for ~45 minutes. It fetched Fortune 100 job descriptions, framework documentation, KPI benchmarks, etc. — all of which were already specified in the plan document it had access to.
  • Research Agent 2 (mgr-special-projects): Made 39 tool calls, consumed ~55K tokens, and ran for ~8 minutes.
  1. Spin up 2 parallel Implementation Agents — one per role (~73K and ~69K tokens each, ~13 and ~11 minutes)
  2. Spin up 1 Audit Agent — validated both templates (~69K tokens, ~2 minutes)

Total: ~5 sub-agents, ~123K+ tokens, ~1.5 hours wall-clock time for what amounted to adding ~10-15K characters of structured content to each of 2 files.

The core problem

Research Agent 1 made 234 web searches/fetches when zero were necessary. The task prompt already contained every framework name, every KPI category, and every structural element that needed to be added. The research agent redundantly searched the web for information that was already provided in its own prompt. This is the primary source of token waste and time waste.

Expected behavior

For a Level B enhancement where the plan document specifies exactly what to add:

  • Skip standalone research agents entirely (or limit to 5-10 targeted searches max)
  • Combine both roles into a single implementation agent (they are in the same sub-phase)
  • Total should be ~30-40K tokens, not 123K+
  • Wall-clock time should be ~10-15 minutes, not 90 minutes

Environment

  • Model: Claude Opus 4.6 (1M context)
  • Platform: macOS (Darwin 24.6.0)
  • Task: Enhancing structured YAML templates with specified content additions
  • Sub-agent type: general-purpose (default)

Impact

  • ~80-90K tokens wasted (estimated 65-70% of total usage was unnecessary)
  • ~75 minutes of unnecessary wall-clock time (research agents running web searches)
  • User cannot recover tokens spent

Suggestion

Sub-agents dispatched for research tasks should have configurable limits on tool call counts, or the orchestrating agent should recognize when research is redundant (i.e., the required information is already present in the prompt/context). A max_tool_calls parameter on the Agent tool would help users prevent runaway sub-agent behavior.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗