Coding agents burn two-thirds of tokens after the first edit; upfront plans fix it
rseroter · x · 2026-11-17
Citing Andreas Rau's writeup of the FlowPlan research: making your coding agent declare its edit intent in a checkable format before editing can drastically cut wasted tokens.
Key findings and method:
- In a Claude Code baseline, about two-thirds of all tokens were spent after the agent's first edit, across 31 further calls of re-reading, diff inspection and testing; cache reads accounted for 96–98% of baseline tokens — the agent re-reads far more than it writes.
- The cause: a vanilla agent has no explicit statement of intent, so it convinces itself an edit is right by re-reading code and running tests, re-sending growing context each time.
- FlowPlan (by Melika Sepidband, Jiho Shin, Song Wang, Hadi Hemmati) fixes this not with a smarter model or bigger context, but by having the agent commit to a structural plan upfront, turning verification into a cheap comparison.
- Copyable mechanics: build control-flow/data-flow graphs on demand (AST for Python, Joern CPG for C/C++), driven by a /flowfix skill and 5 MCP tools across four phases starting with Locate.
Directly applicable for teams optimizing agent token costs and evals.
More from coding & agent
- Voice agent flagged as spam? Swapping the DID won't help — check pickup latency first — Packet-Exchange-Care · 2026-11-17
- OpenAI quietly adds a remote switch controlling how Codex runs agent teams — ryanmerket · 2026-11-17
- Torch Compile underrated: CUDA Graphs + PDL hits 98% of megakernel speed on Llama 1B — simran_s_arora · 2026-11-17
- A one-line prompt fix for "AI brain fry": limit focus to 1-3 items — gerardsans · 2026-11-17
- Park, a Canvas-Based Mac Browser From Arc's Lineage, Launches Public Beta — round · 2026-11-17
- Vision AI watches a garage door for ~$1.50/year, replacing a hardware sensor — SuB8u · 2026-11-17