Get notified when Claude Code finishes or needs you
Stop babysitting the terminal. The do-it-yourself hook, and how to get it on your phone too.
Do it yourself with hooks
Claude Code can run a command when a task ends (Stop) and when it is waiting for your input or permission (Notification). Put this in ~/.claude/settings.json to get a macOS notification:
{
"hooks": {
"Stop": [{ "hooks": [{ "type": "command",
"command": "osascript -e 'display notification \"Claude Code finished\" with title \"Claude Code\"'" }] }],
"Notification": [{ "hooks": [{ "type": "command",
"command": "osascript -e 'display notification \"Claude Code needs you\" with title \"Claude Code\"'" }] }]
}
}If you already have a settings file, merge just the hooks key. It applies to sessions started afterwards.
Alert only when it's waiting on you
Notification fires for several reasons. Split them by the hook input's notification_type: the ones that mean you're truly blocking the session are permission_prompt, elicitation_dialog (MCP questions) and agent_needs_input. idle_prompt arrives about a minute after a turn ends, so it's really a second “finished”.
# Notification hook command: alert only when the session is blocked
jq -e '.notification_type | IN("permission_prompt","elicitation_dialog","agent_needs_input")' >/dev/null \
&& osascript -e 'display notification "Waiting on you" with title "Claude Code" sound name "Ping"'With many sessions running, “done” and “waiting on you” stop looking the same. Keep the quiet “finished” alert on Stop.
Where that falls short
You only see it at your Mac, you still have to go back to the terminal to see what needs approval, and if the Mac sleeps the work stops anyway.
With Lidnight
Turn on Claude Code in Settings › Agents and Lidnight installs the hooks for you (your settings are backed up first), then tells you when a task ends or needs approval. Approval requests show what Claude wants to do, and you can allow or deny right from the notification, the menu bar or the bunny next to the notch.
With Pro you get them on your phone and can answer there, and the Mac stays awake with the lid closed meanwhile. More on phone approvals
Try Lidnight free
Apple Silicon Macs · macOS 13 or later. Every download includes a 7-day trial of everything in Pro, no payment details needed. Pro is a one-time payment (1 Mac $9.99 · 3 Macs $14.99, 50% off through Oct 31) with a 14-day refund.