Get notified when Claude Code finishes a task, wherever you are.
Claude Code runs in a terminal. If you're on your phone, in another app, or away from your desk, you miss when it's done. You end up checking back constantly or forgetting entirely.
A simple notification script that Claude Code calls at the end of tasks. Two layers:
- Local: macOS sound (the Zelda treasure chest sound, because why not)
- Remote: push notification via Pushover (arrives on your phone)
#!/bin/bash
# Claude Code notification: sound + push
source ~/.claude/secrets/pushover.env
MESSAGE="${1:-Task done!}"
# Play a sound (macOS)
afplay ~/.claude/sounds/treasure.wav 2>/dev/null &
# Send push notification via Pushover
curl -s \
-F "token=${PUSHOVER_TOKEN}" \
-F "user=${PUSHOVER_USER}" \
-F "message=${MESSAGE}" \
-F "title=Claude Code" \
-F "sound=gamelan" \
https://api.pushover.net/1/messages.json > /dev/null 2>&1#!/bin/zsh
# macOS-only: native notification + beep
osascript -e "display notification \"$1\" with title \"Claude Code\" sound name \"Glass\""
osascript -e 'beep 3'
echo "[$(date)] TASK DONE: $1" >> ~/.claude/logs/notifications.logThis one uses macOS native notifications which sync to iPhone via iCloud (if Handoff/Continuity is enabled).
- Install Pushover on your phone ($5 one-time)
- Create an application in the Pushover dashboard
- Create the secrets file:
cat > ~/.claude/secrets/pushover.env << 'EOF'
PUSHOVER_TOKEN=your_app_token
PUSHOVER_USER=your_user_key
EOFReplace the push notification part with a Telegram API call:
curl -s "https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage" \
-d "chat_id=${CHAT_ID}" \
-d "text=${MESSAGE}" > /dev/null 2>&1Just use notify-task-done.sh which requires nothing external.
In CLAUDE.md, the notification preference is declared:
## Preferences
- Notification on task completion: `~/.claude/scripts/notify.sh 'message'`Claude Code then calls it via bash when finishing significant work:
~/.claude/scripts/notify.sh "Build complete, all tests passing"Put any .wav or .mp3 file in ~/.claude/sounds/ and reference it in the script. The Zelda treasure chest sound is a satisfying choice for completed tasks. Find it on the internet, it's everywhere.