Notification hook has noticeable delay compared to Stop hook
Resolved 💬 2 comments Opened Feb 5, 2026 by autumnstreet Closed Feb 5, 2026
Description
When using hooks to play notification sounds, the Notification hook (with idle_prompt matcher) has a noticeable delay compared to the Stop hook, even though both use the same command.
Steps to Reproduce
- Configure both hooks in
~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "afplay -v 0.5 ~/.claude/bubble.aiff &",
"async": true
}
]
}
],
"Notification": [
{
"matcher": "idle_prompt|permission_prompt",
"hooks": [
{
"type": "command",
"command": "afplay -v 0.5 ~/.claude/bubble.aiff &",
"async": true
}
]
}
]
}
}
- Run Claude Code and perform a task that completes → Sound plays immediately
- Ask Claude something that triggers a question back (e.g., using
AskUserQuestion) → Sound plays with noticeable delay
Expected Behavior
Both hooks should trigger at approximately the same speed since they use the same async command.
Actual Behavior
Stophook: Sound plays immediately when task completesNotificationhook: Sound plays with a noticeable delay (feels like ~1-2 seconds) when Claude asks a question
Environment
- macOS
- Claude Code CLI
Additional Context
The delay seems to be in when the Notification event is fired internally, not in the sound playback itself (same file, same command, different timing).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗