Claude Code · tool · fg-0491

Plugin hook fails with 'No such file or directory' when the install path contains a space

If you see /bin/sh: /Users/Jane: No such file or directory, the cause and the fix for Claude Code are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
/bin/sh: /Users/Jane: No such file or directoryThe hook works for most users and fails for anyone whose home folder name has a spaceWindows profile paths such as C:\Users\Redux Gamer break the hook
Cause
In a shell-form hook command the substituted ${CLAUDE_PLUGIN_ROOT} path is split by the shell at spaces when the variable is not quoted. Requests to quote it automatically were closed as not planned.
Fix
Wrap the variable itself in double quotes inside the command string, or use exec form with args so each path is one argument. claude plugin validate warns about an unquoted variable.
Apply
"command": "\"${CLAUDE_PLUGIN_ROOT}\"/scripts/process.sh"
Affected
Claude Code plugins with shell-form hooks, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun