Grep tool (ripgrep) silently returns no matches for strings that exist
Resolved 💬 4 comments Opened Mar 20, 2026 by umairmustafa1 Closed Apr 18, 2026
Bug Description
The built-in Grep tool (ripgrep-based) silently returns "No matches found" for patterns that definitely exist in the codebase. Bash grep finds the same patterns immediately.
Reproduction
Search for the string va_return which exists in src/data/common/utils.py (in docstrings and f-strings):
Grep tool (fails):
Grep(pattern="va_return", output_mode="content")
→ "No matches found"
Bash grep (succeeds):
grep -rn "va_return" src/data/common/utils.py
→ 309: 1. Vol-adjusted forward return (va_return): Float32
→ 320: va_return uses symmetric ATR% for vol-adjustment.
→ 386: .alias(f"va_return_{s}")
Behavior
- The Grep tool returns no results — no error, no warning, just "No matches found"
- The pattern is a simple literal string, no regex complexity
- Bash
grep -rnfinds it immediately in the same file - Tested with and without
-i(case insensitive) flag — same result - Reproducible across multiple sessions
Environment
- Claude Code version: 2.1.74
- OS: Windows 11 Pro (10.0.26200)
- Shell: Git Bash
- GNU grep version: 3.0
Additional Context
- Started occurring after updating to the latest Claude Code version
- Reproduced in at least 2 separate sessions
- The file being searched is a normal
.pyfile, not gitignored, not binary - This causes Claude to waste many turns trying different search strategies before falling back to bash grep or direct file reads
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗