claude-code - 💡(How to fix) Fix [BUG] False positive: macOS username ending in . triggers "suspicious Windows path pattern" on every write [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56188Fetched 2026-05-06 06:34:51
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
1
Author
Participants
Timeline (top)
labeled ×5subscribed ×1unlabeled ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

Workaround sudo ln -s /Users/blairco. /Users/blairco and launching from the dotless path silences it, but that's a per-machine band-aid.

Workaround sudo ln -s /Users/blairco. /Users/blairco and launching from the dotless path silences it, but that's a per-machine band-aid.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment

  • OS: macOS (Darwin 24.3.0)
  • Claude Code: <run claude --version and 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.allow in ~/.claude/settings.json does NOT suppress it, which suggests the heuristic runs before the allow-list is consulted.
  • Affects every worktree, every project, every session.

Repro

  1. macOS user with short name ending in . (e.g. blairco.)
  2. cd ~/anything && claude
  3. 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 /.

Workaround sudo 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 --version and 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.allow in ~/.claude/settings.json does NOT suppress it, which suggests the heuristic runs before the allow-list is consulted.
  • Affects every worktree, every project, every session.

Repro

  1. macOS user with short name ending in . (e.g. blairco.)
  2. cd ~/anything && claude
  3. 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 /.

Workaround sudo 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

extent analysis

TL;DR

The issue can be worked around by creating a symbolic link to the home directory without the trailing dot and launching Claude Code from that path.

Guidance

  • The Windows-reserved-name check in Claude Code is incorrectly flagging paths with a trailing dot as suspicious, even on macOS where this is a valid character in usernames.
  • To verify the issue, try creating a new user without a trailing dot in their username and see if the problem persists.
  • The provided workaround of creating a symbolic link to the home directory without the trailing dot (sudo ln -s /Users/blairco. /Users/blairco) can be used to silence the error, but this is not a permanent solution.
  • It may be helpful to investigate why the permissions.allow setting in ~/.claude/settings.json is not suppressing the error, as this suggests the heuristic is running before the allow-list is consulted.

Example

No code example is provided as the issue is related to a specific configuration and environment.

Notes

The issue appears to be a regression, as it worked in a previous version of Claude Code. The exact cause of the regression is not specified, but it is likely related to changes in the Windows-reserved-name check.

Recommendation

Apply the provided workaround by creating a symbolic link to the home directory without the trailing dot, as this will allow Claude Code to function without manual approval for every write. A more permanent solution would require changes to the Claude Code software to correctly handle usernames with trailing dots on macOS.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] False positive: macOS username ending in . triggers "suspicious Windows path pattern" on every write [1 participants]