Grep Tool Fails to Find Existing Patterns
Resolved 💬 8 comments Opened Aug 14, 2025 by subercui Closed Aug 22, 2025
Bug Description
Confirmed: Grep Tool Bug
Yes, this appears to be a Claude Code Grep tool bug! Here's the evidence:
Working vs Broken:
- ✅ Bash tool: grep works perfectly
- ❌ Grep tool: Always returns "No matches found" even for content that definitely exists
Tested Multiple Patterns:
- val_results - exists but Grep tool doesn't find it
- import pandas - exists but Grep tool doesn't find it
- Same file, same working directory
Should You Restart Claude Code?
It might help! This could be:
- Tool state issue - The Grep tool might be in a bad state
- File handle issue - The tool might not be reading the current file version
- Permission issue - Though Bash tool works fine
Try restarting Claude Code first. If the Grep tool still fails after restart, then we know it's a more fundamental tool issue.
Workaround for now: I'll use the Bash tool for all grep operations since it works reliably:
bash: grep -n "pattern" filename.py
This is definitely a tool bug, not a file or search strategy issue. Good catch!
Environment Info
- Platform: linux
- Terminal: vscode
- Version: 1.0.80
- Feedback ID: 16862fc8-0d5d-4881-9a16-ebfb351ebda1
Errors
[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at _V (/$bunfs/root/claude:1638:1192)\n at map (native:1:11)\n at qQ (/$bunfs/root/claude:1638:905)\n at $oG (/$bunfs/root/claude:2213:5239)\n at zE (/$bunfs/root/claude:188:19860)\n at Uy (/$bunfs/root/claude:190:42827)\n at Ay (/$bunfs/root/claude:190:38350)\n at ER (/$bunfs/root/claude:190:38278)\n at kE (/$bunfs/root/claude:190:38132)\n at fK (/$bunfs/root/claude:190:35195)","timestamp":"2025-08-14T02:52:54.604Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at _V (/$bunfs/root/claude:1638:1192)\n at map (native:1:11)\n at qQ (/$bunfs/root/claude:1638:905)\n at $oG (/$bunfs/root/claude:2213:5239)\n at zE (/$bunfs/root/claude:188:19860)\n at Uy (/$bunfs/root/claude:190:42827)\n at Ay (/$bunfs/root/claude:190:38350)\n at ER (/$bunfs/root/claude:190:38278)\n at kE (/$bunfs/root/claude:190:38132)\n at fK (/$bunfs/root/claude:190:35195)","timestamp":"2025-08-14T02:52:54.617Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at _V (/$bunfs/root/claude:1638:1192)\n at map (native:1:11)\n at qQ (/$bunfs/root/claude:1638:905)\n at $oG (/$bunfs/root/claude:2213:5239)\n at zE (/$bunfs/root/claude:188:19860)\n at Uy (/$bunfs/root/claude:190:42827)\n at Ay (/$bunfs/root/claude:190:38350)\n at ER (/$bunfs/root/claude:190:38278)\n at kE (/$bunfs/root/claude:190:38132)\n at fK (/$bunfs/root/claude:190:35195)","timestamp":"2025-08-14T02:52:54.674Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at _V (/$bunfs/root/claude:1638:1192)\n at map (native:1:11)\n at qQ (/$bunfs/root/claude:1638:905)\n at $oG (/$bunfs/root/claude:2213:5239)\n at zE (/$bunfs/root/claude:188:19860)\n at Uy (/$bunfs/root/claude:190:42827)\n at Ay (/$bunfs/root/claude:190:38350)\n at ER (/$bunfs/root/claude:190:38278)\n at kE (/$bunfs/root/claude:190:38132)\n at fK (/$bunfs/root/claude:190:35195)","timestamp":"2025-08-14T02:52:54.676Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at _V (/$bunfs/root/claude:1638:1192)\n at map (native:1:11)\n at qQ (/$bunfs/root/claude:1638:905)\n at $oG (/$bunfs/root/claude:2213:5239)\n at zE (/$bunfs/root/claude:188:19860)\n at Uy (/$bunfs/root/claude:190:42827)\n at Ay (/$bunfs/root/claude:190:38350)\n at ER (/$bunfs/root/claude:190:38278)\n at kE (/$bunfs/root/claude:190:38132)\n at fK (/$bunfs/root/claude:190:35195)","timestamp":"2025-08-14T02:52:54.769Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at _V (/$bunfs/root/claude:1638:1192)\n at map (native:1:11)\n at qQ (/$bunfs/root/claude:1638:905)\n at $oG (/$bunfs/root/claude:2213:5239)\n at zE (/$bunfs/root/claude:188:19860)\n at Uy (/$bunfs/root/claude:190:42827)\n at Ay (/$bunfs/root/claude:190:38350)\n at ER (/$bunfs/root/claude:190:38278)\n at kE (/$bunfs/root/claude:190:38132)\n at fK (/$bunfs/root/claude:190:35195)","timestamp":"2025-08-14T02:52:54.795Z"},{"error":"Error: Language not supported while highlighting code, falling ba
Note: Error logs were truncated.
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗