Defined in hooks/hooks.json
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash hooks/scripts/session-end.sh"
}
],
"matcher": ""
}
],
"PreCompact": [
{
"hooks": [
{
"type": "prompt",
"prompt": "⚠️ Context compaction is about to occur. This means the context window is getting full and older messages will be summarized to save space. Important context may be lost. Current recommendations:\n\n1. Review what's currently in context with /context\n2. Save any important information you want to preserve\n3. Consider starting a new session if this is a critical point\n4. The compaction will proceed automatically\n\nBe brief in your response - just acknowledge and suggest if this is a good breaking point."
},
{
"type": "command",
"command": "bash hooks/scripts/pre-compact-warn.sh"
}
],
"matcher": ""
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "bash hooks/scripts/post-tool-track.sh"
},
{
"type": "command",
"command": "bash hooks/scripts/context-knowledge-tracker.sh"
},
{
"type": "command",
"command": "bash hooks/scripts/smart-prune-check.sh"
}
],
"matcher": "Write|Edit|Read|Glob|Grep|Bash|Task"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash hooks/scripts/session-start.sh"
}
],
"matcher": ""
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"prompt": 1,
"command": 6
},
"eventStats": {
"Stop": 1,
"PreCompact": 2,
"PostToolUse": 3,
"SessionStart": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 6
}
}