From 12d7fc1483abab73e90c86ce738830caa448a784 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Thu, 3 Sep 2026 02:56:49 +0200 Subject: [PATCH] fix(hooks): stay silent on events that need no attention Only turn end and the moments needing the user should signal. Any other event reaching the hook, such as agent_completed or auth_success, now exits without emitting, so a subagent finishing rings nothing even if the Notification matcher is ignored. --- hooks/notify-attention.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hooks/notify-attention.sh b/hooks/notify-attention.sh index e931e21..09fec73 100755 --- a/hooks/notify-attention.sh +++ b/hooks/notify-attention.sh @@ -33,7 +33,9 @@ case "$event" in agent_needs_input) label="Asks you a question" ;; idle_prompt) label="Waiting for you" ;; elicitation_dialog|elicitation_url_dialog) label="Needs your input" ;; - *) label="Needs your attention" ;; + # anything else (agent_completed, auth_success, quota_*) stays silent: + # signal only for turn end and moments needing the user. + *) exit 0 ;; esac detail=$(read_field '.message')