Skip to content

subagent-nudge: debounce per distinct prompt, not once per session (0.15.0)#8

Merged
illinigirl merged 1 commit into
mainfrom
subagent-nudge-per-prompt
Jun 22, 2026
Merged

subagent-nudge: debounce per distinct prompt, not once per session (0.15.0)#8
illinigirl merged 1 commit into
mainfrom
subagent-nudge-per-prompt

Conversation

@illinigirl

Copy link
Copy Markdown
Owner

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.
  • Test rewritten to assert the correct behavior: same prompt → silent; different qualifying prompt, same session → fires.
  • README + version → 0.15.0.

Verification: subagent-nudge 19/19; all 6 hook suites green; ruff clean; manifests valid; claude plugin validate passes.

🤖 Generated with Claude Code

….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
@illinigirl illinigirl merged commit 07c17a0 into main Jun 22, 2026
6 checks passed
@illinigirl illinigirl deleted the subagent-nudge-per-prompt branch June 22, 2026 20:19
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