Break-even math for 20-turn agent loops: caching and routing cut API burn 76%
TokenMarginDev · reddit · 2026-11-17
Auditing real token logs from multi-turn coding agents (Claude Code, Kilo Code, OpenCode, LangGraph/MCP), the author shows a single 20-turn task consumes 620K cumulative input tokens vs 12K output, making single-turn $/1M tables misleading. Break-even analysis: uncached frontier API at $1.35-2.05/task only makes sense under 15 tasks/month; Claude Max flat $100-200 fits solo heavy CLI use but locks quotas and can't serve CI/CD or SaaS; BYOK + 90% prefix cache + 80/20 routing lands at $0.14-0.26/task for 15-1,200 tasks/month; a dedicated H100 needs >45M tokens/day sustained. Three fixes cut burn 76%: pin provider.order on OpenRouter to preserve KV cache, keep volatile state out of the system prompt, and batch parallel read-only tool calls.
More from coding & agent
- Amanda Launches API That Sends AI Agents to Meetings for You — Scobleizer · 2026-11-17
- Building 3D Worlds With Claude: The Case for a 'Signature Demo' You Keep Upgrading — Kyrannio · 2026-11-17
- GBrain's hosted memory layers personal, team, and company brains across ChatGPT, Claude, and Cursor — garrytan · 2026-11-17
- Build a Multi-Agent System From Scratch ships chapters 9-10 on subagents and A2A — _nerdai_ · 2026-11-17
- New cloud coding agents spin up isolated microVMs with per-task access control — jekapats · 2026-11-17
- Vibecoder rebuilds entire world in Minecraft at 1:1 scale with 250+ AI agents — Polymarket · 2026-11-17