Skip to content

Notify only when Claude is waiting on you (drop per-turn Stop flood) - #12

Merged
oz6un merged 1 commit into
mainfrom
feat/notify-only-when-waiting
Jul 20, 2026
Merged

Notify only when Claude is waiting on you (drop per-turn Stop flood)#12
oz6un merged 1 commit into
mainfrom
feat/notify-only-when-waiting

Conversation

@oz6un

@oz6un oz6un commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Why

The hook pushed on the Stop event, which fires once per turn — so a single autonomous multi-step task (implement → PR → CI → merge) produced 5-10 pushes, when the user only needs the one "over to you" moment. Per the current hooks docs, Stop has no field distinguishing "done, waiting for you" from "stopped mid-workflow, resuming," so it can't be filtered — the only fix is to stop using it.

What

Notify only when Claude is genuinely waiting on you or a turn errored:

  • Drop the Stop hook — the source of the per-turn flood.
  • Keep Notification, which carries idle_prompt (Claude handed control back and is idle waiting for your next prompt — the real "your turn" signal; it self-filters intermediate autonomous stops) and permission_prompt. The script now reads notification_type and denylists the pure-noise sub-types (auth_success, elicitation_complete, elicitation_response). Denylist (not allowlist) so a missing/renamed field fails loud (still pushes) rather than silently swallowing every alert.
  • Keep StopFailure (API errors).
  • Health monitor unchanged — it was already silent (0 failed units, disk 52%), only speaks on real trouble.

Verified

Event-matrix tested on the box with a stubbed curl (no phone spam): idle_prompt/permission_prompt/missing-type/StopFailure → push; auth_success/elicitation_response/Stop → silent. Then one real idle_prompt push confirmed end-to-end delivery. make check green; box script == rendered repo template (parity verified). README daily-use corrected (it claimed a ping "when it finishes").

🤖 Generated with Claude Code

The hook fired on Stop (once per turn), so an autonomous multi-step task
produced 5-10 pushes when only the final 'over to you' matters. Stop has no
field distinguishing done-waiting from stopped-mid-workflow (per hooks docs),
so it's unfilterable — dropped it. Notification's idle_prompt is the real
'handed control back' signal and self-filters intermediate stops; the script
now reads notification_type and denylists pure-noise sub-types (auth_success,
elicitation_*). Denylist, not allowlist, so a missing field fails loud not
silent. StopFailure kept. Event matrix + one real push verified on the box.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oz6un
oz6un merged commit 8a67711 into main Jul 20, 2026
1 check passed
@oz6un
oz6un deleted the feat/notify-only-when-waiting branch July 20, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant