Stop hook does not fire when awaiting AskUserQuestion response
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
The Stop hook does not fire while Claude is waiting for the user to answer an AskUserQuestion call, because AskUserQuestion happens mid-turn. This makes it impossible to trigger external scripts (e.g. notifications, blinking a physical button) at the right moment — before the user responds.
Expected behavior
A hook should fire when Claude is actively waiting for user input, regardless of whether it's waiting for a new turn (Stop) or waiting for an AskUserQuestion response.
Actual behavior
Stopfires only when a full turn ends and Claude returns control to the user's prompt.AskUserQuestionis a mid-turn tool call, soStopnever fires while Claude is waiting for the answer.PreToolUsewith matcherAskUserQuestiondoes not work — the tool name is not exposed to matchers.
Steps to reproduce
- Configure a
Stophook that runs a shell command (e.g.curl -X POST localhost:37999/blink). - Ask Claude something that triggers an
AskUserQuestioncall. - Observe: the hook does not fire while the question is displayed. It only fires after the user answers and Claude finishes processing the response.
Proposed Solution
One of:
- Fire the
Stophook (or a new dedicated hook likeWaitingForInput) whenever Claude is blocked waiting for user input, includingAskUserQuestion. - Expose
AskUserQuestionas a hookable tool name soPreToolUse/PostToolUsematchers can target it.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
I built a Stream Deck plugin that blinks a physical button when Claude needs my attention and focuses VS Code on click. It works well for normal turns via the Stop hook, but misses AskUserQuestion prompts entirely — which are often the most important moments to notify the user.
Additional Context
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗