User says Claude Code silently skips failing hooks on Windows
Start here
A user reported in a GitHub issue that Claude Code on Windows silently skips hook commands that fail to start: prompts and tool calls proceed as usual, and failures are only written to the --debug log with no in-session notice; because hooks are executed via Git Bash, backslash separators are removed and unquoted paths containing spaces are split. The reporter says hooks used as security or compliance controls silently fail.
Generated by AI from reports · Updated 18 days ago
Progress timeline
- WebZenn Security (Japanese)· Media coverageClaude Code hooks silently fail to work when Windows paths are written with \ (exit code 127)(opens the original post in a new tab)
- Anthropic Claude CodeSelectedCommunity report: Claude Code silently skips failed hooks on Windows
A user reported in a GitHub issue that Claude Code on Windows treats a hook command that fails to start (exit code 127) as a non-blocking error, with prompts or tool calls proceeding as usual, the failure written only to the --debug log, and no indication within the session. The cause is that Windows hook commands are executed via Git Bash, backslash paths have their separators stripped, and unquoted paths containing spaces are split, so an ordinary Windows path can trigger it. The reporter said that UserPromptSubmit or PreToolUse hooks used as security or compliance controls (such as those deployed via managed-settings.json) would therefore silently fail, appearing no different from a hook running normally and allowing the action, and that their Windows test pipeline had failed for three consecutive weeks with no diagnostics because of this.
Related discussion
- Older than 72 hours · Not included in the 72-hour figures
- WebZenn Security (Japanese)Claude Code hooks silently fail to work when Windows paths are written with \ (exit code 127)(opens the original post in a new tab)
Attention trend
New sources per day
- Nov 24: 1 new sources (1 outlets, 0 accounts)
- Nov 25: 0 new sources (0 outlets, 0 accounts)
- Nov 26: 0 new sources (0 outlets, 0 accounts)
- Nov 27: 0 new sources (0 outlets, 0 accounts)
- Nov 28: 0 new sources (0 outlets, 0 accounts)
- Nov 29: 0 new sources (0 outlets, 0 accounts)