Skip to main content
Version: 0.56.6

CC-HK-002: Prompt or Agent Hook on Wrong Event

Summary​

  • Rule ID: CC-HK-002
  • Severity: HIGH
  • Category: Claude Hooks
  • Normative Level: MUST
  • Auto-Fix: No
  • Verified On: 2026-10-04

Applicability​

  • Tool: claude-code
  • Version Range: unspecified
  • Spec Revision: unspecified

Evidence Sources​

Test Coverage Metadata​

  • Unit tests: true
  • Fixture tests: true
  • E2E tests: false

Examples​

The following examples demonstrate what triggers this rule and how to fix it.

Invalid​

{
"hooks": {
"SessionStart": [
{
"hooks": [
{ "type": "prompt", "prompt": "Check session start", "timeout": 30 }
]
}
]
}
}

Valid​

{
"hooks": {
"PostToolBatch": [
{
"hooks": [
{ "type": "prompt", "prompt": "Review the completed tool batch: $ARGUMENTS", "timeout": 30 }
]
}
]
}
}