Sub topic 9
Approve explicitly before any edits
This chapter assumes you can read a diff, run your project's tests, and have already reviewed and revised a plan as described in the earlier chapters. It covers the point where a plan becomes permission to change code: the approval gate.
Why approval needs its own step
A plan review ends with a judgment, and the agent cannot see it. You may think "this looks fine" while the agent is still waiting for input. Or you may write "sounds good, but maybe use Redis" and the agent may read that as a go-ahead. Both cases cause trouble. In the first, nothing happens and you lose time. In the second, the agent edits files based on a plan you had not finished correcting.
An approval gate is a deliberate, unambiguous message that moves the session from planning to implementation. Until that message arrives, the agent treats the task as read-only. After it arrives, the agent works within the scope you named.
The gate has three jobs:
- It marks which version of the plan you approved, so you can compare the result against that version later.
- It sets the scope of permission: all steps, some steps, or only the first one.
- It gives you a clear point to stop. If the agent edits files before the gate, the process failed, and you know to intervene.
What makes an approval message explicit
A good approval message has four properties.
- It is unmistakable. It contains a word the agent cannot confuse with discussion, such as "Approved."
- It names the plan. If the conversation held several versions, say which one: "Approved: the revised plan with the Redis counter."
- It sets the scope. Say how much work the approval covers.
- It sets the stopping point. Tell the agent when to stop and what to show you.
Compare these two messages.
Looks good, go ahead.Approved: the revised plan (Redis counter, limits in the config file). Implement step 1 only, then stop and show me the diff and the test results before moving to step 2.The first leaves open how much to do, which version to use, and when to report back. An agent could reasonably implement all three steps and commit. The second leaves no such room.
Conditional approval
Sometimes the plan is nearly right. You can approve with conditions, but keep the conditions short and testable. If a condition would change the plan's files or steps, revise the plan instead.
Approved for step 1, with one condition: if the existing config loader cannot read a new key without changes, stop and tell me instead of modifying the loader.This works because the condition describes a specific situation and a specific action: stop and report. A vague condition such as "be careful with the config" gives the agent nothing to act on.
Ambiguous phrases to avoid
Some phrases feel like approval to you but are ambiguous to an agent, or to you later when you reread the transcript.
| Phrase | Problem | Better |
|---|---|---|
| "Sounds good" | Could be a comment, not a command | "Approved." |
| "Go ahead and fix it" | No scope, no plan version | "Approved: steps 1 and 2 of the current plan." |
| "Yes, but use Redis" | Mixes approval with a plan change | Revise first, then approve the new plan |
| "Do whatever you think is best" | Hands over the scope decision | Name the steps you approve |
| "Continue" | Unclear what is being continued | "Approved: step 2 only." |
The "Yes, but" case matters most. If your reply contains a change request, the plan is not final. Ask for the revision, read the new plan, and then approve. The earlier example reflects this: "Please update the plan. Do not edit any files until I reply 'approved'." That sentence reserves the word "approved" as the trigger. You are the only one who uses it.
Keep the no-edits rule active until the gate
The no-edits rule from your planning request remains in force through every revision round. Agents can drift: after you answer a clarifying question, an agent might start editing because the answer seemed to resolve the last blocker. If you see edits before approval, stop the agent, then check the diff.
git status
git diffIf the agent changed files, you have two options. You can discard the changes with git restore . if you are sure nothing else in your working tree needs to stay, or you can keep them on a separate branch for reference. Checking git status first matters because git restore . discards uncommitted work you made yourself. A cleaner habit is to start planning sessions on a clean working tree, so any change that appears is the agent's.
Scope the approval to a step
Approving the whole plan at once is tempting when the plan looks right. The cost shows up later. If step 2 has a bug and step 3 builds on it, you now review three steps of code that all depend on a mistake.
Approving one step at a time keeps each review small. The approval message names the step and defines what "done" means for that step:
Approved. Implement step 1 only, then stop and show me the diff and the test results before moving to step 2.The details of running steps are in the next chapter. For now, the key point is that scope belongs in the approval message. The agent should not infer it.
Whole-plan approval is reasonable in some cases:
- The plan has only one or two steps.
- The steps are mechanical, such as renaming a symbol across files.
- Each step is covered by existing tests that you will run at the end.
Even then, ask the agent to run the tests and report before it makes any further change outside the plan.
Handle plan changes during implementation
Plans are written before the agent has changed anything, so implementation sometimes shows the plan was wrong. A function may not exist, or a test may depend on behavior the plan overlooked. Decide in advance how the agent should handle this, and put the rule in the approval message:
Approved. Implement step 1 only. If you find that the plan is wrong or incomplete, stop and describe the problem. Do not change the plan on your own and do not work around it.This keeps the approved plan meaningful. If the agent silently changes the approach, your approval covered something other than what it did. The final comparison against the plan, covered in a later chapter, will also be harder, because the plan and the code no longer match.
When the agent reports a problem, you have two choices. You can ask for a revised plan and approve again, which restarts the gate for the changed part. Or you can answer the question and tell the agent to proceed within the original approval, if the answer does not change files or steps. Use the first choice whenever the list of files, the order of steps, or the assumptions change.
Record the approval
Because the approval defines what you are checking against later, keep a record of it. In a long session, the approved plan may scroll far up the transcript, and later sessions will not have it at all. Two low-cost habits help:
- Ask the agent to save the approved plan to a file, such as
docs/plans/login-rate-limit.md, and commit it or keep it untracked next to the work. Only do this after approval, and say so: "Approved. First, save the approved plan todocs/plans/login-rate-limit.md. Do not edit any other file yet." - Put the plan version in your commit message, for example "Add Redis-backed login limiter (plan step 1)."
Saving the plan is itself an edit, so it needs the same permission as any other. Giving that permission in the approval message keeps the rule consistent: no file changes happen unless the message allows them.
A complete approval exchange
Here is the full sequence from review to approval, using the login rate-limit example.
Review feedback (you):
The plan looks good with two changes:
- Use the shared Redis client instead of an in-memory counter, since we run several processes.
- Add the limit values to the existing config file instead of hard-coding them.
Please update the plan. Do not edit any files until I reply "approved".The agent returns a revised plan. You read it, check that both changes appear, and check that no new files or steps were added without explanation. Then you send:
Approved: the revised plan. Implement step 1 only, then stop and show me the diff and the test results before moving to step 2. If the plan turns out to be wrong, stop and tell me instead of changing it.The exchange has two distinct messages. The first requests a change and keeps the gate closed. The second opens the gate for a defined amount of work. Keeping them separate prevents the "Yes, but" ambiguity.
Summary of the gate
- Approve in a separate message from any change request.
- Name the plan version, the scope, and the stopping point.
- Prefer approving one step at a time.
- Tell the agent what to do if the plan proves wrong: stop and report.
- Grant permission for any file change, including saving the plan, explicitly.
Exercise
You review a plan and reply: "Yes, looks good, but use the shared config file for the limits instead of hard-coding them. Go ahead." Name two problems with this message, then rewrite it as two messages that keep the approval gate clear. The plan has three steps, and you want to review each step's diff before the next one begins.
Show answer
Problem 1: the message mixes a plan change (use the config file) with approval, so the agent may implement the old plan, or its own reading of the new one, before you have seen a revised plan. Problem 2: "Go ahead" gives no scope or stopping point, so the agent may implement all three steps in one go. Rewrite as two messages. First: "Please update the plan to read the limits from the existing config file instead of hard-coding them. Do not edit any files until I reply 'approved'." After reviewing the revised plan: "Approved: the revised plan. Implement step 1 only, then stop and show me the diff and the test results before moving to step 2. If the plan turns out to be wrong, stop and tell me instead of changing it."
Exercise
During step 1 of an approved plan, the agent finds that the config loader cannot read new keys without being modified, which the plan did not list. What should the approval message have told the agent to do, and what should you do when it reports the problem?
Show answer
The approval message should have told the agent to stop and describe the problem, not to modify the loader or work around it. When the agent reports it, you should ask for a revised plan that includes the loader change, because the list of files has changed. Review that revision and send a new approval for it. Letting the agent continue under the old approval would mean the work no longer matches the plan you approved.