[MODEL] Claude Opus 5 writes extremely slow filesystem scans for simple file lookups
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Other unexpected behavior
What You Asked Claude to Do
Regular coding+review work where Claude encounters a symbol and tries to find its source file
What Claude Actually Did
Claude writes extremely inefficient search commands scanning the entire filesystem instead of a simple search command scoped to the working directory / repository, example:
find / -name "TYPENAME.cs" -not -path "*/obj/*" 2>/dev/null | head -3; grep -rn "METHODNAME" --include=*.cs -r ~/.nuget 2>/dev/null | head -3
Expected Behavior
Claude should scope file search commands to the current repository, and only fall back to less efficient methods when a quick scan finds nothing
Files Affected
Permission Mode
Accept Edits was OFF (manual approval required)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
Any type of coding work (in a C# repo), this happened in 3/4 of my sessions today using Claude Opus 5.
Claude Model
Opus
Relevant Conversation
Impact
Low - Minor inconvenience
Claude Code Version
2.1.220 (Claude Code)
Platform
Anthropic API
Additional Context
Claude seems to assume the symbol it's searching for lives in an external dependency based on non-semantic context (it assumes a type lives in a specific namespace based on the file's usings, and has no roslyn integration to verify this), and tries a wide scan before doing a quick repo-local scan to validate this assumption.