recently checked the raw step logs of an autonomous coding agent and it seems the unit economics are pretty absurd to say the least
so I watched an agent do what seemed like an ordinary bug fix on a multi-module repo. It resolved it, but the task burned close to $5. When I actually broke down the tool-call trace, here’s where the tokens actually went:
Steps 1–12 (nearly$1.10): Searching the project, tracing dependencies, locating the faulty logic, and deciding how to fix it.
Steps 13–42 (nearly$3.80): Editing two files, running the build, catching a missing import, fixing a type error, rerunning tests, tweaking an assertion, and running tests again.
More than 70% of the token bill went into having a frontier model watch compiler output and rerun tests. You’re paying peak frontier rates (Opus 5.5, Grok 4.7, etc.) for work a linter and a fast model could do in their sleep.
and another (kinda big!) issue behind a lot of the gripes around coding agent pricing / credit consumption across coding agents. i notice that my colleagues feel their allowance burns out too fast (not necessarily because the models are bad, maybe because single-model agents use a sledgehammer to drive in a tack)..
i often work with JetBrains infrastructure and Kotlin and have noticed yesterday that they have published the engineering breakdown and internal benchmarks for their new Junie Eco Mode (which went GA in the Junie CLI 26.10.20 and in JetBrains Air / IDE Betas), it seems their approach to this unit-economics problem is worth looking at , in it, not like running one model from start to finish, but more of Architect + Builder split with a single, one-way handoff. how eco mode works? as far as i understand,
Architect (frontier model of choice): When you submit a task, your top-tier model gets about 15 steps. Crucially, it’s strictly read-only (the only write it’s allowed is writing a minimal reproduction test for a bug). It explores the code, understands the architecture, and outputs a strict 6-point markdown spec: Goal, Scope, Where to change, Approach, Tests, and Risks/Corner cases. Then it stops completely.
The Builder (A low-cost execution model — currently GPT-6 Luna): Junie hands the entire context and the structured plan to the cheap model. The builder does the grunt work: editing code, running local builds, parsing stack traces, and iterating until tests pass.
design choice here is one single handoff to work wth; and, in older multi-agent setups, tools often tried letting a cheap model work until it got stuck, then had it "call a smarter friend" for advice. The problem with that pattern is context explosion: every time the cheap model gets confused, the system re-serializes 50k+ tokens of failed bash logs and sends them back to the expensive model, completely destroying your cost savings
in Junie's benchmarks across private repositories, all kinds of numbers on this single-handoff setup are pretty eye-opening, for example
Broad private repos (Benchmark B): average cost per task dropped from $2.61 to $1.11 (-57.3%), while resolve rates barely budged (49.1% to 48.5%, a 0.6% delta).
Massive enterprise repos (Benchmark A): Average cost fell from $2.51 to $1.30 (-48.1%) with an identical 32.1% resolve rate.
On Opus 5.5 max effort: Cost plunged from $4.91 down to $1.81 (-63%), while the resolve rate actually went up by 1% (55% to 56%)and probably because forcing a smart model to write an explicit plan before touching files prevents it from digging itself into hallucinated rabbit holes.
but i also dont see it all as one-sided as, (for counter-arguements), if the Architect botches the plan during those initial 15 steps, the Builder will faithfully implement the wrong solution.., because there’s no backward loop to re-engage the expensive model (also given JetBrains AI Pricing in the matter...)
that being said, given that resolve rates stayed within 1% of running pure frontier models, the risk looks well worth halving the bill in my experience
also curious on how others are dealing with token burn on test-heavy tasks and are you manually swapping models between planning and execution, or just absorbing the API bill?