[BUG] Search/Grep permissions in settings.json not being respected
Status Closed — not planned
Maintainer reply None cached
Activity 6 comments · opened Jan 10, 2026 · closed Feb 28, 2026
Description
Search/Grep permission rules in ~/.claude/settings.json are not being respected. Despite having multiple permission patterns configured, Claude Code still prompts for permission when using the Grep tool on directories covered by these rules.
Steps to Reproduce
- Add Search/Grep permissions to
~/.claude/settings.json:
{
"permissions": {
"allow": [
"Grep(*)",
"Grep(**)",
"Grep(~/Projects/myproject/**)",
"Search(~/Projects/myproject/**)",
"Search(~/Projects/myproject)",
"Search(*)",
"Search(**)"
]
}
}
- Restart Claude Code
- Ask Claude to search for a pattern in
~/Projects/myproject - Claude Code still prompts for permission:
Read file
Search(pattern: "foo", path: "~/Projects/myproject")
Do you want to proceed?
Expected Behavior
The Grep operation should proceed without prompting since the path is covered by multiple permission rules.
Actual Behavior
Permission prompt appears despite matching rules being configured.
Environment
- Platform: macOS (Darwin 24.6.0)
- Settings location:
~/.claude/settings.json
Notes
- Tried both
Search(...)andGrep(...)permission formats - Tried with and without
**glob patterns - Tried both
~/home-relative paths and absolute paths - Other permissions in the same file (like
Read,Bash) work correctly
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I've said "yes" to allowing grep in places I've already granted read access to so many times this month!
~~helped me~~
Edit:
Nop, I was wrong
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
@claude Why is it closed? It still happens.
Especially because other tickets were closed as duplicates because of this one!
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.