fp-check Stop hook with matcher "*" fires on every unrelated session, causing forced LLM turns
Author: GeeksikhSecurityCreated Apr 8, 2026Updated May 18, 2026
Summary
The fp-check plugin's Stop hook in plugins/fp-check/hooks/hooks.json is registered with "matcher": "*", so it runs on every Claude Code session stop — not just sessions that actually used fp-check. This produces a noisy and expensive feedback loop on unrelated sessions.
Reproduction
- Install the
fp-check@trailofbitsplugin via the marketplace. - Start any Claude Code session that has nothing to do with false-positive verification (e.g. a docs edit, an install troubleshooting session, a refactor).
- When the assistant tries to stop, the
Stophook fires and runs the 30-second LLM completeness checker prompt. - The checker (correctly) recognizes the conversation is not about fp-check and tries to return
approveper the prompt's own fallback rule, but the hook still consumes a full agent turn and injects a large block of stop-feedback into the conversation context. - Repeat on every stop attempt — the hook fires again and again, burning context and tokens with no benefit.
Why this is wrong
Stophooks withmatcher: "*"run unconditionally. The completeness check is only meaningful when fp-check was actually used in the session.- The hook prompt itself acknowledges this with the fallback
"If the conversation is not about fp-check verification at all, return 'approve'"— meaning the author knew unrelated sessions would hit it but relied on a self-describing prompt to no-op out. That doesn't prevent the LLM call, the context bloat, or the forced turn. - The companion
SubagentStophook is correctly scoped (it only matters for fp-check subagents), but the top-levelStophook is over-broad.
Suggested fixes (any of)
- Scope the hook to fp-check sessions. Set an environment variable or session marker when the fp-check skill activates and key the matcher off that, instead of
"*". - Move the completeness check out of
Stopand into the skill's own on-completion logic (e.g. as a final required step in the SKILL.md instructions). The skill knows when it's running; the harness doesn't. - Delete the top-level
Stophook entirely. TheSubagentStophook already enforces structured-output completeness on the actual fp-check subagents (data-flow-analyzer,exploitability-verifier,poc-builder), which is where the verification rigor lives. The Stop hook is redundant on top of that and only adds noise on unrelated sessions.
Option 3 is the simplest and loses no real coverage.
Workaround for users hitting this
```bash claude plugin disable fp-check@trailofbits ```
Re-enable only when actively running false-positive verification.
Affected file
`plugins/fp-check/hooks/hooks.json`, lines 4–15 (the `Stop` block).
Environment
- Claude Code (current as of 2026-04-08)
- macOS, fp-check plugin v1.0.0 from the trailofbits marketplace
Source: trailofbits/skills