Planning
Phase 2: Plan / Orchestrate
Grounding gives the agent facts. It does not decide the shape of the change. After grounding, the agent may know the middleware pattern, the product constraint, and the existing tests. It still does not know which trade-off you want, which cleanup is out of scope, or which boundary must not move. Start execution there, and those choices get made inside the diff.
Planning is the pause between knowing and doing. A plan does two jobs, and they are not the same job.
It decomposes the work. The plan cuts the task into units, and each unit carries its input, its output, and the signal that proves it done. This job needs no judge. It pays off by holding the agent inside a bounded unit and by exposing units that can run at once.
It gates the run. The plan is accepted before any code exists, so the wrong shape is rejected while changing it is still cheap. This job is worth exactly what its reviewer is worth: reviewers agree only moderately on what is risky, and upfront plan approval in one study constrained unplanned actions but left unlisted safeguards unaddressed and inhibited scrutiny later in the run.1 A plan nobody judges is not a weak gate — it is not a gate at all.
Methodology
A plan gate is an approved execution contract
Take a small, everyday change: add a promo-code field to checkout. The scope is the part only you can settle — where the field goes, whether codes stack with other offers, and what an invalid code does, with the existing pricing rules as a boundary that must not move. The unit is the part reality can check — one field on one page, proven by a test that a valid code applies and a bad one is rejected. Predicting the later steps spends plan length on work the agent should do in the code.
The price of planning
A plan is also text that enters the window before any execution step. It cuts both ways.
It holds the goal present. A stated objective keeps generation pointed at the same target, so the run drifts less as it grows long.
It displaces what comes after it. Grounding and reasoning already filled part of the window; the plan lands on top and stays, so the work still to come sits behind it. Let the plan grow, and execution moves into the middle of a long context, where recall is weakest (long-context recall falls as input grows). Both effects scale with size, so keep the restatement short and faithful, expand only the next unit, and retrieve the rest when the work needs it.
When a plan earns its keep
Planning costs tokens, latency, and a commitment to a shape you have not validated. Three conditions pay that back.
The task is long enough that an early mistake compounds. On a two-line change, planning is overhead. On a chain where each step depends on the one before it, a wrong first move does not stay local — everything built on it inherits the error. Lookahead is the payoff: the agent sees the shape before it commits.
The work splits into units you can check or run independently. A unit with its own verification signal contains a failure instead of letting it spread through the run, and independent units can run at once.2
A judge can read the plan, and its answer has to be right. Two things must hold.
The plan must reach the judge in a form it can read. Compile the claim into the shape of a check: a test runs code, a type checker reads a signature, a constraint predicate reads what the plan asserts. None of them read a sentence. "One field on checkout, with a test for a valid and an expired code" gives a check something to run; "pricing rules must not move" gives it nothing until you bind that line to a predicate (no change under pricing/) or a question (does this change pricing rules? yes or no). That binding is your work, and it comes first — prose-to-formal translation is the weak link, with reported semantic correctness between 24% and 35%.3
When the check is a judgment and not a fact — is this scope creep, is this step reversible — declare questions over the plan state and let a typed decision model answer them with probabilities: a question a person can read, an answer the code can branch on, a confidence you can threshold. Scorers are easy to fool by deletion, and a typed-state gate refused release for all 26 omission-optimized routes — refusal, not a better score, is the behaviour you want from a gate.4
The answer must predict whether the work succeeds. A judge that passes almost anything is worse than no judge: generate ten plans and it picks the one that reads best, not the one that works, so the extra attempts buy confidence instead of correctness.5 Switch verification off, and a planning agent's success rate falls 12.9 points.6 The gain lives in the check, not in the plan: a plan is only as good as its checker. LLM Judges works through the choice.
When to skip planning
Invert those conditions, and the same tests say when to skip.
No judge, no gate. Letting the planner judge its own plan is the common autonomous-loop mistake. Self-critique without an external signal does not fix a bad plan — it collapses performance, because the model cannot separate its errors from its preferences.7 The wider evidence is one-sided: models struggle to self-correct without external feedback, and sometimes degrade after trying.8 A plan that neither decomposes the work nor reaches a credible judge spends context and buys nothing, so one-shot the task instead and keep the whole of it in front of the model.
A plan held past its usefulness. A plan is a bet on how the task will unfold. Hold it after the environment contradicts it, and the bet becomes sunk cost: the agent defends the plan instead of revising it, and an early, hard-to-reverse choice is amplified for the rest of the run.9 Past a point that moves with task difficulty, more planning also stops helping and starts hurting — the curve bends down the same way it does for reasoning length.10 Keep the plan provisional, and re-plan on what the run learns.
A judge nobody audited. A gate is an instrument, and instruments drift. Verdicts shift with the model version behind them and grow more permissive as agents grow more capable, and a panel that shares evidence shares its blind spots.11 Verifier errors leave no trace inside the loop, so sample the gate's decisions against what actually shipped (LLM Judges).12
One plan split across agents that cannot see each other. Handing pieces of a plan to parallel sub-agents looks like scale. It usually fragments the implicit decisions — style, boundaries, naming — into work no one downstream can reconcile.13 Delegation is for independent threads, not for a plan you have not made consistent.
On small, obvious work, planning is pure overhead.14
Planning is complete when…
Two questions decide it.
Can a judge read the plan, and is that judge credible? If a test, a predicate, or a declared question can reject the plan, the gate buys early rejection of bad directions. If nothing outside the planner can judge it, there is no gate to buy — keep the plan as decomposition, or skip it.
Is the plan cheap to revise? If adapting costs a step, the plan is a scaffold. If adapting means starting over, the plan is a trap.
When both hold, gate early and re-plan on every verdict. When neither holds, skip planning and one-shot the task. Measured directly, always planning degrades long-horizon performance and never planning limits it, so the optimum sits in the middle, chosen per task.15
Placement matters as much as frequency. Models tend to pour their thinking into the first turn and then assemble the plan with none left; moving the reasoning to the decision points — after a tool returns, before the plan is fixed — is where the payoff is.6
Planning is complete when execution can begin from a stated contract — judged where a judge exists — instead of an unresolved conversation. Task sizing and phase-boundary review belong to Shaping the Work and Human Checkpoints.