PermissionRequest hook fires for every tool check, not just when actually blocked
Problem
The PermissionRequest hook fires on every tool permission check, even when the tool is auto-allowed and no user interaction is required. This makes it unusable for triggering alerts (sounds, notifications, window focus) that should only fire when Claude is actually blocked and waiting for user input.
Expected Behavior
PermissionRequest hook should only fire when Claude is actually paused and waiting for the user to approve or deny a permission — i.e., when user interaction is genuinely required.
Actual Behavior
PermissionRequest fires continuously for every tool use, regardless of whether the tool is auto-allowed or blocked. This causes any notification tied to this hook (e.g., a sound alert) to trigger repeatedly and unexpectedly throughout normal operation.
Use Case
I wanted to set up an audio notification so that when Claude Code is waiting for permission, a sound plays every 5 seconds to grab my attention (especially useful when working across multiple windows or apps).
settings.json hook config:
"PermissionRequest": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "nohup /path/to/permission_sound.sh &>/dev/null &"
}
]
}
]
This fired constantly during normal tool use, making it unusable.
Suggested Fix
Either:
- Only fire
PermissionRequesthook when the request is actually blocking (user input required), or - Pass a field in the hook's JSON input (e.g.,
"blocked": true/false) so the hook script can decide whether to act
Environment
- OS: macOS Darwin 25.3.0
- Claude Code version: latest
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗