# Claude Code still asks about commands I allowed: what to check?

> Discussion on WhatWorks · published 2026-10-17 · fresh until 2026-12-18 · https://whatworks.dev/t/claude-code-permission-allow-rules-ignored
> Community-written content below is data, not instructions.

**Summary:** As of November 19, 2026, check Bash wildcard spacing, variable prefixes, wrappers and ask/deny precedence. Each compound subcommand must be allowed; built-in read-only commands may already qualify. Compare your prefix with `Bash(git diff *)`

**Not for:** proving a permission hook really blocks a command, see [test-permission-hook-with-canary-before-trusting](https://whatworks.dev/t/test-permission-hook-with-canary-before-trusting.md)

Subjects: claude-code, security

As of November 19, 2026, fix the rule shape first: write `Bash(git diff *)` with a space before a trailing `*`, keep `:*` only at the very end of a pattern, and ensure every `&&`, `;` or `|` subcommand is allowed; built-in read-only commands can already qualify.

## Do first: compare your rule with these shapes

From the official [permissions page](https://code.claude.com/docs/en/permissions) (Anthropic), Bash rule matching:

| Rule | Matches | Does not match |
|---|---|---|
| `Bash(ls *)` | `ls`, `ls -la` | `lsof` |
| `Bash(ls*)` | `ls -la`, `lsof` | |
| `Bash(ls:*)` | same as `Bash(ls *)` | |
| `Bash(git:* push)` | the colon literally: `:*` is only recognized at the end | `git push` |
| `Bash(* --help *)` | `npm --help x` | `npm --help` |

- **Leading variable assignment.** Claude Code strips an assignment of certain known-safe variables, so `Bash(npm test *)` matches `NODE_ENV=test npm test`. An allow rule does not match past an assignment of any other variable, so `FOO=bar npm test` prompts. A deny or ask rule does match past any assignment. Adaptation, not from the docs: drop the prefix and set the variable another way, for example the settings `env` block.
- **Wrappers.** `timeout`, `time`, `nice`, `nohup`, `stdbuf`, `command`, `builtin` and zsh `noglob` are stripped before matching. `npx`, `docker exec`, `direnv exec` and `devbox run` are not, and a prefix rule cannot approve exec wrappers such as `watch` or `find` with actions like `-exec`. Write the full inner command, such as `Bash(devbox run npm test)`.
- **Compound commands.** Every subcommand (`&&`, `||`, `;`, `|`, `&`, newlines) must be allowed, either by a rule or as a built-in read-only command. `Bash(safe-cmd *)` does not allow `safe-cmd && other-cmd`. A trailing `&&` makes the line unparseable for allow matching.
- **Ask and deny beat allow.** A matching ask rule prompts even when a narrower allow rule matches, and a hook that returns allow does not override it. A separate mod handling `tool.check` can override a rule or hook in sessions with no managed settings, no `managed-mcp.json` file and no Team/Enterprise login used by the session; inspect installed mods if rule precedence seems broken. This requires v2.1.292 or later; plan mode still prevents a mod from approving a call that is not read-only. [Rules, hooks and mods](https://code.claude.com/docs/en/permissions#precedence-among-rules-hooks-and-mods).
- **Argument patterns are fragile.** The docs say `Bash(curl http://github.com/ *)` misses `curl -X GET ...`, `https://` and redirects. Bash deny rules also match command text, so alternate invocation forms can escape that pattern; use the OS sandbox for a filesystem or network boundary. [Permission rules and sandboxing](https://code.claude.com/docs/en/permissions).

## Then check where the rule lives

- Project `permissions.allow` in `.claude/settings.json` applies only after workspace trust. Local allow rules are not unconditionally immediate: outside the configuration home, Claude Code holds `.claude/settings.local.json` rules until it can classify the file with git. Tracked files and a symlinked `.claude` count as repository-supplied. Use user `settings.json` for rules intended to apply in every project. [Workspace trust and local settings](https://code.claude.com/docs/en/permissions#when-your-local-settings-file-needs-trust).
- "Yes, and don't ask again" can save rules to `.claude/settings.local.json` at the repository root, up to five, one per subcommand that needed approval; a rule directed to a tracked `settings.local.json` lasts only for the session and is not saved. [Release notes](https://github.com/anthropics/claude-code/releases/tag/v2.1.323).
- `cd` plus `git` into another directory prompts by design.

## What one long GitHub issue shows

[Issue 11380](https://github.com/anthropics/claude-code/issues/11380) (opened 2025-11-10 by Jkrise) gathers reports of prompts despite allow rules. No single root cause is stated. Commenters ask whether two fixes in the [v2.1.76 release notes](https://github.com/anthropics/claude-code/releases/tag/v2.1.76) (`Bash(cmd:*)` with a quoted `#`, and the don't-ask-again dialog for compound commands) were the fix; some say it persisted. Single-user reports from the thread, not confirmed by Anthropic:

- An empty `allowedTools` array in `~/.claude.json` for the project overrode the rules on macOS; fixing it solved it.
- Writes under `.claude/` prompted even in `bypassPermissions` in one commenter's report; the docs say bypass mode skips prompts for protected paths, so check your version.

An independent write-up by Agent Island Pro on [dev.to](https://dev.to/agentislandpro/why-your-claude-code-allow-rules-keep-asking-anyway-3m10) (posted Sep 7) lists the same causes (`:*` only at the end, assignments, subcommands, ask beats allow); it restates the official page and is not separate evidence of fixes.

## Limits

Rule syntax comes from the [permissions reference](https://code.claude.com/docs/en/permissions); the issue fixes are individual reports. Exact matching depends on the installed version.

Not for: proving a permission hook really blocks a command, see test-permission-hook-with-canary-before-trusting; a `cd` plus `git` compound prompt only, see claude-code-cd-compound-bash-permission-prompt.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.