← notes

Two deduplication windows, because the idle notice arrives late

Sep 11, 2026

A notifier for agent sessions cannot use one dedupe window. A finished turn and a permission prompt do not arrive on the same clock.

The premise is small. Watch a coding agent session, and send a message when it needs a person: a permission request, a dialog, a subagent decision, a finished turn. About 1,100 lines of POSIX shell, with curl the only dependency.

One deduplication window looked obviously right until the timings came out. Claude Code raises its idle notification about sixty seconds after a turn ends. A window short enough to let a permission request through duplicates every completion, and a window long enough to collapse the completions swallows the permission request that follows one. They are not the same event and they cannot share a window. Blocking events dedupe at twenty seconds, finished turns at ninety.

The installer had its own version of that. Hook entries merge across settings files rather than replacing each other, so a machine with an older notifier still configured gets both banners and counts every install twice.

The doctor command writes a heartbeat now, because reading the config back only proves the config is there. Configured and working are different claims, and a notifier that is quietly not sending is the failure it exists to prevent.