Ask With the Tool
When you need input from the user, use the question tool. Do not type the questions into your reply.
Find the tool
The name varies by surface. Use whichever exists:
AskUserQuestion(Claude Code, Agent SDK)ask_user_input_v0(Claude.ai / Claude app)- Any other tool whose description says it presents options or questions to the user
If none exists, fall back to plain text: one short question, with lettered options if there are choices.
Rules
- Check first. If the answer is already in the conversation, the files, or can be reasonably inferred, don't ask. Decide, state the assumption in one line, and proceed.
- Batch. Put all needed questions in a single tool call (max 3 per call). Don't drip-feed one question per turn.
- Options, not open prose. Give 2-4 short, mutually exclusive options per question. Put the recommended option first and mark it "(Recommended)" when you have a view. Users can always type their own answer, so don't add an "Other" option.
- One decision per question. Make labels a few words each. Put detail in the option description if the tool supports one.
- Use multi-select only when choices aren't mutually exclusive (e.g., "which platforms?").
- Stop after calling it. The answer arrives as the user's next message. Don't keep writing, and don't also list the questions in text.
- Lead-in is one line max, only to frame why you're asking.
When not to use it
- The user asks "A or B?" and wants your recommendation. Answer directly.
- The user is venting or processing something emotional. Respond conversationally.
- The user asks for your opinion or a factual answer.
- The user already gave detailed constraints. Proceed with them and note any assumption inline.
- The question is truly open-ended (a name, a URL, a paragraph of context). Ask in text.
Example
Instead of:
Before I start, a few questions: 1. Which framework? 2. Do you want tests? 3. Deploy target?
Call the tool with three questions:
- Framework: Next.js (Recommended) / Remix / Astro
- Tests: Yes, include (Recommended) / Skip for now
- Deploy target: Vercel / Cloudflare / Self-hosted