Authorize all read-only commands on files like find and grep

Status Fixed / completed
Maintainer reply ✓ Yes — bogini
Activity 5 comments · opened May 16, 2025 · closed Sep 7, 2025
💡 Likely answer: A maintainer (bogini, collaborator) responded on this thread — see the highlighted reply below.

Sometimes Claude Code searches for some text in the directory using various combinaisons of grep, find, head, tail, etc. Since every bash command is different I have to manually authorize each one, but I really don't mind about these read-only commands without side effects and would like Claude to pursue them without my authorization on each single variation.

View original on GitHub ↗

5 Comments

benny-yamagata · 1 year ago

You can do this by using the --allowed-tools argument when running Claude IIRC

skerit · 1 year ago

All of the usual tools (grep, find, head, tail) are already in the "allowed tools" section of the tool. But still, it asks for permission each time. I think that it might be because it's using some kind of pipe chain, like find . | grep

*Edit: Here is a command that it asks permission for (it's also not one where I can select "Yes, and don't ask again")
find /home/skerit/someproject -type d -name "somestring" 2>/dev/null | head -1

Even though both find & head are allowed tools.

vojtapol · 1 year ago

Yes, any pipes or redirects seem to throw the permission system off.

bogini collaborator · 11 months ago

Thanks for the issue. This is now supported, please update to the latest version of Claude Code.

github-actions[bot] · 11 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.