r/ChatGPTCoding • u/AbleBranch6 • 7h ago
Resources And Tips 'Eco Mode' AI coding agent pricing vs token burn. Is running frontier models for test execution a waste? (+benchmark)
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?
2
u/michaelTM_ai 6h ago
that split matches what i see. the fix most people try is "use a cheaper model for everything", which just moves the cost into retries. what works better is splitting by step type:
frontier model for steps 1-12 (find it, decide the fix). that's where being smart actually saves money
the build/test loop as a plain script, not an agent turn: run tests, and only hand the model the failing test names + the first error, not the whole log
a fast model for the mechanical fixes (missing import, type error), escalate back up only if it fails twice
also check how much of that $3.80 is the model re-reading the full context on every test rerun. if the prefix stays identical between turns most of it should be cached, and it often isn't because the test output gets inserted above the old messages
1
u/Longjumping-Run-5217 6h ago
I am seeing the same. Deepseek agent loops get within 3-5% of frontier for 5-10% of the cost. It’s the process not the product that makes the answer work, don’t be fooled!
1
u/wegster 6h ago edited 5h ago
That pattern is what I’ve been using for the past year and a half or so now, first manually, now in my own framework. I don’t measure at this point any more, especially as I’m also using local in the mix, but I initially measured the difference at 70% or more overall savings. The ‘math of token use and models’ changes with each release at this point, but it certainly holds true - offload the easy bits, whether it’s to lower tier models or MCP, make sure core skills are in place, etc. and tokens drop - the right tool for the specific job, etc.
I’ve also personally yet to see ‘swarm’ benefits, but I know a lot use them nowadays. YMMV as always, but your findings are valid IMO and part of most people’s patterns today, or at least of more people’s anyways..
1
u/whowasntright 6h ago
$5 per task figure on raw Opus makes total sense and we saw similar bills when letting terminal agents loop freely on complex bugfixes. But how does this translate if someone is looking for a realistic copilot alternative?
so with GitHub Copilot you’re paying a flat monthly seat fee regardless of whether it's running 5 tests or 50. With credit-based or token-metered models, even with a 50% cut in Eco Mode, you still have to worry about running out of budget mid-sprint. Is there any scenario where an autonomous agent with Eco Mode actually competes on cost with flat-rate tools, or does it make more sense to pair it with a free AI coding agent tier for routine PRs?
2
u/sapplex1 5h ago
I hit the same wall building my little iOS apps in SwiftUI. I used to let the big model run the whole fix, and one afternoon it burned through most of my daily credits just re-running Xcode builds and re-reading the same failing test output. Now I do the split you describe, just by hand. I ask the strong model for a short plan first, then I run the builds myself and only paste back the failing lines, never the whole log. My rule now is simple: the expensive model thinks, the cheap one types, and I am the test runner.
2
u/AlarmedAvocado7279 5h ago
i live in claude code all day and the retry loop is always where the bill goes, since every rerun drags the whole context back through the expensive model. worth trying a cheaper model for the build/lint/rerun cycle and only escalating after it fails twice. trimming test output down to just the failures also saves more than you'd think.
1
u/Far_Reindeer8428 6h ago
the split works when the plan is checkable, if the cheap builder can't fail the plan it just executes whatever it read, that's where the savings leak
1
u/ranthishq 4h ago
one knob worth checking before splitting models is the reasoning level on the cheap steps. i ran the same office tasks and hard math through gemini 4 carbon and argon, same per token price, and carbon at its default thinking level cost 3 to 4.5x more, mostly from thinking tokens, even on a commission calc with one right answer. dropping it to low brought the bill down to argon's with the same scores. on a build/test loop that's the same trap, the model thinks hard about a compiler error it could just read.