AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Sep 29, 2026, 10:00 JST

Claude Code subagent hit 約87万トークン; split by task

Claude Code subagent hit 約87万トークン; split by task

3 Key Points

  1. What happened

    Across about 80 Claude Code sessions in one week in September 2026, one implementation subagent reached roughly 870,000 tokens and about 500 tool calls in a single delegation.

  2. Why it matters

    The parent session's Context looked small, yet subagent totals ran about 3x the parent on average, so watching only the parent hides where the usage budget goes.

  3. What to watch

    The fixes here (splitting work by task type, shrinking docs, fewer verification passes) were not measured under identical conditions, so gains may reflect multiple changes at once.

WHO IT HITSDevelopers and teams running many Claude Code subagents who watch only the parent session's context will need to total subagent usage to spot the heavy roles.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The subagent structure exists to keep each delegated task's context separate, but the author's logs show this only pays off when the split follows the kind of work. In the largest session, about 5.6 million tokens of final Context spread across 27 subagents dwarfed the parent's roughly 400,000, and the outliers were an on-device check and test-following work.

The three fixes point in different directions. One kept test writing with the implementation agent; another split test clean-up away from it. The author explains both by asking where the bloat sits: reduce the number of on-device checks in one case, and stop several task types from piling up in one agent in the other. The rule of thumb that emerged was to size a single delegation at one document or one change.

Whether these gains hold is not settled. The sessions after the switch to Opus 5.5 had different conditions and were not a clean model comparison, and the author notes the cost of over-splitting is more request and report overhead. The figures here are one developer's own measurements, useful as a way to see where usage goes rather than as a benchmark for other setups.

FAQ
How did the developer spot the heavy subagents?
By reading three files Claude Code writes: a session JSON, the parent's .jsonl record, and each subagent's .jsonl and .meta.json. Lining up per-agent numbers is what made the heavy ones visible.
Why did a dedicated UI-check agent not run?
Its definition's leading YAML broke on an unquoted ": " inside the description, so it was not loaded and a general-purpose agent was asked to stand in instead, with no warning shown.
Does editing CLAUDE.md take effect right away?
No. The version passed to subagents is the one from when the parent session started. Shrinking the file did not help until the session was reopened, and other auto-read documents were shrunk at the same time.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleTiny AI Arena pits AI models in battle game; claude-sonnet-5 leads