The capability
What a planner is
A planner is basically the part of an agent that works out, before anything runs, what has to be true when the task is finished and which steps should get there. It writes that down in a form your code can read, and it changes it when a step shows that the world is different from what it assumed.
Let's take the pieces of that definition one at a time, because each one of them turns into code you'll end up writing.
- What has to be true when it's finished. This is the goal, written as checks your code can run at the end, like "the checkout test passes and the test file wasn't edited".
- Which steps should get there. This is a list of steps, where each one is a single tool call with an expected result, plus a note of which steps need another step's output before they can start.
- A form your code can read. In practice that means JSON with a fixed schema, so the harness can run the steps in order, see which ones are done and count what they cost.
- Changes it when a step shows otherwise. This is a replanning rule, and when a step fails it decides whether to retry the step, change the rest of the plan or stop and ask a person.

A planner can't know what's in a file until something reads it, so any plan you write before the first read is partly a guess, and the steps that depend on what that read finds have to either stay vague or get rewritten later. It also doesn't make a model any better at the task it's planning. When Valmeekam and colleagues asked models to write out complete plans for problems like the ones in the International Planning Competition, the best model, which was GPT-4, had "an average success rate of ~12% across the domains" (Valmeekam et al., NeurIPS 2023). The same paper found that plans did a lot better when an external verifier checked them and sent the errors back, and later on Kambhampati's group argued that models "cannot, by themselves, do planning or self-verification" and should be paired with checkers that sit outside the model (Kambhampati et al., 2024). Those were 2023 models working on puzzle domains, and newer ones do better, but the design that follows from it still holds for an agent in a repo, where the model proposes a plan and your code checks each step and the finish.
Why this is a capability of its own
M9 already gave the agent a loop with limits in code, like a cap on model calls and a stop when the same tool call repeats, and M15 built checks that decide whether an output can be used, so what that leaves for a planner is the order the work happens in and the definition of finished. M9's loop decides when to give up and M15's checks judge one output at a time, but neither of them says which step should come next or which steps can run at the same time. Neither one says what the agent should do when step three proves that step one was built on a wrong guess, either.
Those also turn out to be where agents fail most. When Cemri and colleagues labelled 1,642 traces from seven multi-agent frameworks, they found step repetition in 15.7% of them, agents not recognising that the task was finished in 12.4%, and agents failing to follow the task's requirements in 11.8% (Cemri et al., 2025). The paper also says that failing to recognise termination conditions shows up "almost exclusively in failed runs". Each of those is a planning failure, because each one is about which steps to take or about when the task counts as finished.
Where it shows up
- A coding agent's task list, which is the checklist it writes at the start of a bigger change and then ticks off as it goes.
- A research agent that decides which searches to run, which ones can run at the same time, and when it has enough to write the report.
- A data backfill where an agent works out which tables to rebuild and in what order, because some of them depend on others.
- The planning step M10 added to the flower company's support agent, which read only the customer's messages and decided up front which tools the turn was allowed to use.
They all look different, and every one of them keeps a plan somewhere your code can read it and check each step against it.
Keep reading
The rest of this lesson is free with an account
Create a free account to read the remaining 17 sections. It takes about twenty seconds and there's nothing to pay. The same account opens the slide decks and CV reviews.
- 02The checkout test the fixtures didn't fix
- 03A plan is worth writing only when the path isn't known in advance
- 04Turn the request into a goal your code can check
- 05What the planner knows before step one
- 06A step your executor can run
- and 12 more
That's the last one written so far
Pick your next module from the board.
