subagent-nudge: debounce per distinct prompt, not once per session (0.15.0)#8
Merged
Merged
Conversation
….15.0) Bug: the nudge's job is to flag ANY parallelizable request, but a once-per- session cap silenced it after the first broad prompt — so every later parallelizable task went unflagged. The session cap conflated noise-control with fire-once; the conservative triggers are the real noise control. Fix: debounce on a hash of the prompt. Each DISTINCT qualifying prompt fires; resubmitting the same prompt won't re-fire. Test updated to assert the new behavior (same prompt -> silent; different qualifying prompt same session -> fires). Docstring + README + version 0.14.0 -> 0.15.0. Verified: subagent-nudge 19/19; all 6 hook suites green; ruff clean; manifests valid; claude plugin validate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D6pwpBdoug4tJRxxVrNNeL
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.
Bug (caught by reasoning purpose-vs-mechanism): the subagent-nudge's job is to flag any request that would benefit from delegation — but it was debounced once per session, so after the first broad prompt it went silent and every later parallelizable task went unflagged. The session cap conflated noise control with fire-once; the conservative triggers are the real noise control.
Fix: debounce on a hash of the prompt instead. Each distinct qualifying prompt fires; resubmitting the same prompt won't re-fire. Annoyance case handled, purpose restored.
subagent-nudge/hook.py:already_nudged(session_id)→already_nudged(session_id, prompt)(dedup on prompt fingerprint); docstring updated.Verification: subagent-nudge 19/19; all 6 hook suites green; ruff clean; manifests valid;
claude plugin validatepasses.🤖 Generated with Claude Code