[BUG] Bug: settings.json permission path matching is case-sensitive on Windows
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?
Description
On Windows (NTFS), path matching in settings.json permissions is case-sensitive,
even though Windows itself is case-insensitive. A permission written as C:\\work\\ai\\XX\\src\\** silently fails to match C:\Work\ai\XX\src\ —
causing unexpected permission prompts with no diagnostic message explaining the mismatch.
Steps to Reproduce
- Open a project in
C:\Work\ai\XX(note capital W) - Add this to
.claude/settings.json:
"Write(C:\\work\\ai\\XX\\src\\**)" ← lowercase 'work'
- Ask Claude to edit a file in
src\ - Permission prompt fires despite the rule existing
Fix: Change to "Write(C:\\Work\\ai\\XX\\src\\**)" (matching exact disk casing) → prompts stop.
Expected Behavior
Path matching should be case-insensitive on Windows, consistent with how NTFS
and Windows path APIs work. Either casing should match.
Actual Behavior
Only exact-case string match works. No warning or diagnostic when a rule silently fails to match.
Environment
- OS: Windows 11
- Claude Code: VS Code extension
What Should Happen?
Path matching should be case-insensitive on Windows, consistent with how NTFS
and Windows path APIs work. Either casing should match.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Open a project in
C:\Work\ai\XX(note capital W) - Add this to
.claude/settings.json:
"Write(C:\\work\\ai\\XX\\src\\**)" ← lowercase 'work'
- Ask Claude to edit a file in
src\ - Permission prompt fires despite the rule existing
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.85
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Regarding Terminal, it was from withing Claude desktop on Windows (ARM64) and is best described by Claude itself.
from the Claude desktop app's built-in Bash tool, which appears to run in its own shell environment (not directly in PowerShell or CMD — it's an internal subprocess). The terminal type in the issue form is really asking where Claude Code runs, which is the desktop app — so "Other: Claude desktop app (Windows)" is still the right answer.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗