Conversation
…-agent spawns - pre-bash nudge re-arms on a 15-min cooldown (RINGER_NUDGE_COOLDOWN_SECONDS overridable) instead of a permanent once-per-session marker - pre-bash also triggers on CLI agent spawns: claude -p/--print, codex exec, opencode run, aider (plain 'claude --version' stays silent) - post-edit re-nudges every 8 edits after the 8-edit/3-file threshold instead of nudging exactly once; last_nudged_count tracked in session state - tests: 4 new cases; all 13 pass Requested by Mihai 2026-07-11 (fix b of a/b/c: main agent grinding inline). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Why
Two gaps in the nudge hook, both found by it failing to fire when it mattered.
It fired once per session. The marker file is keyed on
(session_id, event), so the first nudge in a long session was also the last. But a long session is exactly where routing drift happens: the tenth time you catch yourself about to do delegable work by hand is at least as worth catching as the first, and by then the hook has been silent for hours. A guard whose whole job is to interrupt a habit cannot retire after one interruption.It didn't see CLI-agent spawns. The pre-bash matcher missed the shapes that most reliably indicate work routing around Ringer — invoking another coding agent directly from a shell. That is the single clearest tell that a task is about to be done unverified and invisibly, and it was the one case going unremarked.
What this changes
Tests
tests/test_nudge_hook.pygains coverage for both: that a second occurrence in the same session still nudges (the behaviour that was silently absent), and that the widened matcher fires on agent-spawn command shapes.13 nudge-hook tests pass; full suite green on this branch: 259 passed.
🤖 Generated with Claude Code