Glob tool does not follow symlinks
Bug: Glob tool does not follow symlinks
Description
The built-in Glob tool does not traverse symlinked directories when searching for files. Files inside symlinked directories are invisible to Glob, even though other tools (Read, Bash ls) follow the same symlinks without issue.
Steps to Reproduce
- Create a symlink:
ln -s /path/to/target /path/to/project/.claude/metadata - Verify the symlink works:
ls /path/to/project/.claude/metadata/shows files - Use Glob to search:
Glob({ pattern: ".claude/metadata/*" })→ No files found - Use Glob with a specific file:
Glob({ pattern: ".claude/metadata/skill-keywords.json" })→ No files found - Use Read on the same path:
Read({ file_path: "/path/to/project/.claude/metadata/skill-keywords.json" })→ Works fine
Environment
- OS: Windows 11 Pro (Git Bash)
- Symlink type: Unix-style symlink (created via Git Bash
ln -s) - Claude Code version: Current as of 2026-02-20
Expected Behavior
Glob should follow symlinks transparently, matching the behavior of standard glob implementations (e.g., Node.js fast-glob, Python glob, Unix find). Symlinked directories are meant to be transparent to file operations.
Actual Behavior
Glob returns no results for any pattern targeting files inside symlinked directories.
Impact
Workflows that rely on symlinked directories (e.g., framework hub-and-spoke architectures where .claude/metadata is symlinked to a central hub) cannot use Glob to discover files. Workaround: use Read on known paths or Bash ls, but this defeats the purpose of pattern-based file discovery.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗