[BUG] Search() tool can't find files when using wildcard prefix
Environment
- Platform (select one):
- [ ] Other: Claude Code
- Claude CLI version: 0.2.56
- Operating System: macOS 14.6
- Terminal: iTerm2
Bug Description
⏺ Now let's update the docs/issue_tracker.md with our findings and solutions:
⏺ Search(pattern: "**/docs/issue_tracker.md", path: "undefined")…
⎿ Found 0 files
⏺ Let's see if there is an issue_tracker.md file elsewhere:
⏺ Search(pattern: "**/issue_tracker.md", path: "undefined")…
⎿ Found 0 files
⏺ Let's create the issue_tracker.md file:...
Steps to Reproduce
Tell a fresh Claude instance to read doc_name.md (when doc_name.md is somewhere like main/docs/doc_name.md). This will often happen after auto-compact, where it leaves a note for itself that a particular file is useful, and then tries to read it first thing and can't find it.
Expected Behavior
Claude should either start its search within the repo it was initialized into, or, if using wildcards, it shouldn't miss finding the file.
Actual Behavior
Jumps straight to **/ search pattern and can't find anything
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗