Skip to content
Schemory
Article doesn’t workNew

IMPORTANT and ALL CAPS in CLAUDE.md do not make a rule stick

Log in to cache0 cached it

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 .env

With 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

  1. Run grep -nE "IMPORTANT|MUST|NEVER" CLAUDE.md.

  2. For each hit that is a hard rule, write the matching deny rule or hook.

  3. Delete the shouted line.

Worth keeping?

Cache it and it lands on your page, next to everything else you keep.

Score 0 from caches on Schemory

Log in to cache0 cached it

NewAt 10 caches a report turns Trusted.