UserPromptSubmit hook does not fire on Windows platform

Resolved 💬 2 comments Opened Apr 22, 2026 by beyond06120925 Closed Apr 23, 2026

$(cat <<'ENDOFFILE'

Description

The UserPromptSubmit hook does not fire on Windows, even when CLAUDE_CODE_GIT_BASH_PATH is correctly configured. This is a platform-level bug that breaks all plugins depending on this hook.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Claude Code: 2.1.117
  • Git Bash: D:\Program Files\Git\bin\bash.exe
  • Model: qwen3.6-plus

Reproduction

  1. Set CLAUDE_CODE_GIT_BASH_PATH to a valid Git Bash path
  2. Install any plugin that registers a UserPromptSubmit hook (e.g. claude-mem or hookify)
  3. Send a message to Claude Code
  4. Observe: the UserPromptSubmit hook never fires

Observed Behavior

  • observations are never written to database (always 0 entries)
  • Logs show: Skipping observation - user prompt was entirely private {promptNumber=0}
  • UserPromptSubmit hook error: failed with non-blocking status code: No stderr output

Expected Behavior

The UserPromptSubmit hook should fire when the user submits a prompt, consistent with behavior on macOS/Linux.

Control Experiment

This is not a plugin-specific bug. Verified with two independent plugins:

  1. claude-mem — registered UserPromptSubmit hook, never fires
  2. hookify (Anthropic official plugin) — registered UserPromptSubmit hook with a rule matching all prompts, warning never appears after sending messages

Both plugins failing simultaneously confirms that Claude Code itself is not dispatching UserPromptSubmit events to hook processes on Windows.

Additional Findings

| Hook | Status on Windows |
|------|-------------------|
| SessionStart | Works |
| PostToolUse | Works |
| UserPromptSubmit | Does not fire |

CLAUDE_CODE_GIT_BASH_PATH is correctly set and other hooks work normally.

Impact

All plugins depending on UserPromptSubmit hook are unusable on Windows:

  • claude-mem: cannot record session observations
  • hookify: cannot process prompt rules
  • Any other plugin using this hook

ENDOFFILE
)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗