[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.
6 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I can confirm, it doesn't work on MacOS (newest 2.0.62 (Claude Code)). I had few files and none of them was found using:
⏺ Search(pattern: "/Users/developer/Projects2/system/docs/migration_*_howto.md")
⎿ Found 0 files
⏺ Search(pattern: "/Users/developer/Projects2/system/docs/howto.md")
⎿ Found 0 files
Claude had to try once more with following:
⏺ Bash(ls -la /Users/developer/Projects2/system/docs/*.md 2>/dev/null | head -20)
So in the end it achieves goal, but wastes time, context and credits at the same time
For me this is like "one million dollar" waste due to "thank you" prompt problem
I guess wildcard can't be in the middle of filename. Wildcard is treated as token, not a part of filename. I guess ? doesn't work either. Looks like regression, due to missing unit tests.
I can confirm on linux too.
And here is an example of shenanigans that this leads to. Which makes me think that the severity of this problem, for my situation at least, is high, borderline critical.
This appears to be fixed in Claude Code v2.0.69. Tested with multiple absolute path + wildcard patterns and all returned correct results. Thanks for the fix!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.