fix: use record format for self-improving-agent hooks.json

Claude Code expects hooks as a record keyed by event name, not an array.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Reza Rezvani
2026-03-06 09:19:33 +01:00
parent a46d3b0b37
commit 88eb7b27e2

View File

@@ -1,11 +1,15 @@
{
"hooks": [
{
"name": "error-capture",
"event": "PostToolUse",
"matcher": "Bash",
"command": "./hooks/error-capture.sh",
"description": "Detects command failures and appends structured entries to auto-memory. Zero overhead on successful commands."
}
]
"hooks": {
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "./hooks/error-capture.sh"
}
]
}
]
}
}