Skip to content

Fix/linux hook errors#1

Open
jmarianski wants to merge 3 commits into
vignesh07:mainfrom
jmarianski:fix/linux-hook-errors
Open

Fix/linux hook errors#1
jmarianski wants to merge 3 commits into
vignesh07:mainfrom
jmarianski:fix/linux-hook-errors

Conversation

@jmarianski
Copy link
Copy Markdown

Hey, since a while compaction advisor didn't work for me, I've looked into the issues and apparently hooks api has changed. Also there were some issues on linux "UserPromptSubmit hook error" due to "set -euo pipefail" so I commented it out.

…icate hooks

Three bugs causing "hook error" on Linux:

1. hooks/hooks.json: missing "hooks" wrapper object. Claude Code expects
   {"hooks": {"EventName": [...]}} but file had events at top level.

2. scripts/inject_context.sh: set -euo pipefail + stat -f %m (macOS
   syntax first) causes "unbound variable" error on Linux. Fixed:
   remove set -euo, swap stat order (Linux -c %Y first).

3. .claude-plugin/plugin.json: "hooks" field references hooks.json
   explicitly, but hooks/hooks.json is auto-loaded by Claude Code,
   causing "Duplicate hooks file detected" error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant