[BUG] claude tends to get stuck using find/grep/sed to READ files during Explore() tool causing many permission prompts
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?
More than half of the time, when doing an Explore(), claude tends to use Bash(find) or Bash(grep) or Bash(sed) or some combination thereof.
Since claude is not able to detect reliably if something is a Read-only Bash() operation, you get prompted MANY times. There is no way to choose allow all like these because the pattern matching is not very good in claude, plus some commands are strung together (abc && def && ghi) or piped (abc | grep "123" | sed 1;34).
What Should Happen?
- get smarter parsing Bash() calls to reliably detect read-only
- create more built-in tools to handle more complex searching like claude tries to do
- be more emphatic in system instructions or prompt to Explore() tool to PREFER built-in tools
Partial workaround is to choose No and press tab and type "prefer built-in tools"
Error Messages/Logs
Steps to Reproduce
Do something that gets claude to run Explore() and then see how many times you get prompted for permission and cannot "accept all"
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.78
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗