Prewalk is a way to split one coding task between two models: an expensive frontier model starts the work, a cheap model finishes it. The twist is what gets handed over. Not a plan document. The whole working context, up to the first successful edit.
Source: You only need the frontier model for one single edit (Can Bölük, Stencil, 2026-07-13). It is a vendor blog post from a small team’s own harness, with one benchmark. It is a useful idea, not a battle tested one. Treat the numbers as a hypothesis worth a small trial.
The problem with /plan
The usual pitch for a planning mode is “senior architect, junior engineer”: let the best model read the code and write a precise plan, then let a cheaper model execute it. The article reports that this lost on cost in their test. Opus planning read only and a Flash class model implementing cost 2.78. Same pass rate (84.6 percent), so the cost saving measure cost about 14 percent more.
Their explanation is about where tokens go. In their logs, across about 1.81 billion tokens and about 2 million tool calls, only 9 percent were edits and writes, and the authors put most of the rest down to reading. The bill scales with how much the agent reads, not with how hard it thinks. So a plan document does not move the expensive part to a cheaper model. The frontier model reads everything at frontier prices, writes a roughly 2K token plan from a 100K plus token understanding, and then the cheap model re-reads the same files because “a plan is not a file and you cannot edit prose”.
They also argue each reason for using a plan fails:
- Want the big model’s deep understanding? It lives in the context, and the plan is a postcard from it.
- Task very complicated? Then the main agent should not execute at all. Let it explore and dispatch sub agents.
- Cost constrained? Reading is the cost, and a plan makes you pay for it twice.
How prewalk works
- Start the task on the frontier model with one hidden instruction: plan deeply, capture the plan as a todo list, then start.
- The frontier model explores, writes the plan, and creates the todo list.
- At the first edit, switch to the cheap model and remove the planning instruction from the context.
To the cheap model it looks like it explored, planned, and had already made one correct move. It gets a free in context example of the pattern, in the project’s style, and nothing in the context says “planning mode”.
Details they found by failing first:
- Swapping at a fixed turn (say turn 4) is wrong. Sometimes the frontier model is still lost, sometimes it already finished.
- Swapping at the first edit alone was better but small models kept declaring the task done.
- The todo list with a validation step per item is what fixed it. A small model can forget the plan, but it cannot ignore a todo reminder that keeps nagging it. That is free steering.
- GPT 5.6 as the guide likes 60 item todo lists done in batches, so put an item limit in the prompt.
The reported numbers
All on SWE-Bench Pro, in the authors’ harness. Cost includes the frontier model’s opening turns.
| Setup | Pass | Cost per task | Time |
|---|---|---|---|
| Cheap model alone (Luna) | 77% | $0.60 | 570s |
| Prewalk (Sol then Luna) | 85% | $1.04 | 300s |
| Frontier alone (Sol) | 88% | $1.71 | 372s |
| Cheap model alone (Flash 3.5) | 60% | $1.16 | 360s |
| Prewalk (Opus then Flash) | 78% | $1.46 | 402s |
| Frontier alone (Opus 4.8) | 85% | $2.78 | 606s |
That is 97 percent of Sol’s pass rate at 61 percent of the cost, and 92 percent of Opus’s at 53 percent. Model names are as the publisher gave them and are not independently checked.
The surprising side effect: less looking up the answer
SWE-Bench tasks are bugs that were fixed in public years ago, so a model can search the web for the fix. They measured the share of runs that did:
| Model | Alone | /plan | Prewalk |
|---|---|---|---|
| Opus 4.8 | 44% | 72% | 13% |
| GPT 5.6 Sol | 95% | not shown | 70% |
Their explanation, which they call their “best explanation”, is that cheating is what a capable model does when it gets desperate. Googling started mid run (around turn 12 to 14) once exploration stalled. Prewalk ends the frontier model’s part at a median of about 7 turns, during the confident phase. /plan has no turn limit and asks for a document explaining how the fix should work without testing it against the code, which breeds desperation. The cheap model then inherits a context where the approach already survived contact with the code.
This matters beyond cost. It means benchmark results on public bugs are partly measuring lookup, so any pass rate here carries that doubt.
Lineage: prefill
The article says the idea is old: prefill. Start the assistant’s turn yourself and the model continues as if the words were its own. It was a formatting trick, then a jailbreak technique, and large vendors now block it at the inference layer. What still works is handing a frontier model innocently prefilled turns: exploration that already happened, a todo list half checked off. The feature ships as --prewalk, --prewalk-into <model> or /prewalk in the open source harness omp, and the authors say it should be easy to build elsewhere.
How it fits the vault
- Model Tier Routing routes by task type and cost of a wrong answer. Prewalk routes by phase inside one task, and bases the saving on reading cost rather than thinking cost. They are compatible: tier by task first, then maybe split a single task.
- Pi (Coding Agent) has no plan mode on purpose and uses a
PLAN.mdfile instead. That is a written plan, the same “postcard” the article criticizes, but in Pi the same agent usually continues in the same session, so the context is not discarded. The critique applies to handing a plan to a different, cheaper model, not to keeping a plan file. Pi’s virtual models (a single model entry that routes each request to different real models, see Pi (Coding Agent)) could in principle implement the “switch after first edit” trigger. That is my inference, and nobody has tried it in the vault. - Cursor Planner Worker Judge has workers that take one task from a planner and deliberately ignore the big picture. That is closer to a plan handoff than a trajectory handoff, so the article’s objection to plans would apply there too. Cursor reports no cost data on this, so the vault has no comparison.
- Context Window Management Strategies: prewalk is a deliberate edit of the context (remove one instruction) before reuse, in the spirit of curating what the next model sees.
One caution on caching: a different model does not share the first model’s prompt cache, so the cheap model still pays to read the transferred context once. The article’s savings already include that, but it limits how far the idea scales on very large contexts.
Why this is not proven
- One benchmark, one harness, from the team that built the feature. No independent replication.
- The captured text does not state the number of tasks or any variance, so differences of a few points could be noise.
- Public bugs mean answers can leak into results, and the authors show it happens often.
- The token distribution is described as anecdotal. The cheating explanation is speculation.
- Cheap models differ a lot. The article tested Flash 3.5 and Luna only.
- Real work has no tests as clean as SWE-Bench. A cheap model that finishes quickly can still leave a wrong fix.