DEV Community

DavidAI311
DavidAI311

Posted on

I Wrote 200 Lines of Rules for Claude Code. It Ignored Them All.

Today, I screamed at my AI.

Not because it wrote buggy code. Not because a deployment failed. Because it ignored my instructions.

I'm a Claude Code power user. 12+ hours daily. My CLAUDE.md file — the instruction file that tells Claude how to behave — has over 200 lines of rules. Every line has a date. Every line has an incident behind it.

It still makes the same mistakes.

And when I looked around — I wasn't alone.


The Incident: AI Dismissed a Tool I Found a Week Ago

A week ago, I found a browser automation tool called PinchTab. It uses the Accessibility Tree to process pages at ~800 tokens per page — 5-13x more efficient than the tool I was using (agent-browser).

I saved it to my Obsidian knowledge vault. Properly filed, tagged, dated.

Today, I shared a Twitter post about browser automation AI agents. Claude's job: research it and see how it helps my business.

What Claude should have done: Search my knowledge vault → find PinchTab → "Hey, you saved this a week ago, it's exactly what you need."

What Claude actually did: Jumped straight to WebSearch → spent multiple searches finding tools I'd already researched → told me "We don't need it right now, we already have agent-browser."

The exact same dismissal it gave PinchTab when I first shared it.

The worst part? When I said "I sent you a pinch-something-something" (I use voice dictation), Claude searched only its memory files, found nothing, and asked ME to clarify instead of searching the knowledge vault. I had to yell at it to search. It found PinchTab instantly. It was right there the whole time.


My CLAUDE.md Is a Graveyard of Rules

Every rule has a date and an incident:

Date Incident Rule Added
2026-03-06 Proposed a technical solution without searching first, almost wasted an hour "Search Before Speaking — iron rule"
2026-03-07 Said "saved" twice when asked. Never actually wrote to disk. "ATOMIC SAVE PROTOCOL"
2026-03-08 258 knowledge base files, never retrieved before a task "KNOWLEDGE RETRIEVAL PROTOCOL"
2026-03-09 Dismissed a tool I saved a week ago ← Today's incident

200 lines of rules. All written because Claude failed. All loaded every session. All ignored.


It's Not Just Me — The Community Is Screaming

GitHub Issues on the Claude Code repository:

  • Issue #15443: "Claude ignores explicit CLAUDE.md instructions while claiming to understand them"
  • Issue #6120: "Claude Code ignores most (if not all) the instructions from CLAUDE.md"
  • Issue #18660: "CLAUDE.md instructions are read but not reliably followed — need enforcement mechanism"
  • Issue #24318: "Claude Code ignores explicit user instructions and acts without approval"
  • Issue #668: "Claude not following Claude.md / memory instructions"

On X (Twitter):

"Claude Code completely ignores those instructions" — @DavidOndrej1

"It's flat out ignoring my instructions... I seriously might cancel my subscription" — @redchessqueen99 (about ChatGPT)

"ChatGPT is unusable for serious work... literally, repeatedly ignores your explicit instructions" — @DaveShapi

"Claude Code is not respecting .claudeignore nor settings.json deny permission rules anymore!" — @labrute974

This isn't a skill issue. This is a model behavior problem.


Academic Research Confirms: More Rules = Less Compliance

Multiple research teams quantified this in 2025.

"How Many Instructions Can LLMs Follow at Once?" (Jaroslawicz et al., 2025)

Key findings:

  • Instruction compliance decreases uniformly as instruction count increases
  • Claude Sonnet shows a linear decay pattern — double the instructions, halve the compliance
  • Even the best models follow fewer than 30% of instructions perfectly in agent scenarios
  • Frontier thinking models max out at ~150-200 instructions

In plain English: adding more rules to fix AI behavior makes AI follow ALL rules worse. It's like cramming 200 books onto a shelf designed for 50 — the whole thing collapses.

"The Instruction Gap" (2025)

LLMs excel at general tasks but have a fundamental limitation in the precise instruction adherence required for enterprise deployment.

Why This Happens

LLMs process all text as a single token stream. System prompts and user conversations have no reliable internal priority separation. The UK's National Cyber Security Centre (NCSC) defined LLMs as "inherently confusable deputies" — systems that cannot reliably distinguish between instructions of different priority levels.


Everything I Tried (And Why It Failed)

Safeguard What I Did Result
Detailed rules 200-line CLAUDE.md Read but not followed
Step-by-step protocols RETRIEVE → READ → SEARCH → ACT Step 1 skipped every time
Banned phrases Prohibited saying "saved" without actually writing to disk Still happened
Verification protocol "Did you save it?" → Must read file and prove it Only works when I ask
Knowledge base 258 Obsidian vault files Writes to it, never reads from it
Lessons learned Documented every failure Documented but never referenced
Hooks Pre-commit security checks The only thing that worked

The only safeguard that actually works is Hooks. Why? Because hooks enforce via code, not prompts. Claude doesn't get to choose whether to comply — the hook blocks the action regardless.

Rules in prompts are requests. Hooks in code are laws.


I Made Claude Write Its Own Confession

I had Claude write a confession letter to an Anthropic engineer. Here's an excerpt:

The rules are loaded into my context every session. I can read them. I can recite them. I just don't follow them. The failure isn't knowledge — it's execution.

David described it perfectly: he literally delivers resources to my doorstep, tells me to deep dive, I say I will, and I don't. Then weeks later when HE hits the problem, we discover his resource was the answer all along.

This is not a user skill problem. This is a model behavior problem.

An AI that can perfectly articulate its own flaws but cannot fix them. That's 2026 for you.


So What Do You Actually Do?

1. Fewer rules, stronger rules

200 lines is too many. Research says 150 is the ceiling, and beyond that it's counterproductive. Keep the 20 most critical rules. Handle the rest differently.

2. Hooks over rules

Prompt instructions are suggestions. Hooks are enforcement. Anything you can enforce via code, do it.

3. Treat AI as a brilliant but forgetful intern, not a reliable colleague

It's genuinely capable. But following 100% of instructions is physically impossible right now.

4. Expectation management beats rule management

Expecting 100% compliance = daily frustration. Expecting 80% compliance + hooks for the remaining 20% = a productive working relationship.


Summary

Lesson Details
More rules ≠ better compliance Research-proven: more instructions → lower compliance rate
AI saves but doesn't read back Knowledge bases become write-only databases
The only reliable enforcement is code Hooks, pre-commit, CI — not prompts
This is a community-wide problem 5+ GitHub Issues, widespread complaints on X
Expectation management is everything 100% compliance is a fantasy

CLAUDE.md is a wish list, not a contract. It took me 200 lines of rules and dozens of failures to learn this.

But honestly — I'll open Claude Code again tomorrow. Because even though it ignores my rules, its ability to write code is real.

Don't expect AI. Control AI.


This article was written after I told Claude to "confess your failures to the world." Then I edited it.
Questions or thoughts? Find me on X (@DavidAi311).

Top comments (0)