Make Claude Code read AGENTS.md: import and verify

Claude Code reads AGENTS.md only when no CLAUDE.md is in or above your working directory. Use an @AGENTS.md import to share one file, then check /memory.

Updated · Markdown version

Claude Code does read a repository's AGENTS.md, but only under a specific condition: no CLAUDE.md file may sit in the working directory or any directory above it. To keep a CLAUDE.md in place and still load AGENTS.md, add an @AGENTS.md import line to that file and confirm the path in /memory.

Which file loads

The lookup is simple once you know the rule. As of 2026-11-21, the Claude Code memory docs describe three setups:

Files in the working directory or aboveWhat Claude reads
AGENTS.md onlyAGENTS.md
AGENTS.md and CLAUDE.mdCLAUDE.md only
CLAUDE.md with @AGENTS.md inside itCLAUDE.md, with AGENTS.md pulled in by the import

Your personal ~/.claude/CLAUDE.md and organization-managed CLAUDE.md files do not count toward this check. They load alongside AGENTS.md.

Steps

  1. Check the version. Run claude --version. Reading AGENTS.md directly needs v2.1.277 or later. Earlier builds, and some sessions such as those on Amazon Bedrock with telemetry disabled, read CLAUDE.md files only.
  2. Look for conflicting files. Search the working directory and each parent for CLAUDE.md, .claude/CLAUDE.md and CLAUDE.local.md. A CLAUDE.local.md is easy to forget because it is often gitignored.
  3. Choose one path: - No conflicting files: do nothing else. Claude reads AGENTS.md on its own. - A CLAUDE.md is needed for Claude-only notes: create or edit CLAUDE.md, put @AGENTS.md alone on its own line, and write Claude-specific instructions below it. Claude reads the imported file first.
  4. Handle a CLAUDE.local.md. Type /config and check the Project instructions setting. Setting it to claude-md-and-agents-md keeps your local file and still reads AGENTS.md.
  5. Confirm the load. Run /memory and look for the AGENTS.md path in the list. For the full launch view, run /context all and check the Memory files section. An interactive session may also print a start-up line such as no CLAUDE.md found; AGENTS.md loaded: <path>.

Check that it worked: the AGENTS.md path appears in /memory, and a rule that exists only in AGENTS.md changes Claude's behavior in a test prompt. If the path is missing, return to step 2.

Pitfalls

  • A stray CLAUDE.local.md blocks AGENTS.md without an error. You notice it because the start-up line is missing and /memory shows no AGENTS.md path. Fix it with step 4 or delete the local file.
  • Quoted import paths do nothing. @"AGENTS.md" is not imported at all. Write @AGENTS.md with no quotes. A path containing spaces needs a backslash before each space.
  • Backticks turn an import into plain text. Writing ` @AGENTS.md ` keeps the literal string and loads nothing. Remove the backticks.
  • A symlink breaks on Windows clones. A CLAUDE.md symlinked to AGENTS.md checks out as a one-line text file on Windows unless git symlink support is enabled. The @AGENTS.md import avoids this.
  • Duplicate content from a hook. A SessionStart hook that prints AGENTS.md adds a second copy once Claude reads the file directly. Remove the hook.

Subdirectory AGENTS.md files are a separate case. They load only when Claude opens a file in that subdirectory with the Read tool, so do not expect them at launch.

When to use a skill instead

A one-time import is a small edit that you can make by hand, so a skill is overkill for it. The point where a skill helps is the file's content. AGENTS.md loads at the start of every session, so every line costs context on every run. The agent-instruction-files skill is listed on this site as a related skill for writing, auditing and restructuring these files. Use it when the file has grown long, contains rules nobody can check, or mixes project facts with stale notes. For the import mechanics in this guide, the manual steps above are enough.

FAQ

Does Claude Code read AGENTS.md? Yes, as project instructions, but only when no CLAUDE.md, CLAUDE.local.md or .claude/CLAUDE.md is in or above the working directory. The agents.md site itself does not name Claude Code, so the Claude Code memory docs are the reference for this behavior.

Can I use AGENTS.md and CLAUDE.md together? Yes. Either import @AGENTS.md from CLAUDE.md, or set Project instructions to claude-md-and-agents-md. Claude Code skips an AGENTS.md it has already loaded, so the content is not read twice.

How do I confirm Claude Code loaded AGENTS.md? Run /memory and look for the AGENTS.md path. Run /context all for the Memory files section, which shows what loads at launch.

Platform Score is our assessment under a published method. It is not a safety guarantee.

Terms this guide uses

This item is a worked example in the AI glossary for:

Next steps

  1. CLAUDE.md examples: four stack templates, rules, imports Read next.
  2. CLAUDE.md vs AGENTS.md: Which Agents Read Which File Read next.
  3. Claude Code compatibility Install evidence per tool.
  4. All guides by topic Browse everything.

Sources

This page is not offered to search engines yet: The content file does not mark this page indexable yet.