4 min read

되묻기를 하는 클로드 코드 - AskUserQuestion 툴

모든 LLM이 알아서 되물어주면 좋겠습니다.

저는 현 시점 가장 효과적인 프롬프팅 테크닉을 하나만 꼽자면 '되묻게 하기'라고 생각합니다. 자연어가 가진 근본적 불명확성 때문이기도 하고, 타인이 물어봐줄 때 비로소 생각나는 것들이 있기 때문입니다.

그래서 저는, 예를 들어 딥 리서치를 돌릴 때 하단에 꼭 이런 문구를 넣곤 합니다.

- 리서치 응답의 하단에는 "불확실성 지도"를 추가해줘. 이 지도에는 네가 가장 덜 자신있는 부분, 지나치게 단순화했을 수 있는 부분, 그리고 어떤 질문이나 추가 정보가 네 의견을 바꿀 수 있을지를 포함해줘.
- 이 리서치를 더 유용하게 만드는 데 있어서 아직 정보가 불충분한 부분이 있다면 리서치하기 전에 내게 질문해줘. 예를 들어 나의 Jobs to be done이 무엇인가? 라거나.

그런데 지난 10월 18일, 클로드 코드 2.0.21 버전에서 반가운 변화가 생겼습니다. Interactive Question Tool(공식 명칭은 AskUserQuestion)이 추가된 건데요. 즉 클로드 코드가 유저의 쿼리가 불명확하다고 느꼈거나, valid한 응답이 여러 개 존재할 때 몇가지 선택지를 제시하게 됐습니다.

클로드 코드의 다른 인터널 툴들과 마찬가지로, 첨부한 이미지와 같이 툴을 명시하면(e.g., AskUserQuestion Tool을 사용하라) 이 효과를 쉽게 누릴 수 있습니다. 바로 써보시길 추천드립니다.

클로드 코드의 Plan 모드에서도 AskUserQuestion은 잘 적용됩니다. Claude Code의 Internal Tool Implementation 유출본에 따르면, ambiguity가 존재할 때는 플랜 모드가 종료되기 전에 AskUserQuestion 툴을 사용해 유저에게 의견을 물어보게 되어 있습니다.

클로드 코드의 다른 Tool들은 어떻게 생겼는지도 살펴보시면 흥미로우니, 관심 있으신 분들은 위 링크에 가보시길 권합니다.

참고로 저는 클로드 코드 자체에게 "interactive question tool"을 잘 쓰는 방법을 물어보면서 툴의 실제 명칭 및 플랜 모드에서의 사용법을 알게 됐고, 그렇게 알게 된 툴 이름들로 구글링하다가 이 유출본도 찾을 수 있었습니다.

실제 질문과 답변도 첨부해두었습니다.

How does your new interactive question tool work?

The AskUserQuestion tool lets me ask you 1-4 questions during execution to gather your preferences, clarify requirements, or get decisions on implementation choices. Here's how it works:

Key Features:

  • Each question shows 2-4 predefined options for you to choose from
  • You can always select "Other" to provide custom text input
  • Questions can allow single selection (default) or multiple selections via multiSelect: true
  • Each option includes a label and description to explain the choice

Structure:

  • question: The full question I'm asking
  • header: A short label (max 12 chars) displayed as a tag
  • options: 2-4 choices with labels and descriptions
  • multiSelect: Whether you can pick multiple options

Example Use Cases:

  • "Which authentication method should we use?" (OAuth, JWT, Session-based)
  • "What library should we use for date formatting?" (date-fns, dayjs, Luxon)
  • "Which features do you want to enable?" (with multiSelect for multiple choices)

I use this when there are multiple valid approaches or unclear requirements, so I can get your input before proceeding rather than making assumptions. It's especially helpful for architectural decisions, library choices, or feature priorities.

Would you like to see a demonstration of how it works?

How does it work combining with plan mode? For example, does it ask before start planning?

Great question! The interaction between AskUserQuestion and plan mode depends on when clarification is needed:

Before Planning:

If there are ambiguities that would fundamentally affect the plan itself, I should use AskUserQuestion to clarify BEFORE creating the plan. This ensures the plan I present is actually aligned with what you want.

Example:

  • User: "Help me add authentication to my app"
  • Assistant: [Uses AskUserQuestion to ask about auth method - OAuth, JWT, etc.]
  • User: [Selects JWT]
  • Assistant: [Uses TodoWrite to create plan based on JWT approach]
  • Assistant: [Uses ExitPlanMode with the plan]

During Planning:

If the requirements are clear enough to create a plan but there are implementation details to decide, I can:

  1. Create the plan with the ambiguity noted
  2. Use AskUserQuestion to clarify before exiting plan mode
  3. Update the plan if needed based on your answers

After Plan Approval:
Once you approve the plan and we're executing, I can use AskUserQuestion for decisions that come up during implementation.

The Key Rule:
According to the ExitPlanMode tool instructions: "Before using this tool, ensure your plan is clear and unambiguous. If there are multiple valid approaches or unclear requirements, use the AskUserQuestion tool to clarify with the user first."

So yes, for fundamental ambiguities, I should ask questions before finalizing the plan rather than presenting a plan with major assumptions baked in.