fix(fp-check): remove top-level Stop hook to stop firing on unrelated sessions (#143)#165
fix(fp-check): remove top-level Stop hook to stop firing on unrelated sessions (#143)#165remiforall wants to merge 1 commit into
Conversation
… sessions
The Stop hook in plugins/fp-check/hooks/hooks.json was registered with
matcher "*", so it fired on every Claude Code session stop — including
sessions that had nothing to do with fp-check verification. This burned
a full 30-second LLM turn on every unrelated stop and polluted the
parent context with stop-feedback blocks.
The hook's own fallback rule ("if the conversation is not about
fp-check verification at all, return 'approve'") did not prevent the
issue: the hook still fired, the model still ran, the turn was still
consumed — just to discover that it should no-op.
The companion SubagentStop hook stays. It is the right place to enforce
structured-output completeness, because it only matches actual fp-check
subagents (data-flow-analyzer, exploitability-verifier, poc-builder)
and never fires on unrelated sessions. Verification rigor is preserved
at the level where it is actionable.
Closes trailofbits#143.
|
|
|
@remiforall can you please sign the CLA so that this PR can move along? |
|
Thanks for digging into #143 and confirming the repro, @remiforall — the diagnosis here is spot-on. Closing in favor of #188, which fixes the same issue at the root cause. Rather than deleting the top-level Your issue analysis directly shaped the fix — much appreciated. |
Summary
Closes #143.
The
Stophook inplugins/fp-check/hooks/hooks.jsonis registered with"matcher": "*", so it fires on every Claude Code session stop — including sessions that have nothing to do with fp-check verification. This burns a full 30-second LLM turn on every unrelated stop and pollutes the parent context with stop-feedback blocks.The hook's own fallback rule (
"If the conversation is not about fp-check verification at all, return 'approve'") does not prevent the issue: the hook still fires, the model still runs, the turn is still consumed — just to discover that it should no-op.Fix
Removes the top-level
Stophook entirely (option 3 of three workarounds discussed in #143).The companion
SubagentStophook stays. It is the right place to enforce structured-output completeness, because it only matches actual fp-check subagents (data-flow-analyzer,exploitability-verifier,poc-builder) and never fires on unrelated sessions. Verification rigor is preserved at the level where it is actionable.Impact
SubagentStopcontinues to enforce phase-output completeness on every fp-check subagent.Stop.1.0.0to1.0.1(per repo CLAUDE.md guidance: substantive change to hook behavior).Validation
CODEOWNERS unchanged (
/plugins/fp-check/ @ahpaleus @dguido).Test plan