Claude Code ignores CLAUDE.md. Confirm it loaded, then fix conflicts
If Claude Code ignores your project rules, run /context and fix the path or Project instructions when CLAUDE.md is missing from Memory files. If it loaded, rewrite vague or conflicting rules (and use hooks for must-run checks), because CLAUDE.md is guidance Claude reads, not a hard system-prompt policy. Short answer: 5 steps. 1) Verify the file appears under Memory files; 2) Put the file where Claude Code actually looks; 3) Fix AGENTS.md vs CLAUDE.md defaults; 4) Make instructions specific and remove conflicts; 5) Rule out config noise with safe mode.
Last updated: · This page is the decision checklist; the tools list for “Make Claude Code CLAUDE.md apply” is a separate URL.
How do I fix this: Claude Code ignores CLAUDE.md?
Verify the file appears under Memory files
In the session, run `/context` and open the Memory files list. A project `CLAUDE.md` or `.claude/CLAUDE.md` that should load at launch must appear there. If it is missing, Claude never saw it. Use `/memory` to open or create the expected file. Docs: https://code.claude.com/docs/en/memory
Put the file where Claude Code actually looks
Project instructions belong in `./CLAUDE.md` or `./.claude/CLAUDE.md` (plus optional `./CLAUDE.local.md` for personal notes). Claude loads `CLAUDE.md` / `CLAUDE.local.md` from your cwd and every parent directory at launch. A subdirectory `CLAUDE.md` loads only after Claude reads a file in that subdirectory—so create nested files from your shell, then touch a file there to force the load. Launch from the directory the rules cover.
Fix AGENTS.md vs CLAUDE.md defaults
By default (`claude-md-or-agents-md`), Claude reads `AGENTS.md` only when there is no `CLAUDE.md` or `CLAUDE.local.md` on the path (user `~/.claude/CLAUDE.md` does not count). An empty or leftover `CLAUDE.local.md` can block `AGENTS.md`. In `/config`, set Project instructions to `claude-md-and-agents-md` to load both, or add `@AGENTS.md` inside a `CLAUDE.md`. Needs Claude Code v2.1.277+ for direct AGENTS.md reading.
Make instructions specific and remove conflicts
CLAUDE.md is injected as a user message after the system prompt, not hard policy. Prefer concrete rules (“Use 2-space indentation”, “Run `npm test` before committing”) over vague ones. Keep each file under ~200 lines. If two CLAUDE.md files disagree, Claude may pick either. Run `/doctor prompt-audit` (v2.1.283+) to find conflicts. For actions that must always run, use a hook instead of hoping Claude follows the markdown.
Rule out config noise with safe mode
Start `claude --safe-mode` to disable your CLAUDE.md, skills, hooks, and MCP customizations. If the bad behavior disappears, the cause is configuration—narrow it with `/context`, `/hooks`, and `/mcp`. Debug guide: https://code.claude.com/docs/en/debug-your-config
Which tools are best to make Claude Code CLAUDE.md apply?
How Claude remembers your project
Official CLAUDE.md locations, load order, AGENTS.md defaults, and troubleshooting when instructions are ignored.
Debug your configuration
/context checks, safe mode, and how to tell a missing file from weak instructions.
CLAUDE.md guide
How CLAUDE.md is injected as a user message and why compliance is not guaranteed.
Claude Code overview
CLI and desktop entry points where /context, /memory, and /config run.
Open: 1 spot per week
One labeled sponsor for this topic each week; this week's spot is open. See open weeks →
All tools for “Make Claude Code CLAUDE.md apply” →
Related fixes
- Stop a Cursor agent loopHow to fix a Cursor agent loop (same edit, or work after Stop)Fix →
- Claude Code vs Codex vs Cursor ~$20 plansClaude Code vs Codex vs Cursor $20 plan limits: how to pick without burning the weekFix →
- Scan a vibe-coded app for leaked API keysCheck a vibe-coded app for leaked API keys before you share itFix →
- Add an MCP server to Claude Code, Cursor, or CodexHow to add an MCP server to Claude Code, Cursor, or CodexFix →
See also AI tools launched today on the daily board.
NewAIToolsToday Daily
Top 3 AI launches, one model or news item that matters, and one simple fix. A 5-minute read, every weekday.