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.
Lidnight stops runaway spend, silent approval stalls, and unexpected limit hits while you step away. Track Claude Code, Codex, Antigravity, Gemini and Kiro sessions, limits and cost, approve from your phone, and keep going with the lid closed.
Lidnight is a Mac app, so it can't be installed on this device. Open this address on your Mac to download it.
Copied. Paste it on your Mac to open it.
Couldn't copy. Tap the address below to select it, then copy.
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. If the hook doesn't fire, check these in order.
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 › AI setup 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 free trial of everything in Pro (14 days or 5 lid-closed runs of 10+ minutes, whichever comes first), no payment details needed. Pro is a one-time payment (1 Mac $9.99 · 3 Macs $14.99 USD, plus regional tax) with a 14-day full refund, no questions asked.
Lidnight is a Mac app, so it can't be installed on this device. Open this address on your Mac to download it.
Copied. Paste it on your Mac to open it.
Couldn't copy. Tap the address below to select it, then copy.