fix(hooks): unquoted ${CLAUDE_PLUGIN_ROOT} in hooks.json breaks all hooks on Windows usernames with a space
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- bash
- Área
- tooling
Línea de trabajo
Comienza en hooks/hooks.json e inspecciona las seis entradas de comando que invocan scripts bajo ${CLAUDE_PLUGIN_ROOT}. Verifica la forma del comando entre comillas o la alternativa exec/args con una ruta de Git Bash que contenga un espacio, como /c/Users/First Last. Se considera terminado cuando cada hook se inicia correctamente en Windows sin dividir la ruta del plugin.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- OS: Windows 11 Pro (build 26200)
- Warp:
v0.2026.05.20.09.21.stable_03 - Claude Code
warpplugin: 2.1.0 - Hook subprocess shell: Git Bash / MSYS (
bash) - Windows username contains a space:
Michael Avila→ home isC:\Users\Michael Avila
Summary
Every hook event fails before the script even runs, because the hook commands in hooks/hooks.json reference the script path unquoted. When the user's home path contains a space (very common on Windows, e.g. First Last), bash word-splits the path and tries to execute the first fragment.
This is a distinct, earlier failure from the /dev/tty / OSC 777 delivery problem tracked in #32, #36, #48 and #54 — those assume the script runs but can't deliver the notification. Here the script never starts, so notifications can't possibly work and Claude Code surfaces a hook error on every tool call. The space-in-username angle was already noted by @MillhioreBT in a comment on #32, but it isn't tracked as its own issue or diagnosed/fixed.
Actual behavior
On every hook event (most visibly PostToolUse), Claude Code shows:
PostToolUse:Read hook error
Failed with non-blocking status code: bash: /c/Users/Michael: No such file or directory
Because the PostToolUse hook has no matcher, it fires after every tool (Read, Edit, Bash, MCP calls, etc.), so the error repeats continuously.
Root cause
hooks/hooks.json (plugin 2.1.0) defines all six hooks like this:
{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-post-tool-use.sh" }
Claude Code runs the command through bash. On this machine CLAUDE_PLUGIN_ROOT expands to:
/c/Users/Michael Avila/.claude/plugins/cache/claude-code-warp/warp/2.1.0
Unquoted, bash splits on the space in Michael Avila, treats /c/Users/Michael as the command and Avila/.../on-post-tool-use.sh as an argument → No such file or directory.
Minimal repro:
PR="/c/Users/First Last/.claude/plugins/cache/claude-code-warp/warp/2.1.0"
# current (unquoted) — breaks:
bash -c "${PR}/scripts/on-post-tool-use.sh"
# bash: /c/Users/First: No such file or directory
# quoted — works:
bash -c "\"${PR}/scripts/on-post-tool-use.sh\""
Steps to reproduce
- On Windows, use an account whose username contains a space (home dir
C:\Users\First Last). - Install the
warpClaude Code plugin with Git Bash available as the hook shell. - Trigger any tool in Claude Code. A hook error appears on every event.
Proposed fix
Quote the path in all six hook commands in hooks/hooks.json:
- "command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-post-tool-use.sh"
+ "command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/on-post-tool-use.sh\""
(applies equally to on-session-start.sh, on-stop.sh, on-notification.sh, on-permission-request.sh, on-prompt-submit.sh, and on-post-tool-use.sh.)
Alternatively, use the exec (args) form so the path bypasses the shell parser entirely:
{ "type": "command", "command": "bash", "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/on-post-tool-use.sh"] }
Note: the scripts themselves already quote their internal variables correctly ("$SCRIPT_DIR/..."); only the entrypoint command in hooks.json is unquoted, so this is a one-line-per-hook fix.
Happy to open a PR with the quoting fix and test it on Windows 11.
- Lenguaje dominante
- Shell
- Estrellas
- 234
- Forks
- 59
- Merge medio
- 2 d 8 h
- PR fusionados (30 d)
- 2
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de warpdotdev/claude-code-warp
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
warpdotdev/claude-code-warp#96 · 2 comentarios ·
-
on-stop.sh slurps the entire transcript with jq -s every turn — ~1 GB RSS on long sessions, triggered a host OOMPosiblemente ocupada @GeiserX la tomó hace 19 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
warpdotdev/claude-code-warp#90 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Todos los issues de warpdotdev/claude-code-warp
Issues similares
-
Renovate config partially updates OVMS URLPosiblemente ocupada @farshidtz la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Regression: IME preedit still shown in plaintext on lock/polkit — #13002 fix is not in 4.0.6Posiblemente ocupada @AnPod la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fullsend-ai/agents#1833 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
gnosis/gnosis_vpn#661 ·
Los mantenedores suelen responder en 1 día
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
github/copilot-cli#5287 ·