Dev.to
7/16/2026

Claude Code hooks silently fail on Windows: bash not on PATH
Original: Your Claude Code hook doesn't fire on Windows, and nothing tells you why
Short summary
Claude Code hooks that invoke bash silently fail on Windows because Git for Windows puts Git\cmd on PATH but not Git\bin, where bash.exe lives. The hook runner uses the OS shell and system PATH, unlike the Bash tool which resolves Git Bash independently. The fix is adding Git\bin to PATH, though this is per-machine and Git's installer warns against it due to GNU utility conflicts.
- •Claude Code hooks silently fail on Windows because bash.exe isn't on PATH by default
- •The Bash tool and hook runner use different resolution paths, masking the problem
- •Fix: add Git\bin to PATH, but Git's installer warns this can break other tooling
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



