Answers
"Read AGENTS.md" in CLAUDE.md does not load it: put @AGENTS.md on its own line
Published
A line such as "Read AGENTS.md before starting any task" does not load AGENTS.md: Claude sees the file only if it decides to open it. When a repo has a CLAUDE.md, Claude Code reads CLAUDE.md files only by default, so the reliable fix is @AGENTS.md on its own line at the top of CLAUDE.md, which imports the file into every session.
For Claude Code. Vendor facts are from the pages linked below, read on November 18, 2026.
The free fix, in one line
- Replace the sentence with
@AGENTS.mdon its own line at the top of CLAUDE.md. Imports are expanded at launch, up to four hops deep. - Put anything that only Claude needs below the import.
- Or make CLAUDE.md a symlink to AGENTS.md. Anthropic notes a Windows clone without
core.symlinkschecks a symlink out as a one-line text file. - Or change Claude Code’s Project instructions setting to
claude-md-and-agents-md, which loads both files in every directory. - Check it in a session with
/context: AGENTS.md should be listed under Memory files.
# CLAUDE.md
@AGENTS.md
## Claude only
- Use the Bash tool for git, never the web UI.The numbers
| Measure | Value | Source |
|---|---|---|
| Root AGENTS.md files with a root CLAUDE.md beside them | 36.5% (weighted, 745 pairs) | Harbor study, 18 Oct 2026 |
| Of those CLAUDE.md files: ask Claude in a sentence to read AGENTS.md | 14.9% | Harbor study, 18 Oct 2026 |
| Never mention AGENTS.md at all | 16.4% (95% margin about 2.7 points) | Harbor study, 18 Oct 2026 |
| Import it with @AGENTS.md | 25.4% | Harbor study, 18 Oct 2026 |
| Are a symlink to AGENTS.md | 23.0% | Harbor study, 18 Oct 2026 |
Study figures are weighted estimates from 1,935 CLAUDE.md and 1,970 AGENTS.md files sampled from public GitHub repositories on 18 October 2026, with GitHub's own counts for the totals. Every figure is in the study's CSV, and the method is in the study.
What the docs say
- Claude Code memory docs, AGENTS.md section: By default Claude reads AGENTS.md only when there is no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in the working directory or above it. A CLAUDE.md that imports AGENTS.md gets both.
- Claude Code memory docs, imports: CLAUDE.md files can import files with @path/to/import. Relative paths resolve from the importing file, and imports nest to a maximum depth of four hops.
Where Harbor fits
Harbor connects Claude Code, Codex, Cursor and GitHub Copilot (the CLI and VS Code agent mode; the cloud agent is not supported yet) through hooks and an MCP server. It reads the rules from both files at setup, so a rule that sat in AGENTS.md reaches the Claude Code session too, and its GitHub App checks each pull request against CLAUDE.md and AGENTS.md read from the base branch. Each rule shows how often it was served and how often an answer cited it. A citation is evidence a rule was used, not proof it was obeyed.
Read next
- Does Claude Code read AGENTS.md?
- Keep CLAUDE.md, AGENTS.md and .cursorrules in sync
- The study behind the numbers
- Claude Code strips HTML comments from CLAUDE.md, so a rule inside one never loads
- Antigravity CLI skips AGENTS.md in subfolders and drops rule files without a valid trigger
- Windsurf is now Devin Desktop: .devin/rules wins, and only one global_rules.md loads
- CLAUDE.md and AGENTS.md drift apart in 7% of repos that copy one into the other: import instead
- Every answer, by agent and problem
Questions
Does Claude Code follow "read AGENTS.md" written in CLAUDE.md?
Only if Claude decides to open the file. The sentence is an instruction, not an import, so whether AGENTS.md reaches the context depends on the model. @AGENTS.md on its own line is an import and always loads.
Does Claude Code read AGENTS.md if there is also a CLAUDE.md?
Not by default. With a CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in the folder you start in or above it, Claude reads the CLAUDE.md files only. Import AGENTS.md from CLAUDE.md, symlink it, or set Project instructions to claude-md-and-agents-md.
Should CLAUDE.md be a symlink or an import of AGENTS.md?
Either loads AGENTS.md. The import lets you add Claude-only lines below it and survives Windows clones; a symlink keeps one file but checks out as a one-line text file on Windows without core.symlinks.
How many repos get this wrong?
In our October 2026 sample of 745 repos with both files at the root, 14.9 percent asked Claude in a sentence and 16.4 percent never mentioned AGENTS.md, so in about 3 in 10 the AGENTS.md rules may never reach Claude.