[harness] Subagent cost is dominated by re-reading files: a judgement pass over a few hundred JSON records costs 470K-910K tokens

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 28, 2026

Context. Solo-operator project using Claude Code (desktop app, Windows 11) with a lead session on Claude Fable 5.1 orchestrating Opus 5.5 / Sonnet subagents (in-process, worktree-isolated), a JSON task store (~1,100 records), PreToolUse/SubagentStop hooks and a harvest-train commit flow. Everything below was measured on 2026-09-28 in one session of ~20 dispatches, two blind judge pairs and nine commits. Numbers are from tool output, not recollection; no secrets or private paths included.

Finding. Read-only judgement subagents over a task store of ~1,100 JSON records (population 39-365 per pass) used 470K-910K tokens and 50-160 minutes each; a sweep over 3,257 items ~1.5 h of Opus; the lead applied each pass's proposals in ~10 minutes. Subagents wrote their own single-process readers because per-file loops time out. The expensive part is reading, not judging.

Ask. A harness-side indexed record/query capability subagents can use instead of re-reading files (or a cached read tool with a query API); per-subagent token accounting split into read vs generate so the lead can see where the budget goes.

View original on GitHub ↗