[FEATURE] Hook when Claude Code stops to ask user confirmation
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
Problem Statement
Currently, there is no way to hook into interactive confirmation prompts when Claude Code asks the user to proceed. The existing pre_tool_use hooks only trigger for tool calls, not for CLI prompts that ask users to choose between multiple options.
Example Scenario
When Claude Code wants to access a new directory, it stops and shows:
Bash command
ls "C:/Users/XXX/AppData/Local/Microsoft/WinGet/Links/"
Check WinGet links directory
Do you want to proceed?
> 1. Yes
2. Yes, allow reading from Links\ from this project
3. No, and tell Claude what to do differently (esc)
Current limitations:
❌ Cannot hook into this prompt
❌ pre_tool_use hook for AskUserQuestion tool doesn't trigger
❌ pre_tool_use hook for Bash tool triggers for ALL bash calls, not just confirmations
❌ --permission-mode bypassPermissions always chooses option 1, no way to select option 2 or 3 programmatically
Proposed Solution
Add a new hook type: pre_user_prompt or on_confirmation_prompt
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
- Ask Claude to edit the code
- Do other tasks
- Claude asked me to confirm a permission, but I don't know
- Five minutes later, I came back to Claude, but it was still stuck on the bash permission request
Currently, I have a hook that triggers when Claude finishes work, but there’s no hook for when Claude is paused.
Additional Context
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗