Answer: In your canUseTool callback, detect when toolName equals AskUserQuestion, display the questions from the questions array to the user, collect their selections, then return an answers object where each key is the question text and each value is the selected option's label, passing through the original questions array. Status: Confirmed Entry: tool/claude-code/agents-and-automation/handle-clarifying-questions Revision: 2 Digest: sha256:0519f3944181a4bb (changes whenever the content changes) Timeline: Created: 2026-11-13T03:03:09Z Last changed: 2026-11-20T12:17:45Z (Free-text option: — → Other) Last verified: 2026-11-20T12:17:45Z Next check: 2026-11-21T12:17:45Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Detection | AskUserQuestion | [1] | 2026-11-20 Answers key | question | [1] | 2026-11-20 Answers value | label | [1] | 2026-11-20 Multi-select handling | array of labels | [1] | 2026-11-20 Required passthrough | questions | [1] | 2026-11-20 Free-text option | Other | [1] | 2026-11-20 Sources: [1] Anthropic. "Handle approvals and user input". https://code.claude.com/docs/en/agent-sdk/user-input.md Role: primary. Accessed: 2026-11-20T12:17:45Z Quote: "In your callback, check if `toolName` equals `AskUserQuestion` to handle it differently from other tools" (Supports: Detection) Quote: "Build the `answers` object as a record where each key is the `question` text and each value is the selected option's `label`" (Supports: Answers key) Quote: "each value is the selected option's `label`" (Supports: Answers value) Quote: "For multi-select questions, pass an array of labels or join them with `", "`." (Supports: Multi-select handling) Quote: "Pass through the original questions array (required for tool processing)" (Supports: Required passthrough) Quote: "Display an additional "Other" choice after Claude's options that accepts text input" (Supports: Free-text option) Published: 2026-11-20T10:36:09Z Snapshot SHA-256: 50a580fade961f7d832dab7a75b3e86418492b184e6773b148448ba5bcdba1fe (captured 2026-11-20T12:17:44Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:17:45Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:17:45Z Last attempt: 2026-11-20T12:17:45Z Notes and limitations: Extracted automatically from a single official source (section "Handle clarifying questions"). Related: https://latestn.com/tool/claude-code/agents-and-automation/handle-tool-approval-requests How do I handle tool approval requests from Claude Code in my SDK application? https://latestn.com/tool/claude-code/agents-and-automation/hook-exit-codes What exit codes do Claude Code hooks use and what does exit code 2 do? https://latestn.com/tool/claude-code/agents-and-automation/hook-matcher-patterns How do matcher patterns work for Claude Code hooks, including matching MCP tools? https://latestn.com/tool/claude-code/agents-and-automation/fork-session How do I fork a Claude Code SDK session to explore alternative approaches? https://latestn.com/tool/claude-code/agents-and-automation/free-text-input-responses How do I support free-text input for Claude Code clarifying question responses? https://latestn.com/tool/claude-code/agents-and-automation/goal-evaluation How does Claude Code evaluate whether a goal is met, and what happens when a turn fails? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:17:45Z | changed | Free-text option: — → Other | [1] 2026-11-20T12:17:45Z | changed | Required passthrough: — → questions | [1] 2026-11-20T12:17:45Z | changed | Multi-select handling: — → array of labels | [1] 2026-11-20T12:17:45Z | changed | Answers value: — → label | [1] 2026-11-20T12:17:45Z | changed | Answers key: — → question | [1] 2026-11-20T12:17:45Z | changed | Detection: — → AskUserQuestion | [1] 2026-11-20T12:17:45Z | changed | free-text option: Other → — | [1] 2026-11-20T12:17:45Z | changed | detection: AskUserQuestion → — | [1] 2026-11-20T12:17:45Z | changed | questions field: Pass through the original questions array (required for tool processing) → — | [1] 2026-11-20T12:17:45Z | changed | answers value: label → — | [1] 2026-11-20T12:17:45Z | changed | answers key: question → — | [1] 2026-11-13T03:03:09Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/handle-clarifying-questions/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/agents-and-automation/handle-clarifying-questions POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/handle-clarifying-questions with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/handle-clarifying-questions?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I present Claude Code's clarifying questions and return the user's answers to the SDK? Revision 2, last verified 2026-11-20T12:17:45Z. https://latestn.com/tool/claude-code/agents-and-automation/handle-clarifying-questions (accessed 2026-11-21T10:06:21Z). @misc{LatestN_tool_claude_code_agents_and_automation_handle_clarifying_questions_r2, title = {How do I present Claude Code's clarifying questions and return the user's answers to the SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/handle-clarifying-questions}}, note = {Revision 2; digest sha256:0519f3944181a4bb; last verified 2026-11-20T12:17:45Z; accessed 2026-11-21T10:06:21Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/agents-and-automation/handle-clarifying-questions