Todos los artículos

Measuring Long-Running Coding Agents, Part 3: Upfront Design and Accounting for Human Attention

24 de noviembre de 2026

#Artificial Intelligence#Software Engineering#ai agents#software architecture#leadership
Measuring Long-Running Coding Agents, Part 3: Upfront Design and Accounting for Human Attention

In Part 1, we looked at why activity metrics mislead on long agent builds and how to score a build from evidence. In Part 2, we defined Return on Token, showed why rework costs grow quadratically, and explained our three-round review cap. This last part zooms out to the whole build: why tokens spent on design at the start pay back across every task that follows, and why human attention needs its own ledger.

Long-Running Builds Compound Like Discounted Cash Flow

On a 1-task fix, RoT\mathrm{RoT} is purely local. On a 50-to-65-task, two-day build where later tasks depend on earlier ones, early tasks compound forward just like capital in a Discounted Cash Flow (DCF) model.

In finance, $1 invested at Period 1 compounds across the remaining 49 periods, (1+r)49(1 + r)^{49}, while $1 at Period 50 compounds across zero. Software dependency chains behave much the same way, amplified by η2\eta^2:

  • Task 1 carries massive downstream reach: Spending extra tokens upfront—on Architecture, locked module contracts, and Stage 1's end-to-end reference slice—looks like a higher upfront cost C1C_1 if you score Task 1 in isolation, just like capital expenditure at t=0t = 0.
  • The return arrives across Tasks 2 through 65: Clean upstream interfaces drive downstream rework rounds R2…R65R_2 \dots R_{65} toward 0. Because every downstream task's Return on Token scales with ηt2\eta_t^2, shaving even 0.5 rework cycles off 50 dependent tasks pays back the upfront architectural tokens many times over.
  • Sloppy Task 1 charges compound rework interest: Saving 20% of tokens on Task 1 by skipping interface design forces every downstream worker to fight leaky abstractions, decaying ηt\eta_t wave after wave until the build stalls out.
  • The catch: Task 1 is also where we know the least. The decisions with the most downstream reach get made at the point of greatest uncertainty, before any code has tested them. Software estimation has a name for this, the cone of uncertainty: what you know about a project is weakest at the start and narrows as work lands. So the return on upfront design comes discounted by the odds that the early guess was right, and those odds are lowest exactly where the reach is highest. That's why our extra upfront spend goes into the thin end-to-end slice, the cheapest way to test the early guess against real code, and why workers get savepoints to flag a contract that turns out to be wrong instead of shimming around it.

You can watch that slope directly in real build data. Over the first 55.7 hours of Epic B (65 accepted tasks, +32,178 / -2,119 lines across 339 files), watch what happened to forward efficiency η\eta as the foundational contracts and vocabulary standards landed:

  • Feature 207.2 & 207.3 (early heavy engine plumbing): η = 61% and 57% (1.64 and 1.76 review cycles/task).
  • Epic Round 1A (packet-v2-contracts, 15 tasks): η = 79% (1.27 cycles/task).
  • Epic Round 1B (vocab-and-construction-plan, 8 tasks): η = 89% (1.12 cycles/task, 0 exceptions).

Bar chart of forward efficiency eta by feature in build order: 207.1 scope harmony 73 percent, 207.2 formatting 61 percent, 207.3 savepoints 57 percent, then after locked contracts and vocabulary standards, Round 1A packet contracts 79 percent and Round 1B vocabulary and plan 89 percent.

In unconstrained vibe-coding, ηt\eta_t decays toward zero as a codebase grows. When upfront architectural tokens compound properly, later tasks get easier and cleaner even after adding 32,000+ lines of code.

The Orthogonal Axis: Human Leverage

Keeping human effort out of RoT\mathrm{RoT} lets Human Leverage stand clearly on its own axis:

Human Leverage=Verified Autonomous WorkActive Human Attention\text{Human Leverage} = \frac{\text{Verified Autonomous Work}}{\text{Active Human Attention}}

An agent harness can have great token efficiency while interrupting you every four minutes—which destroys human leverage. Or it can leave you alone for eight hours while spinning in circles—which destroys Return on Token. Separating the axes also reveals rational engineering trade-offs: on Feature 207.3, η\eta dipped to 57% on tough cross-provider plumbing, yet autonomous runs hit 120.0x per operator input with zero human escalations because agents resolved conflicts autonomously via savepoints (ADR-0049). When senior human attention is scarcer than cached tokens, trading an extra self-healed review cycle for uninterrupted autonomy is a deliberate win.

To push both axes up and to the right simultaneously:

  • Collapsing human interruptions: ETC routes worker questions up a four-rung escalation ladder (worker -> engineering manager -> VP -> human), parks contract conflicts cleanly via savepoints (ADR-0049), and runs a walk-by watchdog every 30 minutes. Across all 5 completed Epic B features (65 accepted tasks, 38.2 active build-task hours across 55.7 wall-clock hours), ETC executed 783 autonomous worker, check, rework, and judge runs across just 14 scorecard operator inputs—55.9x on average. On the previous 72-task epic, 16 human messages drove roughly 5,000 AI turns, about 830 AI turns per human decision.
  • Lifting Return on Token simultaneously: Import-graph test selection (ADR-0011) turns 11-minute full-suite test runs (7,779 tests) into targeted few-second runs per task; prompt caching covered 89.2% (224.0M of 251.2M) of recorded judge input tokens across Epic B; ReusedPass and delta diffs cut follow-up judge spend to 0.65x; and our architect 1–10 complexity dial + warm serial worktree reuse cut out the 41-task splice tax.

What ETC Records Today, and What's Next

Our own scorecard rule applies to this series too: never print a fake total when a stream wasn't recorded. ETC 3 records only the review (judge) agents' tokens, inside .etc_sdlc/. The building agents' tokens are logged by the host CLIs (Claude Code, Codex, Grok) in their own local session files, which ETC doesn't read. So every Return on Token figure in this series is judge-side only.

Here is how a build's token cost breaks down today:

  • Recorded by ETC (etc tasks scorecard): every completed task-review judge call, deduplicated by run UUID and including confirmation retries, plus the latest work-level verification judge run per check, such as security-review. Follow-up reviews on rework rounds are part of this stream; across Epic B they cost 0.65× of the first review on average.
  • Not recorded by ETC: planning, the engineering manager's dispatch and rescope turns, and the workers' building turns and rework fixes.
  • Free: prompt and feedback compilation (attempt-<n>.prompt.md and attempt-<n>.round-<k>.md) is deterministic Python and burns zero LLM tokens.

Two upgrades are next:

  1. Full cross-role token capture: recording worker execution turns, engineering-manager dispatch and rescope turns, Anthropic cache_creation_input_tokens, and reasoning-token sub-keys in TokenUsage, so etc tasks scorecard prints both judge-only and full-stack $\mathrm{RoT}{\text{task}}$ and $\mathrm{RoT}{\text{spec}}$ on every PR.
  2. True human attention timers: Distinguishing 90 seconds of active human spec review from overnight wall-clock elapsed time without relying on rough timestamp gaps.

That's the series. We started with a weekend where agents reported 98% step success and shipped about half of their work, and we ended up measuring three things instead: whether the threads of value come out the far end of the tunnel intact, how much rework it took to get them there, and how much human attention it cost. Next, we'll pull the main principles together for technology leaders in one short post.

Appendix: Epic B Rollup

Feature Accepted Tasks ($F$) Verified Criteria ($A$) Forward Efficiency (η\eta) Cycles / Task Scorecard Inputs Autonomous Runs Runs / Input Active Build Task Hours
207.1 (transactional-scope-harmony) 11 15 / 15 73% (11/15) 1.36 3 116 38.7x 3.42 h
207.2 (canonical-formatting-500) 14 24 / 24 61% (14/23) 1.64 3 189 63.0x 9.00 h
207.3 (contract-conflict-savepoints) 17 32 / 33* 57% (17/30) 1.76 2 240 120.0x 12.83 h
packet-v2-contracts (Epic Round 1A) 15 30 / 30 79% (15/19) 1.27 3 162 54.0x 9.21 h
vocab-and-construction-plan (Epic Round 1B) 8 26 / 27* 89% (8/9) 1.12 3 76 25.3x 3.74 h
5-Feature Total (Rounds 2–3 still ahead) 65 127 / 129* 68% (65/96) 1.48 14 783 55.9x 38.20 h

*Publication accuracy footnotes:

  1. The two unmet criteria in Epic B are recorded, operator-approved debts: 5 pre-existing >50-line functions in 207.3 (queued as backlog 257–259) and in-sandbox --cov baseline exclusions on vocab-and-construction-plan (where changed-line diff coverage hit 100% 329/329).
  2. In ledger.jsonl, 9 extra person-attributed verify/task-accept approvals appear alongside the 14 request/go-ahead/answer inputs counted by tasks_scorecard_leverage.py. We left them out of the human-input math on purpose: they weren't judgment calls. The operator was checking in on the work, not making a decision.
  3. Recorded judge token totals across Epic B: 251,247,111 input (224,042,810 cached = 89.2% cache hit rate) and 2,036,222 output (241.99M in task review rows + 9.26M in work-level Verify/Arch judge runs).

AI attribution: 3/4 — Human-originated, AI-shaped. What this means

Jason Vertrees is the founder of Heavy Chain Engineering, which helps lower middle-market vertical SaaS companies and PE firms turn scattered AI usage into measurable delivery leverage — 85% faster feature velocity, six-to-eight-week projects shipped in days. If you want help building an AI-native engineering organization, book an AI Delivery Assessment or email info@heavychain.org.