Auditing 505.8M tokens: subagents are cheap, cold cache wakeups are what kill your bill
Adorable-Cost-3249 · reddit · 2026-11-12
The author audited step-level token logs across 68 real conversations (4,894 model steps, 505.8M gross tokens) in a local-first personal-assistant workspace (agy-hq on Google Antigravity + a zero-dependency Go helper) to test whether background subagents inflate costs — and found the opposite:
- 92.1% of prompt tokens hit prefix cache (462.5M cached reads vs. 39.8M uncached input).
- Long-running subagents are remarkably cheap (97.4%-97.9% cache hit): tool calls every 3-8 seconds keep every step warm within the 5-minute prefix-cache TTL; a 130-step subagent (15.2M gross tokens) billed only 396k uncached input tokens.
- The real budget killer is waking an idle, uncompacted main chat (0% cache hit): with 207k context tokens, just 2 wakeup steps after idle gaps billed 414k uncached tokens — more than the 130-step subagent.
Fixes: an automatic 160k context watermark nudging /compact cut wakeup costs from 252k to 27k tokens (-89.2%); a Go-capped ≤80-line MEMORY.md index preserves long-term context. Other patterns: a PreToolUse hook capping the main chat at 3 read-only checks per turn, model right-sizing (Flash for quick checks, deep reasoning models in isolated git worktrees), tainted-session quarantine with 1-tap SHA-256 approval cards on phone, and 9 standalone ≤150-line SKILL.md files. The full workspace template and Go helper are open-sourced under Apache 2.0 with a 60-second --demo sandbox.
More from coding & agent
- Building a mangrove forest simulator with a swarm of Carbon agents citing 45 papers — AI_Andrew · 2026-11-12
- Fumadocs 16.19 adds runtime variables and branching without leaking hidden branches — bclavie · 2026-11-12
- Claude Agent SDK vs raw API: a different execution model for agents that act — adnan_hashmi · 2026-11-12
- Dev runs security agents 24/7: they beat external attackers, asymmetry smaller than feared — AccBalanced · 2026-11-12
- TypeSafe CEO: Sprinkle System One Models Inside Code to Automate Everything — Latent Space · 2026-11-12
- Chicago office broker builds Claude+Airtable scoring system to predict tenant expansion across 9,000 companies — TheRoflTractor · 2026-11-12