-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingcodexFlagged for Codex pickupFlagged for Codex pickupdocs
Description
Bug
The PreToolUse:Write hook in hooks/hooks.json that blocks unnecessary .md file creation has a Windows path compatibility issue. The regex used to exclude .claude/plans/ only matches forward slashes, but Windows paths use backslashes.
Steps to Reproduce
- Use the plugin on Windows
- Enter plan mode (Claude Code writes to
.claude/plans/*.md) - The Write hook blocks the file creation with:
[Hook] BLOCKED: Unnecessary documentation file creation
[Hook] File: C:\Users\<user>\.claude\plans\generic-nibbling-key.md
[Hook] Use README.md for documentation instead
Root Cause
In hooks/hooks.json line 40, the exclusion regex is:
!/\.claude\/plans\//.test(p)On Windows, the actual file path is C:\Users\<user>\.claude\plans\file.md (backslashes), so the regex \.claude\/plans\/ never matches.
Suggested Fix
Change the regex to match both forward and backslashes:
!/\.claude[\/\]plans[\/\]/.test(p)In the JSON string (with proper escaping):
\.claude[\/\\]plans[\/\\]
Environment
- OS: Windows 11
- Claude Code plugin: everything-claude-code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcodexFlagged for Codex pickupFlagged for Codex pickupdocs