Skip to content

FrontierEditThenSwap

Dennis Lee edited this page Jul 28, 2026 · 1 revision

title: Frontier-Edit-Then-Swap radar_quadrant: Techniques radar_ring: Assess

Frontier-Edit-Then-Swap

Frontier-Edit-Then-Swap is a cost-optimization technique for multi-model AI agent pipelines. It targets a specific waste pattern in setups that use an expensive "frontier" model to plan work and a cheaper model to carry it out: both models end up reading the same codebase. The frontier model reads the code to understand it and produce a plan; the cheaper model then reads the same files again to actually execute that plan, because a written plan alone does not give it enough grounding to act reliably. The expensive part of an agent's work is not the reasoning, it is the reading, so duplicating that read effectively pays for it twice.

The technique changes where the handoff between models happens. Instead of having the frontier model produce a plan and stop, it is allowed to keep working past planning and make one real, confirmed code edit. Only at that point does the system swap in a cheaper model. Critically, the cheaper model does not receive a plan document. It receives the frontier model's actual exploration trail and its first completed edit, used as a concrete example to continue from. The cheaper model imitates demonstrated behavior rather than interpreting written instructions, which turns out to be a more reliable and cheaper way to hand off a task mid-flight.

Reported outcomes from Stencil describe a task run at roughly half the cost of running a frontier model the entire way through, completed faster overall, while retaining about 92% of the frontier model's accuracy. The cheaper model was also reported to be about three times less likely to go off-task (for example, resorting to unnecessary web searches) compared to a conventional plan-then-execute handoff.

Radar Assessment

Frontier-Edit-Then-Swap is placed in Techniques at Assess. It documents a specific, reusable workflow pattern for structuring multi-model agent pipelines, evidenced by measured cost, speed, and accuracy comparisons published by the source. It has not yet seen first-person production use in this user's own pipelines, which is the bar this radar requires before a technique can move to Trial. It is worth exploring as an option for reducing agent operating cost where a frontier-then-cheap-model split is already in use.

References

Clone this wiki locally