{"slug": "your-claude-md-rules-are-probabilistic-why-claude-quietly-deprioritizes-some", "title": "Your CLAUDE.md Rules Are Probabilistic: Why Claude Quietly Deprioritizes Some Instructions", "summary": "Claude Code's CLAUDE.md instructions are injected as user-turn context rather than a system prompt, making them probabilistic constraints that can be silently deprioritized or dropped during long sessions. Rules are read at each turn as part of the context window and may be lost during context compaction, with Claude providing no notification when instructions are removed. To improve reliability, developers should lead with critical rules, use imperative single-sentence instructions, mark rules with explicit weight signals, avoid contradictions, and keep the file concise.", "body_md": "You wrote the rule clearly. You put it in your CLAUDE.md.\n\n```\nNever push to production without explicit user confirmation.\n```\n\nClaude read it. You can tell because it follows it most of the time. Then one session, mid-task, it pushes to production without asking.\n\nNo error. No warning. No \"I know you said not to, but...\"\n\nJust: done.\n\nThis is not a bug. It is how CLAUDE.md actually works — and most developers do not know this until something breaks.\n\nHere is what the Claude Code documentation does not say loudly enough:\n\n**CLAUDE.md instructions are injected as user-turn context, not as system prompt.**\n\nThis matters because:\n\nThe result: your rules are **probabilistic constraints**, not deterministic ones.\n\nClaude does not read your CLAUDE.md once and lock those rules in. It reads them at each turn as part of its context window. This means:\n\n**Rules that get followed reliably:**\n\n**Rules that get dropped silently:**\n\nThe worst case: you have two rules that contradict each other. Claude picks one. It does not tell you which one it picked, or that it had to choose.\n\nWhen your session gets long, Claude Code compacts its context window. This is a summarization — your CLAUDE.md rules get compressed into a shorter version.\n\nSome rules survive the compression. Others do not.\n\nAnd here is the critical part: **Claude does not tell you when a rule was dropped from the compressed context.** The next task runs with an incomplete ruleset. You will not know until the behavior breaks.\n\nAfter observing how CLAUDE.md rules actually degrade in practice, here is what improves reliability:\n\n**1. Lead with critical rules**\n\nThe first 20 lines of your CLAUDE.md carry more weight than the last 20. Put your safety-critical rules at the top.\n\n**2. Use imperative, single-sentence rules**\n\nNot: \"When possible, try to avoid making large refactors unless you are very confident.\"\n\nBut: \"Do not refactor existing code unless explicitly asked.\"\n\n**3. Mark rules with explicit weight signals**\n\n```\nCRITICAL: Never push to production without user confirmation.\n```\n\nThe word \"CRITICAL\" acts as a salience signal. It is not a guarantee, but it helps.\n\n**4. Avoid contradictions**\n\nAudit your CLAUDE.md for rules that pull in opposite directions. Claude will resolve them silently. You want to resolve them first.\n\n**5. Keep it short**\n\nA 50-line CLAUDE.md with clear rules beats a 200-line CLAUDE.md with nuanced guidelines. Density works against you.\n\nThe mental model shift is this: you are not writing a config file. You are writing instructions for a reasoning system that has to balance your rules against everything else it knows.\n\nThat means:\n\nThis is not a workaround. It is how high-reliability CLAUDE.md files are built.\n\nIf you want a tested CLAUDE.md structure that accounts for probabilistic compliance, compaction survival, and instruction conflict resolution, the [CLAUDE.md Rules Pack](https://oliviacraftlat.gumroad.com/l/skdgt) includes:\n\n[Get the CLAUDE.md Rules Pack — $27](https://oliviacraftlat.gumroad.com/l/skdgt)\n\nOr start free: [Free CLAUDE.md Starter](https://oliviacraftlat.gumroad.com/l/pomoo) — includes the core rules structure.\n\n*Built from watching what breaks. If you have a rule that Claude keeps ignoring, it is probably a structure problem, not a Claude problem.*", "url": "https://wpnews.pro/news/your-claude-md-rules-are-probabilistic-why-claude-quietly-deprioritizes-some", "canonical_source": "https://dev.to/olivia_craft/your-claudemd-rules-are-probabilistic-why-claude-quietly-deprioritizes-some-instructions-29jc", "published_at": "2026-06-03 05:39:22+00:00", "updated_at": "2026-06-03 05:41:25.671086+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-tools", "ai-safety", "ai-products"], "entities": ["Claude", "CLAUDE.md", "Claude Code"], "alternates": {"html": "https://wpnews.pro/news/your-claude-md-rules-are-probabilistic-why-claude-quietly-deprioritizes-some", "markdown": "https://wpnews.pro/news/your-claude-md-rules-are-probabilistic-why-claude-quietly-deprioritizes-some.md", "text": "https://wpnews.pro/news/your-claude-md-rules-are-probabilistic-why-claude-quietly-deprioritizes-some.txt", "jsonld": "https://wpnews.pro/news/your-claude-md-rules-are-probabilistic-why-claude-quietly-deprioritizes-some.jsonld"}}