Hook
Notify when Claude finishes
Fires a desktop notification when Claude stops — so you can switch tasks during a long run and get pulled back when it's done.
Install to
settings.json → hooks.Stop {
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "if command -v osascript >/dev/null; then osascript -e 'display notification \"Claude finished\" with title \"Claude Code\" sound name \"Glass\"'; elif command -v notify-send >/dev/null; then notify-send \"Claude Code\" \"Claude finished\"; fi"
}
]
}
]
}
}{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "if command -v osascript >/dev/null; then osascript -e 'display notification \"Claude finished\" with title \"Claude Code\" sound name \"Glass\"'; elif command -v notify-send >/dev/null; then notify-send \"Claude Code\" \"Claude finished\"; fi"
}
]
}
]
}
} How to install
- Open your settings file:
~/.claude/settings.json(user),.claude/settings.json(project, shared), or.claude/settings.local.json(project, private). - Merge the
hooksblock into it. If ahookskey already exists, add this event to it rather than replacing the whole object. - Hooks live-reload — no restart needed in most cases.
- Verify: run
/debugto confirm the hook is registered, then trigger the event (e.g. edit a file) and watch it fire. - This hook relies on
jqreading the event JSON from stdin — make surejqis installed.