Sub topic 6
Answer Clarifying Questions and Check Assumptions
This chapter assumes you can run a coding agent on a repository, read a diff, and run the project's tests. It also assumes you have already written a planning request that forbids edits. Here you learn what to do when the agent answers with questions, and how to check the assumptions it states.
Why the agent asks
After reading the code, the agent often finds gaps that the code cannot fill. Examples are the expected behavior at an edge case, a deployment detail, or a choice between two valid designs. A good agent stops and asks instead of guessing. The last line of the planning request, "Ask me questions if something is unclear," invites this.
A question costs you one short reply. A wrong guess can cost a whole rewritten plan, or a diff you have to throw away.
Two kinds of output to check
The agent gives you two things to review before it finishes the plan:
- Clarifying questions. These are gaps the agent knows about. You fill them in.
- Stated assumptions. These are gaps the agent filled itself. You must check them, because the agent may not know they are wrong.
Assumptions are the riskier of the two. A question gets your attention. An assumption reads like a fact and is easy to skim past.
Answering questions well
Suppose the agent replies to the /login request with this:
Before I finish the plan:
1. Should a successful login reset the failure count for that IP?
2. Is the app ever behind a proxy or load balancer? That changes how I read the client IP.
3. Should blocked requests return 429 or the existing 401 format?Answer each question by its number, and keep the answers short and specific:
1. Yes, reset on success.
2. Yes, we sit behind a load balancer. Use the X-Forwarded-For header.
3. Return 429, but keep the existing JSON error body.If you do not know an answer, say so and let the agent propose options. Do not invent an answer to move things along.
Checking assumptions
Read the "Risks and assumptions" section line by line. For each assumption, ask whether it is true for this project. For example, the sample plan assumes a single server process. If you run several processes, an in-memory counter silently fails to enforce the limit. The plan looks fine and the feature does not work.
You can find wrong assumptions in three ways:
- Compare each one against what you know about the deployment.
- Ask the agent which file or line supports it.
- Ask: "Which assumptions are you least sure about?"
Option 2 separates assumptions the agent verified in the code from ones it guessed. This prompt does both at once:
List every assumption in the plan. For each one, say whether you confirmed it in the code or guessed it. Do not edit any files.Common mistakes
- Answering with "whatever you think is best" on a question that affects behavior. The agent then guesses, and you are back to an unstated assumption.
- Approving the plan without reading the assumptions section.
- Answering a question in chat but not asking for the plan to be updated. Confirm that the revised plan reflects your answers.
Exercise
A plan says "Assumes the client IP is available from the request object." Your service runs behind a reverse proxy. What do you do, and why?
Show answer
Treat it as a wrong assumption and correct it before approving. Behind a proxy, the request object usually shows the proxy's address, so every client would share one counter. Tell the agent which header carries the real client IP and ask for a revised plan that uses it.
Exercise
How can you tell whether an assumption in a plan was checked in the code or only guessed?
Show answer
Ask the agent to mark each assumption as confirmed in the code, with the file, or guessed. Treat the guessed ones as the first things to verify yourself.