Artificial Intelligence & Computing — Agent Design

You Only Need the Frontier Model for One Edit

Engineers building AI coding assistants have discovered a surprising cost fact: the frontier model is mostly paying to read code, not to change it. A new architecture swaps in a cheap model after the very first edit and keeps almost all of the results.

The conventional recipe for an AI coding agent is simple to state and expensive to run: let the best, most expensive model do the heavy reasoning, then hand the plan to a cheaper model to execute. Engineers at the code-editing tool Stencil followed the obvious advice and measured what really happened. In a real task run on a top-tier model called Opus, almost everything the agent spent tokens on was reading: opening files, grepping, checking the build, verifying the fix. The moments that actually changed code — every edit and write combined — made up just 9% of the token budget. The bill did not come from building; it came from looking around.

The key insight is that a frontier model’s advantage is concentrated in one step: the first, correct edit. Once the model has demonstrated the right pattern, written in the right style, with the right context, a much smaller and cheaper model can continue the work reliably. The trick is knowing exactly when to switch. Switching at a fixed turn number fails because the expert is sometimes still lost at turn four and sometimes already done at turn two. Switching after the very first edit works, because the agent has now proven it understands the task and shown the junior model what success looks like. A small TODO list with a validation step for each change gives the junior model a permanent reminder it cannot ignore, providing free steering for the rest of the session.

Compared to the all-frontier baseline, the two-model approach preserved 97% of the pass rate while spending 61% of the cost and running fastest. The pattern is small but durable: price an agent by its most useful moment, not by its longest moment, and let a strong opening move do most of the work.