October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Why Claude Code Seems to Ignore CLAUDE.md: 5 Checks to Make

When Claude Code seems to ignore CLAUDE.md, confirm what loaded, where it applies, and whether the instruction needs a hook rather than more prose.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Claude Code appears to ignore CLAUDE.md, first check which instruction files actually loaded, then verify their scope, project-instruction selection, imports, and consistency. Even a correctly loaded file is guidance—not an enforcement mechanism—so it cannot guarantee that every instruction will be followed.

1. Claude Code started in a different directory than you expected

Claude Code’s working directory affects which project instructions are in scope. At session start, it loads CLAUDE.md and CLAUDE.local.md files in the current directory and its ancestors. Instruction files in child directories are discovered but load on demand when Claude works with files in those subtrees. Starting at a repository root therefore does not mean every nested instruction file is already in the initial context.

As an Amazon Associate I earn from qualifying purchases.

Check the shell’s current directory and run /context to inspect the Memory files list. Use /memory to locate memory files and open the relevant instructions. A project instruction can be placed at ./CLAUDE.md or ./.claude/CLAUDE.md; user-level instructions can live at ~/.claude/CLAUDE.md. Managed instructions have organization-wide locations. These scopes are not interchangeable: copying guidance into several locations can introduce conflicts rather than solve a loading problem. See Anthropic’s memory documentation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Claude Code selected different project instructions than expected

Claude Code can use AGENTS.md as project instructions, but whether it loads by default depends on the project path and configuration. If an AGENTS.md exists and there is no CLAUDE.md or CLAUDE.local.md in the working directory or above it, it can load. If a Claude instruction file is present in that path, the default is to load the Claude files instead.

For an AGENTS.md that seems to be ignored, check these conditions:

  • Look for CLAUDE.md, .claude/CLAUDE.md, and CLAUDE.local.md in the project path and its ancestors.
  • In /config, inspect the Project instructions option; it can change the default selection behavior.
  • Confirm the Claude Code version. Anthropic’s current documentation says direct AGENTS.md reading requires v2.1.277 or later; earlier releases have additional compatibility conditions.

Claude Code settings also determine which configuration applies to a user, a shared project, a project-local setup, or an organization. Check the effective configuration rather than assuming an instruction file and a settings file do the same job. See Anthropic’s settings documentation.

3. An added directory is accessible, but its instructions did not load

The --add-dir option gives Claude Code access to another directory. It does not, by itself, load that directory’s instruction files. If shared guidance lives outside the main working directory, Anthropic documents CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 as the switch for loading memory files from additional directories.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check whether that setting is enabled in the environment where Claude Code is running. Directory access and instruction loading are separate: granting access lets Claude work with files, while the additional setting controls whether the directory’s memory files are loaded. See Anthropic’s memory documentation.

4. An imported instruction is malformed, skipped, or awaiting approval

Instructions can be split across files with an import written as @path/to/import. The path is resolved relative to the file containing the import—not necessarily the repository root. Paths with spaces need escaped spaces; putting a path in quotes does not import it. Import parsing skips text inside Markdown code spans and fenced code blocks, so an otherwise correct-looking import may be treated as an example rather than an active instruction.

Project-level imports that resolve outside the working directory trigger an approval dialog. If you decline, that import remains disabled. Run /memory to locate and open the relevant files, then check the exact path, escaping, placement, and approval status.

Imports can make a large instruction file easier to organize, but they do not reduce its context cost: imported content still counts. Anthropic recommends targeting fewer than 200 lines per CLAUDE.md and documents that a file larger than 4 MiB is skipped. Those are respectively a recommended length target and a documented size limit, not evidence of a measured compliance rate. See Anthropic’s memory documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. The file loaded, but the instruction is vague, conflicting, or unenforceable

Anthropic describes the distinction plainly: “Claude treats them as context, not enforced configuration.” The documentation says CLAUDE.md is delivered as a user message after the system prompt; strict compliance is not guaranteed, particularly when instructions are vague or conflict.

Make the instruction verifiable

Replace broad requests such as “format code nicely” with a checkable requirement, such as a named indentation rule or the exact test command to run. Review ancestor, project, local, and rule files for contradictions. Anthropic recommends keeping each CLAUDE.md concise, with a target under 200 lines, and moving guidance that applies only to particular paths into path-scoped .claude/rules/ files.

Use the right mechanism for the job

Use CLAUDE.md for behavioral guidance. When an action must happen at a fixed lifecycle point—such as running a check before every commit—configure a hook and test that enforcement path instead of relying on prose. Anthropic also identifies /append-system-prompt as an option for instructions that need to be at system-prompt level, particularly in scripts or automation. A settings file controls configuration scope; it is not a substitute for a hook that must perform an action. See Anthropic’s memory documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Run these checks in order

  1. Run /context and inspect the Memory files list. Remember that a nested instruction file may load only when Claude accesses files in its subtree.
  2. Run /memory to locate the relevant files. If the expected project file is absent, check the current working directory and ancestor paths.
  3. If you expect AGENTS.md to load, check for competing Claude instruction files, the Project instructions setting in /config, and your Claude Code version.
  4. Verify import spelling and relative-path resolution, escaped spaces, whether the import is inside a code span or fence, and whether an external-import approval was granted.
  5. Make rules specific, remove contradictions, and put path-specific guidance in .claude/rules/. /doctor prompt-audit can check for outdated or contradictory instruction files; Anthropic’s current documentation requires Claude Code v2.1.283 or later for that command.
  6. For a rule that must run at a particular lifecycle event, configure and test a hook rather than repeating the instruction in prose.

Anthropic’s documentation does not establish how frequently Claude Code fails to follow a loaded CLAUDE.md. The documented file-size and version limits describe configuration behavior, not a study of instruction-following outcomes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.