AGENTS.md in Claude Code: why it isn't loading

Claude Code reads AGENTS.md since v2.1.277, but only when no CLAUDE.md or CLAUDE.local.md is on the path. How to check it loaded, each cause and its fix.

On this page

Claude Code reads AGENTS.md as your project instructions since v2.1.277, with no import or setting needed. When it isn’t loading your AGENTS.md, the usual cause is a CLAUDE.md somewhere on the path. Claude Code reads AGENTS.md only when there is no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in your working folder or any folder above it, and a CLAUDE.local.md you added for personal notes counts. The other causes are an old version (reading AGENTS.md needs v2.1.277, and v2.1.281 on Amazon Bedrock or with telemetry off) and the Project instructions setting in /config. The quickest fix that works everywhere is a CLAUDE.md whose first line is @AGENTS.md.

Everything below is from Claude Code’s memory documentation, checked on 27 November 2026. Many pages that rank for this question were written before Claude Code read AGENTS.md at all, and still say it never does. Claude Code memory: what it keeps, and where maps everything Claude Code remembers, and every guide on it.

Symptom Cause Fix
Ignored in one project, read in others A CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md on the path Import it with @AGENTS.md, or set Project instructions to claude-md-and-agents-md
Ignored everywhere, no Project instructions in /config Version before v2.1.277, or the built-in plugin disabled in /plugin Update, or re-enable the plugin
Ignored on Bedrock or with telemetry off Version before v2.1.281 Update to v2.1.281 or later
Ignored once, right after an upgrade First session after upgrading from v2.1.276 or earlier Start a new session
Ignored everywhere, setting is visible Project instructions set to claude-md or managed-only Set it back to the default or to claude-md-and-agents-md
A subfolder’s AGENTS.md never shows up It loads only when Claude reads a file in that folder Expected; import it from a root CLAUDE.md if it must load at start
/memory doesn’t list it, but Claude follows it Version before v2.1.280 didn’t list it Update, or ask Claude what its project instructions say

How do I check whether Claude Code read AGENTS.md?

Run /memory and look for the path of your AGENTS.md in the list, or run /context all and look under Memory files. In an interactive session, Claude Code also prints a line in the conversation when it falls back to AGENTS.md, such as no CLAUDE.md found; AGENTS.md loaded: followed by the path.

Before v2.1.280, neither /memory nor /context listed an AGENTS.md that Claude read directly. On those versions the docs suggest asking Claude what its project instructions say. Check your version first:

$ claude --version

A CLAUDE.md on the path stops AGENTS.md

Claude Code’s default is one or the other: CLAUDE.md files if there are any, AGENTS.md files if there are none. When none count, it reads every AGENTS.md and .claude/AGENTS.md in your working folder and the folders above it. Three files count for that check, in your working folder or any folder above it:

  • CLAUDE.md
  • .claude/CLAUDE.md
  • CLAUDE.local.md

Three don’t count, and load alongside AGENTS.md: your user file ~/.claude/CLAUDE.md, an organization’s managed CLAUDE.md, and the files in .claude/rules/.

The one people miss is CLAUDE.local.md. A project runs on AGENTS.md, you add a gitignored CLAUDE.local.md with two personal lines, and from then on Claude reads those two lines instead of the project’s rules. Your teammates see no difference, which makes it hard to spot. The same goes for a CLAUDE.md in a parent folder, for example one at the root of a folder that holds several repositories.

Fix 1: import AGENTS.md from CLAUDE.md

Make @AGENTS.md the first line of a CLAUDE.md (or of your CLAUDE.local.md), with anything Claude-only below it:

CLAUDE.md
@AGENTS.md

## Claude Code only

Use plan mode for changes under src/billing/.

This works on every version and in every kind of session, Bedrock and telemetry-off sessions included. It’s the route the docs recommend, and the one to use if you previously worked around the problem with a SessionStart hook that prints AGENTS.md: that hook now loads the file twice.

A symlink from CLAUDE.md to AGENTS.md also works, but the docs advise against it if anyone on the project uses Windows. Making a symlink there needs Administrator rights or Developer Mode, and Git checks a committed symlink out as a one-line text file unless core.symlinks is on.

Fix 2: set Project instructions to read both

Type /config and set Project instructions. It takes four values:

Value Claude reads at launch
claude-md-or-agents-md (default) CLAUDE.md files, or AGENTS.md files when there is no CLAUDE.md or CLAUDE.local.md
claude-md-and-agents-md Both: each folder’s CLAUDE.md files first, then its AGENTS.md
claude-md CLAUDE.md files only
managed-only Only the managed CLAUDE.md and auto memory

claude-md-and-agents-md skips an AGENTS.md that was already loaded through an import or a symlink, so it doesn’t double up with Fix 1. The change applies from your next message.

To set it in a file, it goes under pluginConfigs in ~/.claude/settings.json, a --settings file or managed settings, with the key cc-plugin-agents-md@builtin and the option instructionFiles. It is ignored in a project’s .claude/settings.json and in settings.local.json, so a teammate can’t switch it on for you through the repository. Before v2.1.285 the plugin’s ID was agents-md@builtin; v2.1.285 and later read either.

Why does Claude Code ignore AGENTS.md on every project?

When the Project instructions setting doesn’t appear in /config at all, the session can’t read AGENTS.md, and it reads CLAUDE.md files only. The docs list three reasons:

  • The version is before v2.1.277. Update Claude Code.
  • The built-in plugin that reads AGENTS.md is disabled in /plugin. Enable it again.
  • It’s the first session after upgrading from v2.1.276 or earlier. In some cases Claude reads AGENTS.md only from the next session on.

Separately, before v2.1.281 some sessions, such as those on Amazon Bedrock or with telemetry disabled, read CLAUDE.md files only. That is where the claim that AGENTS.md “needs telemetry” comes from: it was a limit of older versions, fixed in v2.1.281. On any of these, Fix 1 works without updating.

Files Claude Code never reads, and folders it reads late

Some AGENTS.md setups come from other tools and don’t carry over:

  • AGENTS.override.md, AGENTS.local.md and anything under .agents/ aren’t read. Codex reads AGENTS.override.md first in each folder, but Claude Code doesn’t.
  • A subfolder’s AGENTS.md isn’t loaded at launch. It loads when Claude opens a file in that subfolder with the Read tool, and only if that subfolder has no CLAUDE.md of its own. Files in your working folder and the folders above it load at the start.
  • Folders added with --add-dir never contribute their AGENTS.md, even with CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1, which loads their CLAUDE.md files.

Imports inside an AGENTS.md work like those in a CLAUDE.md: @path is expanded, up to four hops deep.

When the fix works but the problem doesn’t go away

If AGENTS.md now loads and Claude still drifts from it, loading was not the problem. What’s left is usually one of two things: the file has grown past what is followed well (see Your CLAUDE.md is too long), or you’re asking a rules file to carry what the agent learned last week. CLAUDE.md vs MEMORY.md vs AGENTS.md sorts out which file holds what.

The second case is what Memorinth is for. It keeps what agents learn as Markdown notes in a cortex outside your repository, and memorinth setup claude-code adds a session-start hook that hands Claude a briefing from it. That briefing arrives whichever instructions file loaded, and setup doesn’t touch your CLAUDE.md or AGENTS.md: rules stay in the file you write, and what was learned goes to the cortex.

Next step

Run /memory now and confirm your AGENTS.md is in the list. If it isn’t, add @AGENTS.md to the top of your CLAUDE.md. To give Claude Code memory beyond its rules files, see Give Claude Code a long-term memory, and What goes where for which notes belong in instructions and which in memory.

All posts