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.
This commit is contained in:
Bastien Chanot
2026-09-03 02:56:49 +02:00
parent e801b90307
commit 12d7fc1483
+3 -1
View File
@@ -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')