[BUG] Glob tool silently fails with absolute paths (macOS - cross-platform issue)
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?
Glob fails silently when using absolute paths with wildcards in the pattern
parameter on macOS. This is the same issue as #10337 (Windows), proving it's not a
Windows-specific backslash escaping problem - it's a cross-platform bug in how Glob
handles absolute paths.
Working directory: /Users/alex/src/afk
File exists: /Users/alex/src/afk/docs/analysis/product-brief-afk-2025-12-09.md
Glob("/Users/alex/src/afk/docs/analysis/brief.md") → "No files found"
Glob("docs/analysis/brief.md") → finds the file
What Should Happen?
Either:
- Absolute paths should work in the pattern parameter, OR
- The tool should return an error/warning explaining that only relative paths are
supported
Silent failure is the worst outcome - agents make incorrect decisions based on
incomplete information.
Error Messages/Logs
No files found
No error, no warning. Just empty results.
Steps to Reproduce
- Have a file at an absolute path, e.g. /Users/alex/src/project/docs/file.md
- Working directory is /Users/alex/src/project
- Run: Glob("/Users/alex/src/project/docs/*.md") → Returns "No files found"
- Run: Glob("docs/*.md") → Successfully finds the file
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.62 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Impact
In my case, a workflow missed an existing product brief document and incorrectly
reported a "greenfield project" with zero input documents. The agent proceeded with
wrong assumptions because Glob silently returned empty results.
Related Issues
- #10337 - Same bug on Windows. That issue assumes backslash escaping is the cause,
but this macOS reproduction proves it's a fundamental issue with absolute paths, not
Windows-specific escaping.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗