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 above | What Claude reads |
|---|---|
| AGENTS.md only | AGENTS.md |
| AGENTS.md and CLAUDE.md | CLAUDE.md only |
CLAUDE.md with @AGENTS.md inside it | CLAUDE.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
- 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. - Look for conflicting files. Search the working directory and each parent for
CLAUDE.md,.claude/CLAUDE.mdandCLAUDE.local.md. ACLAUDE.local.mdis easy to forget because it is often gitignored. - 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.mdalone on its own line, and write Claude-specific instructions below it. Claude reads the imported file first. - Handle a CLAUDE.local.md. Type
/configand check the Project instructions setting. Setting it toclaude-md-and-agents-mdkeeps your local file and still reads AGENTS.md. - Confirm the load. Run
/memoryand look for the AGENTS.md path in the list. For the full launch view, run/context alland check the Memory files section. An interactive session may also print a start-up line such asno 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
/memoryshows 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.mdwith 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.mdsymlinked to AGENTS.md checks out as a one-line text file on Windows unless git symlink support is enabled. The@AGENTS.mdimport 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.
Related skills in this catalog
Platform Score is our assessment under a published method. It is not a safety guarantee.
Related guides
Terms this guide uses
This item is a worked example in the AI glossary for:
Sources
- https://code.claude.com/docs/en/memory (accessed 2026-11-21)
- https://agents.md (accessed 2026-11-21)
This page is not offered to search engines yet: The content file does not mark this page indexable yet.