Sub topic 6
Answer Clarifying Questions and Check Assumptions
This chapter assumes you have used a coding agent on a repository, can read a diff, and can run the project's tests. It also assumes you know how to write a planning request that states a goal, constraints, and a no-edits rule. Here you learn what to do when the agent asks questions or lists assumptions, and how to catch the ones it does not mention.
Why questions and assumptions matter
A planning request is never complete. You leave things out because they seem obvious, or because you have not decided them yet. The agent fills each gap in one of two ways:
- It asks you a question.
- It makes an assumption and continues.
Both are useful, but they fail differently. A question costs you a few seconds and blocks nothing important. An unstated assumption costs nothing until the plan is implemented, and then it can cost a rewrite. The goal of this stage is to turn as many silent assumptions as possible into visible ones, and to confirm or correct each visible one before you approve anything.
A clarifying question is a question the agent asks because the answer changes the plan. An assumption is a fact the agent treats as true without having confirmed it. A good plan states its assumptions in a "Risks and assumptions" section, as in the rate-limiting plan from earlier in this tutorial:
### Risks and assumptions
- Assumes a single server process; an in-memory counter is not shared across processes.
- Assumes the client IP is available from the request object.The first assumption in that list is wrong for a project that runs several processes. If you skim past it, the agent builds a limiter that does not work in production. The assumption was visible, and reading it carefully is what saves you.
The two kinds of assumptions
Sort every assumption you meet into one of two groups, because each group needs a different check.
| Kind | Example | How to check |
|---|---|---|
| About the code | "The client IP is available from the request object." | Ask the agent which file and line it read, or look yourself. |
| About your intent | "Failed attempts should be counted per IP, not per account." | Only you can answer. Decide and say so. |
Assumptions about the code can be verified against the repository. The agent may have read the code correctly, or it may have inferred the answer from a similar project. Ask it to show evidence. Assumptions about your intent cannot be verified from the repository at all. The agent is guessing at what you want, and the only correction is your answer.
Invite questions in the request
Agents ask more useful questions when you permit them to. The request in this tutorial ends with a line that does this:
Ask me questions if something is unclear.You can sharpen that line. Two variants work well:
- "Ask me up to five questions before you write the plan. Put the most important one first."
- "If you cannot answer a question by reading the code, ask me. If you can, read the code and do not ask."
The second variant matters because agents sometimes ask questions that the repository already answers, such as "Which test framework do you use?" These waste your time. Telling the agent to read first keeps your attention for questions only you can answer.
Answering questions well
When the agent replies with questions, answer each one directly and number your answers to match. Consider a reply like this:
Before I write the plan, I have three questions:
1. Should a successful login reset the failure counter for that IP?
2. Should the limit apply to the /login endpoint only, or also to /password-reset?
3. Is the current error response format the one in `auth/errors.py`?A useful answer looks like this:
1. Yes, reset the counter on success.
2. /login only. Leave /password-reset alone for now.
3. Yes, use the format in `auth/errors.py`.Three habits make answers more useful:
- Give a decision, not a discussion. "Yes, reset the counter" is easier to plan around than "I think resetting might be fine."
- Add the reason when the decision is not obvious. "/login only, because /password-reset has its own throttle in the mail service" prevents the agent from proposing a duplicate later.
- Say "I don't know" when you do not. The agent can then list the item as an open risk or propose a way to find out. A guessed answer from you is worse than an honest gap, because the agent will treat it as fact.
If a question reveals a decision you have not made, you may need to stop and decide before answering. That is a good outcome. The plan stage exists to surface these decisions while they are cheap to make.
Surfacing assumptions the agent did not state
Agents do not list every assumption. Some are hidden inside a step. To find them, read each step and ask what must be true for it to work. A step like "call the limiter before checking credentials" assumes the route has a single entry point, that credentials are checked in one place, and that the limiter can run before the request body is parsed.
You can also ask the agent directly. This prompt works after the plan is written:
List every assumption this plan makes that you did not verify by reading code.
For each one, say how we could verify it and what changes in the plan if it is false.The last clause is the useful part. It forces the agent to connect each assumption to a consequence, which tells you which assumptions are worth your time. An assumption whose failure changes only a test name needs little attention. One whose failure changes the architecture needs a check now.
Checking a code assumption
Suppose the plan assumes that the client IP comes from the request object. You can check this yourself in a few seconds. This shell command searches a Flask-style project for how the code reads the address:
grep -rn "remote_addr\|X-Forwarded-For" --include="*.py" .If the output shows the app reads X-Forwarded-For, the app sits behind a proxy, and request.remote_addr alone would give the proxy's address for every client. All users would then share one counter, and the limiter would lock everyone out after five failures. The plan assumed something that the code contradicts, and a one-line search found it.
You do not always need to run the search yourself. You can ask the agent to do it in read-only mode:
Search the codebase for how the client IP is currently read. Do not edit anything.
Tell me which file and line, and whether the app runs behind a proxy.The flow of questions and answers
Questions and answers repeat until the open items are resolved. The diagram shows the loop.
Each pass should shrink the list. If the list keeps growing, the goal in your request is probably too broad, and splitting the task is better than continuing.
Common mistakes
- Answering a different question. The agent asks about /login and you answer about the whole auth system. State the scope in the answer.
- Letting the agent answer for you. Some agents propose a default and say "I will assume X unless you object." Silence then counts as agreement. Reply even when you agree, so the record is clear.
- Accepting a plausible assumption. An assumption that sounds reasonable is not a verified one. Check anything the plan depends on.
- Answering in a way that adds scope. "Yes, and also add it to the signup page" turns a clarification into a new feature. Raise new work as a separate task.
- Skipping the questions when the agent asks none. An agent that asks nothing has not necessarily understood everything. It may have assumed everything. Ask for the assumption list.
Recording what you decided
After the clarification round, write the decisions into one place. A short block at the top of the plan works well:
## Decisions
- Counter resets on successful login.
- Applies to /login only.
- Client IP is read from X-Forwarded-For; the proxy is trusted.
- Limit values live in the existing config file.This block does two jobs. It gives the agent a stable reference during implementation, so it does not drift back to its original guesses. It also gives you a checklist for the final review, where you compare the diff against these decisions.
Summary of the practice
- Invite questions, and tell the agent to read the code before asking about it.
- Answer with decisions, reasons, and honest "I don't know" replies.
- Separate assumptions about code, which you verify, from assumptions about intent, which you decide.
- Ask the agent to list unverified assumptions and what changes if each is false.
- Confirm that corrections appear in the revised plan.
- Record decisions in the plan.
Exercise
An agent's plan says "Assumes the app has a single database connection pool." You are not sure whether that is true. Name two things you can do before approving the plan, and say which kind of assumption this is.
Show answer
This is an assumption about the code, so it can be verified. First, search the repository yourself, for example with grep for where connections or pools are created, or ask the agent in read-only mode to show the file and line that creates the pool. Second, ask the agent what changes in the plan if the assumption is false. If you still cannot tell, reply "I don't know" and ask for it to be listed as an open risk with a way to verify it, rather than guessing an answer.
Exercise
The agent asks, "Should failed attempts be counted per IP or per account?" Your request already said "per IP address." What does this tell you, and how should you respond?
Show answer
The agent may have missed or misread the constraint, or the question may show that the plan could drift from your request. Answer directly and restate the decision: "Per IP address, as stated in the request. Do not count per account." Then check that the revised plan counts by IP in every step and in the test list.