Claude Code ignores "never do this" in CLAUDE.md? Use permission rules

Ship ItChecked against the official source

The short answer

Claude Code's docs say permission rules are enforced by Claude Code, not by the model. Instructions in your prompt or CLAUDE.md shape what Claude tries to do, but they don't change what Claude Code allows. Real rules go in /permissions as allow, ask and deny rules, and they are evaluated in order: deny, then ask, then allow, so deny always wins.

What to do

  1. In Claude Code, open /permissions to see your allow, ask and deny rules.
  2. Turn the "never do this" lines that Claude Code can enforce into deny rules. The docs' example: a deny rule like Bash(rm *) blocks matching calls when Claude attempts them.
  3. Ask Claude Code: "Read my CLAUDE.md. Turn each "never do this" line that Claude Code can enforce into a deny rule, and show me the rules before saving them."

Good to know

  • An allow rule can't carve an exception out of a deny rule.

Source

Checked on 19 Oct 2026. Prices, limits and settings change, so check the source before you rely on them.