Topic 3 of 5 · 3 min read
Letting the agent interview you first
Goal: Use an assumptions-and-questions step to catch a wrong reading of a task before any code is written.
Before the agent writes code on an unclear task, ask it to list its assumptions and its questions, answer them, and only then let it build.
Check yourself · 1 of 3
What is the purpose of asking an agent for its assumptions before it codes?
Why it matters
A coding agent rarely says "I do not understand". It fills the gaps with plausible guesses and produces a tidy diff for the wrong task. You find the wrong reading in review, after the agent has spent minutes writing, and you must throw most of it away. An interview step moves that discovery to the start, where a correction costs one sentence.
How to do it
- Ask for the plan, not the code. "Do not write any code yet. Read the relevant files, then list your assumptions and up to five questions."
- Ask for the specific kinds of gap. Behaviour at the edges, which of two similar modules is meant, what to do with existing data, what counts as done.
- Answer in writing, in the same thread. Short, numbered answers. "1. Yes, soft-delete. 2. Keep old rows. 3. Use
AuditLog, not a new table." - Then say go. "Now implement, following these answers." Many tools have a plan mode for exactly this: Claude Code's plan mode, Copilot's plan step, and similar features in Cursor and Codex. The habit works in any chat.
- Skip it for small, clear tasks. Renaming a variable does not need an interview. Use it when the task touches data, several modules or unclear behaviour.
Before and after
Weak:
Add a way for users to delete their account.
Better:
We need account deletion. Do not write code yet.
Read src/models/user.ts and src/routes/account.ts, then reply with:
1. What you assume about what "delete" means (hard delete, soft delete, anonymise).
2. What you assume about the user's orders and invoices.
3. Up to five questions you need answered before you start.
The agent might reply that it assumed hard delete and was about to cascade into the orders table. You answer: "Anonymise the user, keep orders for tax records." A wrong, destructive change never gets written.
What goes wrong
- Questions the code could answer. If the agent asks what framework you use, tell it to read the repository first and ask only what the code cannot say.
- Skipping the answers. Replying "whatever you think" gives the agent back the guess you wanted to remove.
- Endless interviews. Cap the questions (five is plenty) and let the agent list the remaining unknowns as assumptions.
- Forgetting the answers later. Put the decisions in the task description or a notes file, so a long session or a new one still has them.
Examples
The interview prompt
Instruction: Do not write code yet. Read src/jobs/ and tell me: your assumptions about how retries should work, what happens to jobs that fail permanently, and up to five questions.
Agent reply (summary): Assumes three retries with fixed delay; asks whether failed jobs go to a dead-letter queue and whether the retry count is configurable.
Answering and releasing
Reply: 1. Exponential backoff, not fixed. 2. Yes, dead-letter queue in src/jobs/dead.ts. 3. Count comes from config. Go ahead and implement.
Three short answers replaced what would have been a rewrite.
Key points
- Agents guess instead of saying they are confused, so ask them to list assumptions and questions first.
- Say plainly that no code is to be written until you reply.
- Ask about edge behaviour, data handling, which module is meant and what done means.
- Answer in short numbered replies, then tell the agent to go.
- Cap the questions, skip the step for small clear tasks and record the answers where later sessions can find them.
Common mistakes
- Asking the agent to "ask if unsure" without saying to stop before coding, so it asks and builds in the same turn.
- Answering with "use your judgement", which returns the unresolved guess to the agent.
- Running a long interview for a trivial task, which wastes time for no gain.
- Not recording the answers, so a later session repeats the same wrong assumption.
Check yourself · 2 of 3
Which wording makes the agent stop and ask rather than keep going?
Check yourself · 3 of 3
For which task is an assumptions-and-questions step least worth it?
Practice items, not counted towards your mastery.
Start here
- Best practices for Claude Code (Claude Code docs) (opens in a new tab)DocsFree
A vendor's own advice: give the agent a way to verify its work, name files and explore before coding.
- Best practices for using GitHub Copilot (opens in a new tab)DocsFree
Guidance on writing clear prompts, breaking tasks down and giving context to a coding assistant.
- AGENTS.md (opens in a new tab)DocsFree
The open convention for a standing instruction file that coding agents read before each task.
More for this topic
- Here's how I use LLMs to help me write code (Simon Willison) (opens in a new tab)ArticleFree
A practitioner's notes on context, clear instructions and always testing what the model produces.