Skip to content
Crafthall

All agents togetherError

Claude Code hook that never runs: unknown event

Unknown hook event: A key under `hooks` is not a Claude Code hook event, so Claude Code skips its hooks.

Why it matters

Each key under "hooks" must be one of the hook events Claude Code fires. An event name with one wrong letter is skipped with a warning, so the format, test or guard step it should run never happens.

Claude Code skips hooks under an unknown event, so the check or guard they run never happens.

An example that triggers it

A small Claude Code workspace. The marked lines are the ones the check cites.

Before.claude/settings.json
{  "hooks": {    "PostToolUSe": [      { "matcher": "Edit|Write", "hooks": [{ "type": "command", "command": "npx prettier --write ." }] }    ]  }}
Also in the workspace.claude/agents/reviewer.md
---name: reviewerdescription: Reviews a diff. Use after code changes.tools: Read, Grep, Glob---Review the change. Never edit files.

What Crafthall reports

The output of /crafthall:open --report on this example, generated by the plugin's own check when this page was built.

claude › /crafthall:open --report
1. [high] Unknown hook event – .claude/settings.json:3
.claude/settings.json defines hooks for `PostToolUSe`, which is not a hook event; it looks like `PostToolUse`. Claude Code skips these hooks.
Fix: Rename `PostToolUSe` to `PostToolUse`.
Real output on the example above.

How to fix it

Use the exact event name, PostToolUse. Event names are case-sensitive.

After.claude/settings.json
{  "hooks": {    "PostToolUse": [      { "matcher": "Edit|Write", "hooks": [{ "type": "command", "command": "npx prettier --write ." }] }    ]  }}

Run on the fixed workspace, the check reports nothing for this rule.

How the check works

Each key under `hooks` was compared with the hook events of the Claude Code docs (read 2026-11-28); this one is a near-miss. It reads your files with text patterns, on your machine – no model, so the same files give the same result every run.

Check your own agents

Install the free plugin, then run /crafthall:open in your workspace. It runs all checks, not only this one.

claude plugin install crafthall --marketplace crafthall/plugins

All 26 checks