---
id: "plan-then-execute"
title: "Plan, checkpoint, then execute"
creator: null
url: "https://skillissue.dev/patterns/plan-then-execute.html"
level: null
category: "Agent harness"
models: null
source_date: null
date_added: null
---

# Plan, checkpoint, then execute

Have the agent propose a plan and stop. Approve or correct it before any changes are made.

## Problem


When an agent plans and executes in one go, a wrong early assumption turns into many files of wrong work. Correcting direction after the fact costs far more than correcting it before.


## Pattern


Split the run into two phases with a hard stop in between:

1. **Plan:** the agent reads the relevant code, then writes a numbered plan: files to touch, approach, risks, open questions. It makes no changes.
2. **Checkpoint:** you review the plan. Fix misunderstandings, answer questions, cut scope.
3. **Execute:** the agent follows the approved plan, step by step, and flags any deviation instead of improvising silently.

Saving the plan to a file also gives you something to resume from if the session ends.


## Template


```
Phase 1 – plan only. Do not edit any files or run state-changing commands.

Read what you need, then reply with:
1. Your understanding of the task in 2–3 sentences.
2. Files you will create/modify/delete, one line each with the reason.
3. Step-by-step plan (numbered, each step small enough to verify).
4. Risks and how you'll check for them.
5. Open questions (if any, ask them and stop).

Save this plan to `PLAN.md`, then wait for my "approved".

Phase 2 – after approval
Execute the plan in order. After each step, tick it off in PLAN.md.
If you need to deviate from the plan, stop and explain before doing it.
```


## When not to use it


- Small, well-understood edits where the plan would be the diff.
- Fully automated pipelines with no human in the loop. Use an automated plan check (a reviewer step or rules) instead of a human checkpoint.


Further reading: [Anthropic engineering: Building effective agents](https://www.anthropic.com/engineering/building-effective-agents)
