[BUG] AskUserQuestion prompts fire Notification hook as notification_type=permission_prompt instead of a question-specific type
What's Wrong?
AskUserQuestion prompts fire the Notification hook with notification_type: "permission_prompt" and the generic message "Claude needs your permission" — identical to a real tool-approval dialog. There's nothing about a permission being requested; it's a plain multiple-choice question, but the hook payload gives no way to tell the two apart.
This is reproducible and confirmed via the hook payload itself, not just the on-screen UI. I added temporary logging to my Notification hook command to dump the raw JSON on every fire:
raw=$(cat); printf '%s | %s\n' "$(date -Is)" "$raw" >> ~/.claude/notif-debug.log; echo "$raw" | jq ...
A real tool-permission dialog logs:
{"hook_event_name":"Notification","message":"Claude needs your permission","notification_type":"permission_prompt"}
Calling AskUserQuestion (plain multiple-choice, no tool permission involved) logs the exact same shape, at the moment the question dialog appears:
{"hook_event_name":"Notification","message":"Claude needs your permission","notification_type":"permission_prompt"}
Same notification_type, same message, no title field to disambiguate. Both are indistinguishable from the hook's side, and the message text is actively misleading for the question case since no permission is being requested.
Related prior reports
- #16102 reported this same symptom (a
permission_promptfiring alongside/around anAskUserQuestiondialog, with no visible permission UI) and got several "still happening" confirmations, but was auto-closed for inactivity and is now locked, so I couldn't add this reproduction there directly. - #13830 originally requested a dedicated notification type for
AskUserQuestion(back when it fired no Notification event at all), listingpermission_prompt/idle_prompt/elicitation_dialog/auth_successas the existing types. It looks likeAskUserQuestionsupport was added since then, but by reusingpermission_promptrather than adding the requested dedicated type — and there's already an unusedelicitation_dialogtype (pluselicitation_complete/elicitation_response) in the notification-type set that seems like the intended fit for "waiting on a user response to a question."
Why this matters
Anyone using the Notification hook to drive an OS-level notification (e.g. notify-send) — the documented, intended use of this hook — gets a notification that says "Claude needs your permission" every time a plain question is asked, which is misleading and makes it impossible to route/word question-notifications differently from permission-notifications without inspecting session state out-of-band.
Expected Behavior
AskUserQuestion should fire with its own distinct notification_type (e.g. the existing but apparently unused elicitation_dialog), or at least a distinct message, rather than being folded into permission_prompt.
Steps to Reproduce
- Add a
Notificationhook that logs the raw stdin JSON, e.g.:
``json``
{
"hooks": {
"Notification": [{
"matcher": "agent_needs_input|idle_prompt|permission_prompt|agent_completed",
"hooks": [{ "type": "command", "command": "cat >> ~/.claude/notif-debug.log" }]
}]
}
}
- Trigger a real tool-permission prompt (e.g. run a Bash command requiring approval). Note the logged
notification_type. - Have Claude call
AskUserQuestionwith any simple multiple-choice question. Note the loggednotification_type. - Compare — both are
permission_promptwith message"Claude needs your permission".
Environment
- Claude Code v2.1.200
- OS: Linux (KDE Plasma, Wayland)
- Terminal: Konsole
- Installed via native installer
🤖 Generated with Claude Code
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗