It's quite frustrating to come back to a coding agent after a while only to see that it needed user input only 10 seconds into the task.
You can set up notification hooks Show archive.org snapshot to trigger a Desktop notification (or similar) whenever the Claude Code agent halts.
This is my configuration:
# ~/.claude/notify.sh
# Note: You need to `chmod +x` this
#!/bin/bash
INPUT=$(cat)
TITLE=$(echo "$INPUT" | jq -r '.title // "Claude Code"')
MSG=$(echo "$INPUT" | jq -r '.message // "Needs your input"')
notify-send "$TITLE" "$MSG" --icon=dialog-question
# ~/.claude/settings.json
{
"hooks": {
"Notification": [
{
"matcher": "permission_prompt|elicitation_dialog",
"hooks": [
{
"type": "command",
"command": "bash ~/.claude/notify.sh"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "notify-send 'Claude Code' 'Finished its current task' --icon=dialog-information
}
]
}
]
},
}
Posted by Michael Leimstädtner to makandra dev (2026-03-27 14:11)