[BUG] False positive: macOS username ending in . triggers "suspicious Windows path pattern" on every write
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment
- OS: macOS (Darwin 24.3.0)
- Claude Code: <run
claude --versionand paste> - macOS short username:
blairco.(legitimately ends in a dot) - Home directory:
/Users/blairco.
Bug
Every Write/Edit tool call in any worktree under my home directory is blocked with:
"Claude requested permissions to write to /Users/blairco./Downloads/... which contains a
suspicious Windows path pattern that requires manual approval."
The heuristic appears to flag any path component ending in . as a Windows reserved-name
pattern. On macOS, a trailing dot in a username is legal and my real home is /Users/blairco.,
so every single path I touch trips the check.
Impact
- Cannot use Claude Code without manually approving every write.
- Adding the path to
permissions.allowin~/.claude/settings.jsondoes NOT suppress it,
which suggests the heuristic runs before the allow-list is consulted.
- Affects every worktree, every project, every session.
Repro
- macOS user with short name ending in
.(e.g.blairco.) cd ~/anything && claude- Ask Claude to edit any file → prompt fires.
Expected
The Windows-reserved-name check should only apply on Windows, or should validate the final
path component rather than any component containing a . followed by /.
Workaroundsudo ln -s /Users/blairco. /Users/blairco and launching from the dotless path silences it,
but that's a per-machine band-aid.
What Should Happen?
Environment
- OS: macOS (Darwin 24.3.0)
- Claude Code: <run
claude --versionand paste> - macOS short username:
blairco.(legitimately ends in a dot) - Home directory:
/Users/blairco.
Bug
Every Write/Edit tool call in any worktree under my home directory is blocked with:
"Claude requested permissions to write to /Users/blairco./Downloads/... which contains a
suspicious Windows path pattern that requires manual approval."
The heuristic appears to flag any path component ending in . as a Windows reserved-name
pattern. On macOS, a trailing dot in a username is legal and my real home is /Users/blairco.,
so every single path I touch trips the check.
Impact
- Cannot use Claude Code without manually approving every write.
- Adding the path to
permissions.allowin~/.claude/settings.jsondoes NOT suppress it,
which suggests the heuristic runs before the allow-list is consulted.
- Affects every worktree, every project, every session.
Repro
- macOS user with short name ending in
.(e.g.blairco.) cd ~/anything && claude- Ask Claude to edit any file → prompt fires.
Expected
The Windows-reserved-name check should only apply on Windows, or should validate the final
path component rather than any component containing a . followed by /.
Workaroundsudo ln -s /Users/blairco. /Users/blairco and launching from the dotless path silences it,
but that's a per-machine band-aid.
Error Messages/Logs
Steps to Reproduce
Open any new chat
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.128 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗