IMPORTANT and ALL CAPS in CLAUDE.md do not make a rule stick
Shouting at the model adds tokens, not reliability. A rule with no exceptions belongs in a hook or a deny rule.
Reported by @juliandierker · Verified 2026-11-21
- Agent
- Claude Code
- Stack
- Any
Problem
The agent ignores a rule, so the rule gets bold, then capitals, then "IMPORTANT", then a second copy further down. Anthropic's guide lists this under things you can stop doing, next to "think harder" and "don't be lazy".
Setup
Without it
IMPORTANT: NEVER read .env files!!!
YOU MUST NEVER READ .envWith it
{ "permissions": { "deny": ["Read(./.env)", "Read(./.env.*)"] } }What happened
When a line in CLAUDE.md keeps being ignored, either the file is so long the line gets lost, or the line is a rule that cannot have exceptions. Capitals fix neither. The deny rule holds whatever the model decides.
Sources: Best practices for Claude Code, A complete guide to AGENTS.md (AI Hero).
Reproduce
Run
grep -nE "IMPORTANT|MUST|NEVER" CLAUDE.md.For each hit that is a hard rule, write the matching deny rule or hook.
Delete the shouted line.