Repository navigation
fix: quote ${CLAUDE_PLUGIN_ROOT} in plugin hook commands - #79644
Open
rahulrshetty45 wants to merge 1 commit into
Open
rahulrshetty45 wants to merge 1 commit into
rahulrshetty45 wants to merge 1 commit into
Conversation
On macOS the plugin root resolves under ~/Library/Application Support/, which contains a space. The unquoted path in these hooks.json commands word-splits, so the hook script is never found and the hook fails -- blocking every tool for hookify's PreToolUse hook, and failing silently for the SessionStart/Stop hooks. Quote the interpolated path, matching the pattern security-guidance already uses.
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #78490
On macOS the plugin root resolves under
~/Library/Application Support/…, which contains a space. Several bundled plugins interpolate${CLAUDE_PLUGIN_ROOT}unquoted into theirhooks.jsoncommands, so the shell word-splits on the space, never finds the script, and the hook fails:hookify— the broken command is onPreToolUse, which blocks every tool call.learning-output-style,explanatory-output-style(SessionStart) andralph-wiggum(Stop) fail silently.This quotes the interpolated path in all four
hooks.jsonfiles, matching the patternsecurity-guidancealready uses (bash "${CLAUDE_PLUGIN_ROOT}/…"). JSON validity confirmed after the change.Reproduced with a space in the path: unquoted exits 127 (
No such file or directory); quoted runs the script.