Glob tool fails with case-mismatched working directory on macOS
Resolved 💬 2 comments Opened Jan 19, 2026 by infoadians Closed Feb 27, 2026
Description
The Glob tool fails to find files when the working directory path case doesn't match the filesystem's canonical case on macOS (which has a case-insensitive filesystem).
Environment
- OS: macOS (Darwin 25.2.0)
- Filesystem: APFS (case-insensitive, case-preserving)
- Claude Code version: Latest as of 2025-01-19
Steps to Reproduce
- Have a folder at
/Users/username/Desktop/project(capital D in Desktop) - Open terminal and
cd /Users/username/desktop/project(lowercase d) - Run
claudefrom this directory - Use Glob tool with a relative pattern (no explicit
pathparameter):
````
pattern: _bmad-output/stories/13-*.md
- Result:
No files found
Expected Behavior
Glob should find the files since macOS filesystem is case-insensitive.
Actual Behavior
Glob returns "No files found" when using relative patterns.
Workaround
Using an explicit path parameter with the correct case works:
pattern: 13-*.md
path: /Users/username/Desktop/project/_bmad-output/stories
Root Cause Analysis
pwdreturns:/Users/username/desktop/project(lowercase)- Actual filesystem path:
/Users/username/Desktop/project(uppercase) - Glob's relative path resolution appears to be case-sensitive internally, even though macOS filesystem is case-insensitive
Suggested Fix
When resolving relative paths on macOS, Glob should either:
- Normalize the working directory to its canonical case (using
realpathor similar) - Use case-insensitive path matching on case-insensitive filesystems
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗