hooks.json: unquoted ${CLAUDE_PLUGIN_ROOT} breaks on Windows paths with spaces
Summary
Several hooks/hooks.json files reference ${CLAUDE_PLUGIN_ROOT} without wrapping it in double quotes inside the command string. On Windows, when the user's home directory contains a space (e.g. C:\Users\Jane Doe\...), Git Bash word-splits the unquoted variable and the hook fails with:
bash: C:/Users/Jane: No such file or directory
This breaks PreToolUse on core-tools, sdd-tools, and tdd-tools (matcher Write|Edit|Bash), which blocks every Bash/Edit/Write tool call for affected users.
Affected files (as of the installed marketplace + cache copies)
claude/core-tools/hooks/hooks.jsonPreToolUse→auto-approve-da-session.sh
claude/sdd-tools/hooks/hooks.jsonPreToolUse→auto-approve-session.shTaskCompleted→verify-task-completion.shSessionStart→resolve-cross-plugins.sh ${CLAUDE_PLUGIN_ROOT}(two unquoted refs)
claude/tdd-tools/hooks/hooks.jsonPreToolUse→auto-approve-session.shSessionStart→resolve-cross-plugins.sh ${CLAUDE_PLUGIN_ROOT}
claude/dev-tools/hooks/hooks.jsonSessionStart→resolve-cross-plugins.sh ${CLAUDE_PLUGIN_ROOT}
claude/plugin-tools/hooks/hooks.jsonSessionStart→resolve-cross-plugins.sh ${CLAUDE_PLUGIN_ROOT}
Example
Before:
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/auto-approve-da-session.sh"
After:
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/auto-approve-da-session.sh\""
Same fix applies to the resolve-cross-plugins.sh ${CLAUDE_PLUGIN_ROOT} invocations — both the script path and the trailing arg need their own quotes:
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/resolve-cross-plugins.sh\" \"${CLAUDE_PLUGIN_ROOT}\""
Environment
- Windows 11, Git Bash shell (Claude Code default on Windows without WSL)
- Affected whenever the Windows username contains a space (very common — e.g. default "First Last" account names)
Suggested fix
Wrap every ${CLAUDE_PLUGIN_ROOT} reference in command strings across all five hooks.json files in double quotes, as shown above. Applied and verified locally; happy to open a PR with this change if useful.