Claude Code · tool · fg-0492

Plugin hooks never fire because hooks.json lacks the top-level "hooks" key

If you see Plugin is enabled but none of its hooks run, the cause and the fix for Claude Code are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Plugin is enabled but none of its hooks runA hooks file that starts with {"PostToolUse": [...]} fails to load
Cause
A hooks file, including the plugin's hooks/hooks.json, must wrap the event map in a top-level "hooks" key, and a bare event map fails to load. Inline hooks inside plugin.json are the opposite: the event map with no wrapper.
Fix
Wrap the event map in a hooks key, then run claude plugin validate on the plugin folder.
Apply
{ "hooks": { "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [ { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT}\"/scripts/format.sh" } ] } ] } }
Affected
Claude Code plugins, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun