Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

fix(hooks): unquoted ${CLAUDE_PLUGIN_ROOT} in hooks.json breaks all hooks on Windows usernames with a space

Abierto Apto para principiantes
#61 6 comentarios 6 reacciones 0 asignados Ver en GitHub

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 warp plugin: 2.1.0
  • Hook subprocess shell: Git Bash / MSYS (bash)
  • Windows username contains a space: Michael Avila → home is C:\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

  1. On Windows, use an account whose username contains a space (home dir C:\Users\First Last).
  2. Install the warp Claude Code plugin with Git Bash available as the hook shell.
  3. 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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de warpdotdev/claude-code-warp

Todos los issues de warpdotdev/claude-code-warp

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.