This guide explains how to set up desktop notifications, sound alerts, and tab indicators when Claude Code finishes responding and needs your input.
Since Ghostty doesn't support Claude Code's built-in iTerm2-specific notifications, we use a custom hook-based approach with macOS native notifications.
Create ~/.claude/notify-on-stop.sh:
#!/bin/bash
# Send bell to the current TTY to trigger tab decoration
printf '\a' > /dev/tty
# Notify when Claude finishes a task and is waiting for input
osascript -e 'display notification "Claude has finished and needs your input" with title "Claude Code" sound name "Submarine"'
exit 0Make it executable:
chmod +x ~/.claude/notify-on-stop.shAdd to ~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "/Users/YOUR_USERNAME/.claude/notify-on-stop.sh"
}
]
}
]
}
}Note: Replace YOUR_USERNAME with your actual username, or use $HOME/.claude/notify-on-stop.sh.
Create or edit ~/.config/ghostty/config:
# Enable desktop notifications when commands finish in the background
desktop-notifications = true
# Enable shell integration (needed for notifications)
shell-integration = detect
shell-integration-features = cursor,sudo,title
# Visual bell for tab indicators
window-decoration = true
- Go to System Settings > Notifications
- Find Ghostty in the list
- Enable notifications for Ghostty
Exit and restart your Claude Code session for the hooks to take effect.
Once configured, you'll receive three types of alerts when Claude finishes and needs input:
- ✅ macOS notification popup - System notification with message
- ✅ Sound alert - "Submarine" sound (customizable)
- ✅ Ghostty tab decoration - Visual indicator on the tab header
Edit the script and replace "Submarine" with any macOS system sound:
- "Glass"
- "Ping"
- "Pop"
- "Purr"
- "Hero"
- etc.
View available sounds: System Settings > Sound > Sound Effects
Remove sound name "Submarine" from the osascript command in the notification script.
Remove the printf '\a' > /dev/tty line from the notification script.
No notifications appearing:
- Check macOS notification permissions for Ghostty
- Verify the hook is in
~/.claude/settings.json - Restart Claude Code session
No sound:
- Check System Settings > Sound > Sound Effects volume
- Verify the sound name is correct (case-sensitive)
No tab decoration:
- Ensure
window-decoration = truein Ghostty config - Reload Ghostty config with
Cmd+Shift+,or restart Ghostty
Script not executable:
chmod +x ~/.claude/notify-on-stop.sh- Claude Code finishes a response and enters "Stop" state
- The
Stophook triggers and runs the notification script - The script sends a bell character to the terminal (triggers tab decoration)
- The script sends a macOS notification with sound
- You're alerted via popup, sound, and visual tab indicator