Problem
examples/HOOKS_TUTORIAL.md has two issues that cause silent hook failures:
-
Relative paths — ./hooks/mempal_save_hook.sh does not work when hooks are configured globally in ~/.claude/settings.local.json. Claude Code resolves hook commands from the working directory at fire time, not from the mempalace repo root. hooks/README.md already documents this correctly with /absolute/path/to/hooks/....
-
matcher on PreCompact — The PreCompact hook entry has a matcher: "" key which is only valid for Stop hooks. PreCompact does not use a matcher.
-
Missing timeout — hooks/README.md specifies "timeout": 30 but the tutorial omits it.
-
Wrong target file — The tutorial says "add to your configuration file" without specifying which one (~/.claude/settings.local.json for global, .claude/settings.local.json for project-scoped).
Problem
examples/HOOKS_TUTORIAL.mdhas two issues that cause silent hook failures:Relative paths —
./hooks/mempal_save_hook.shdoes not work when hooks are configured globally in~/.claude/settings.local.json. Claude Code resolves hook commands from the working directory at fire time, not from the mempalace repo root.hooks/README.mdalready documents this correctly with/absolute/path/to/hooks/....matcheronPreCompact— ThePreCompacthook entry has amatcher: ""key which is only valid forStophooks.PreCompactdoes not use a matcher.Missing
timeout—hooks/README.mdspecifies"timeout": 30but the tutorial omits it.Wrong target file — The tutorial says "add to your configuration file" without specifying which one (
~/.claude/settings.local.jsonfor global,.claude/settings.local.jsonfor project-scoped).