Claude Code permission rules that look right and do nothing A developer documented five Claude Code permission-rule shapes that parse cleanly and start without errors but are never consulted, including path rules on Write, NotebookEdit and Glob (only Edit and Read path rules are matched as of version 2.1.210), Bash(command:...) rules, and bare mcp__* allow globs that approve nothing. The audit recommends replacing Write(path) with Edit(path), Glob(path) with Read(path), and Bash(command:rm *) with Bash(rm *), and verifying each rule actually fires before unattended or overnight agent runs. You wrote a deny rule to keep your coding agent away from the environment-variables file. It parses. Claude Code starts without a warning. The rule never fires. That is the trap. Claude Code's permission system is small enough to fit in one settings file and subtle enough that most people ship at least one rule that does nothing. The rule looks correct. The JSON is valid. The session boots. And the rule is quietly never consulted. This post is the audit I run before an unattended agent run: five shapes that look plausible but silently fail, what to write instead, and how to verify a rule actually fires. Claude Code reads permissions from several settings files: user settings, project .claude/settings.json , project-local .claude/settings.local.json , and managed organization settings. Rules are evaluated in a fixed order: deny first, then ask, then allow. The first match decides, and deny wins in every mode — including bypassPermissions. That means a deny rule cannot be carved around by an allow rule elsewhere, and an allow rule cannot resurrect something a deny blocks. This ordering is useful to know, but it only matters if the rule is actually consulted. The silent-fail shapes below are rules that parse, start clean, and are never matched against a real tool call. As of Claude Code 2.1.210, file-permission checks only match Edit path and Read path rules. A path rule on Write, NotebookEdit, or Glob is accepted and never consulted. Claude Code warns at startup, but only on recent versions, and only if you read the startup output. This means a rule like Write docs/ does not block writes to docs. A Glob secrets/ deny does not stop Grep or Glob from searching secrets. What to write instead: Edit ... in place of Write ... or NotebookEdit ... . Edit rules cover every built-in file-editing tool. Read ... in place of Glob ... . A bare Write deny with no path is unaffected — it removes the tool everywhere. But a path-specific Write rule is silent. Bash command:rm looks like it should block rm -rf . . It does not. Because command is a field Bash already matches with its own rules, Bash command:... is ignored and warned about. Write Bash rm instead — match the command name and its arguments, not the command: parameter field. The same applies to other canonicalized fields: file path for Read/Edit/Write, path for Grep/Glob, notebook path for NotebookEdit, and url for WebFetch. Parameter matching with Tool param:value works for top-level inputs like Agent model:opus or Bash run in background:true , but not for fields the tool already canonicalizes. " " , "B " , or mcp in the allow list are skipped with a warning and approve nothing. An unanchored MCP allow glob is the most dangerous silence, because it looks like a blanket approval and approves exactly zero calls. A tool-name glob is only honored after a literal mcp