[BUG] Search/Grep permissions in settings.json not being respected

Resolved 💬 6 comments Opened Jan 10, 2026 by aaronjensen 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

  1. Add Search/Grep permissions to ~/.claude/settings.json:
{
  "permissions": {
    "allow": [
      "Grep(*)",
      "Grep(**)",
      "Grep(~/Projects/myproject/**)",
      "Search(~/Projects/myproject/**)",
      "Search(~/Projects/myproject)",
      "Search(*)",
      "Search(**)"
    ]
  }
}
  1. Restart Claude Code
  2. Ask Claude to search for a pattern in ~/Projects/myproject
  3. 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(...) and Grep(...) 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

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗