[Bug] Permission matching not working for wildcard patterns in Bash commands
Bug Description
I always get annoying command requests even if i approve it in configs
like this:
"Bash command
find /Users/agasper/Work/Projects/C#/ZodchyServer2/src -name "*.csproj" -type f | sort
Find all csproj files in src
Do you want to proceed?
❯ 1. Yes
- Type here to tell Claude what to do differently
Esc to exit
"
my settings.local.json
{
"permissions": {
"allow": [
"Bash(dotnet ef migrations add:*)",
"Bash(dotnet build:*)",
"Bash(cat:*)",
"Bash(ls:*)",
"Bash(pwd:*)",
"Bash(find:*)",
"Bash(grep:*)",
"Bash(rg:*)",
"Bash(head:*)",
"Bash(tail:*)",
"Bash(less:*)",
"Bash(more:*)",
"Bash(diff:*)",
"Bash(wc:*)",
"Bash(file:*)",
"Bash(stat:*)",
"Bash(du:*)",
"Bash(df:*)",
"Bash(which:*)",
"Bash(whereis:*)",
"Bash(whoami:*)",
"Bash(uname:*)",
"Bash(hostname:*)",
"Bash(date:*)",
"Bash(env:*)",
"Bash(printenv:*)",
"Bash(echo:*)",
"Bash(tree:*)",
"Bash(ps:*)",
"Bash(top:*)",
"Bash(sort:*)",
"Bash(uniq:*)",
"Bash(cut:*)",
"Bash(awk:*)",
"Bash(sed:*)",
"Bash(cmp:*)",
"Bash(git status:*)",
"Bash(git diff:*)",
"Bash(git log:*)",
"Bash(git show:*)",
"Bash(git branch:*)",
"Bash(git ls-files:*)",
"Bash(git ls-tree:*)",
"Bash(git rev-parse:*)",
"Bash(git describe:*)",
"Bash(git config:*)",
"Bash(git tag:*)",
"Bash(dotnet --version:*)",
"Bash(dotnet --info:*)",
"Bash(dotnet --list-sdks:*)",
"Bash(dotnet --list-runtimes:*)",
"Bash(node --version:*)",
"Bash(npm --version:*)",
"Bash(npm list:*)",
"Bash(npm ls:*)",
"Bash(gh:*)",
"Bash(dotnet test:*)",
"WebSearch",
"Bash(git -C submodules/Zodchy.Shared.Client status --porcelain)",
"Bash(git -C submodules/Zodchy.Shared.Game.Core status --porcelain)",
"mcp__jetbrains-rider__get_all_open_file_paths",
"mcp__jetbrains-rider__list_directory_tree",
"WebFetch(domain:github.com)",
"WebFetch(domain:raw.githubusercontent.com)",
"Bash(rm:*)",
"mcp__jetbrains-rider__find_files_by_name_keyword"
],
"deny": [],
"ask": []
},
}
i asked claude to get rid o this kind of questing, but he doesn't help me
he suddenly asks permission for ls, find, cd and other allowed commands
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.0.53
- Feedback ID: e83fd149-26e8-465f-b841-dda60dec74fb
Errors
[{"error":"ZodError: [\n {\n \"code\": \"unrecognized_keys\",\n \"keys\": [\n \"plan\"\n ],\n \"path\": [],\n \"message\": \"Unrecognized key(s) in object: 'plan'\"\n }\n]\n at get error (file:///Users/agasper/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:18431)\n at $Y.parse (file:///Users/agasper/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:11700)\n at YT3 (file:///Users/agasper/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4007:4747)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async G$ (file:///Users/agasper/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4007:6259)","timestamp":"2025-11-25T10:47:35.791Z"},{"error":"ZodError: [\n {\n \"code\": \"unrecognized_keys\",\n \"keys\": [\n \"plan\"\n ],\n \"path\": [],\n \"message\": \"Unrecognized key(s) in object: 'plan'\"\n }\n]\n at get error (file:///Users/agasper/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:18431)\n at $Y.parse (file:///Users/agasper/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:11700)\n at YT3 (file:///Users/agasper/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4007:4747)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async G$ (file:///Users/agasper/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/cl
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗