Skip to content

docs: HOOKS_TUTORIAL.md has relative paths and wrong config keys #1037

@tehw0lf

Description

@tehw0lf

Problem

examples/HOOKS_TUTORIAL.md has two issues that cause silent hook failures:

  1. 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/....

  2. matcher on PreCompact — The PreCompact hook entry has a matcher: "" key which is only valid for Stop hooks. PreCompact does not use a matcher.

  3. Missing timeouthooks/README.md specifies "timeout": 30 but the tutorial omits it.

  4. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions