feat: debounce burst notifications and add quiet mode - #9
Merged
Conversation
Add two config-gated notification throttles that share one cross-process file-backed queue (notify_queue), since there is no resident daemon: - notify_debounce_seconds: when several sessions turn 🔴 at once, the leading edge fires immediately and the rest are merged into a single summary, lazily flushed by the next hook event, TUI poll, or quiet-off. - ring quiet [on | off | DURATION]: temporary global mute; waiting notifications accumulate in the queue and a summary is flushed on release. Both default to off (0 / no quiet file) for backward compatibility. The queue's check-then-act is guarded by fcntl.flock so concurrent hook subprocesses cannot both claim the leading edge. Headless watch also triggers the lazy flush each poll so users with no TUI aren't stuck.
Claude Code emits a Notification with notification_type=agent_needs_input when a background agent stops to ask the user for input. RiNG treated it as idle because the type was not in the action-required set, so the board never flagged it red. Add it (waiting_kind=question) so the session surfaces as waiting-for-you. Also document a known limitation in _promote_codex_permission_wait: some undocumented Claude Code UI guardrails (e.g. the multiple-cd Bash approval) block without firing any hook, so RiNG cannot detect them. The silence-timeout heuristic is deliberately not extended to claude-code because such a state is indistinguishable from normal post-turn idle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add two config-gated notification throttles that share one cross-process
file-backed queue (notify_queue), since there is no resident daemon:
leading edge fires immediately and the rest are merged into a single
summary, lazily flushed by the next hook event, TUI poll, or quiet-off.
notifications accumulate in the queue and a summary is flushed on release.
Both default to off (0 / no quiet file) for backward compatibility. The
queue's check-then-act is guarded by fcntl.flock so concurrent hook
subprocesses cannot both claim the leading edge. Headless watch also
triggers the lazy flush each poll so users with no TUI aren't stuck.