Glob tool fails with case-mismatched working directory on macOS

Status Closed — not planned
Maintainer reply None cached
Activity 2 comments · opened Jan 19, 2026 · 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

  1. Have a folder at /Users/username/Desktop/project (capital D in Desktop)
  2. Open terminal and cd /Users/username/desktop/project (lowercase d)
  3. Run claude from this directory
  4. Use Glob tool with a relative pattern (no explicit path parameter):

``
pattern: _bmad-output/stories/13-*.md
``

  1. 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

  • pwd returns: /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:

  1. Normalize the working directory to its canonical case (using realpath or similar)
  2. Use case-insensitive path matching on case-insensitive filesystems

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗