How should I share project instructions between AGENTS.md and CLAUDE.md?
2.1.277+ loads AGENTS.md when no project CLAUDE.md. Import @AGENTS.md or set claude-md-and-agents-md. Bedrock/Vertex/Foundry still need the import.
From Claude Code 2.1.277+, a repo with AGENTS.md and no project CLAUDE.md / CLAUDE.local.md on the path loads AGENTS.md by default. To keep one shared file and Claude-only notes: put @AGENTS.md at the top of a sibling CLAUDE.md, or set Project instructions in /config to claude-md-and-agents-md. Native AGENTS load is not yet available on Bedrock, Vertex, or Foundry - use the import there.
CLAUDE.local.md) present → CLAUDE only unless you @-import or switch Project instructions. Labs volume for agents.md claude.md is unmeasured (2026-09-19).What Claude Code loads by default
CHANGELOG 2.1.277 (fetched 2026-09-19; head also lists 2.1.278):
Added AGENTS.md support: in a project with no CLAUDE.md, Claude Code reads AGENTS.md instead; change it under "Project instructions" in
/config(not yet on Bedrock, Vertex or Foundry)
Official memory docs spell out the default table:
| Your repository has | Claude reads |
|---|---|
AGENTS.md, and no CLAUDE.md / CLAUDE.local.md in the working directory or above | AGENTS.md (and .claude/AGENTS.md ancestors) |
AGENTS.md plus a counting CLAUDE.md / .claude/CLAUDE.md / CLAUDE.local.md | CLAUDE.md files only (AGENTS skipped unless you change the setting) |
CLAUDE.md that imports @AGENTS.md | CLAUDE content + imported AGENTS |
Do not count for the “has CLAUDE” check: ~/.claude/CLAUDE.md, org managed CLAUDE.md, and .claude/rules/. Those keep loading alongside AGENTS when the default applies.
Confirm in an interactive session with a line like no CLAUDE.md found; AGENTS.md loaded: …. Direct AGENTS load is not listed under Memory files in /context or /memory. [GAP] CLI untested same-day - load-line wording cited from docs only, not reproduced live.
Version floor: v2.1.277+. Prior CHANGELOG context: 2.1.271-272 notes. Same-day catch-up: Claude Code 2.1.273-2.1.278.
Share one file without drift
Docs-only recipes:
- AGENTS-only repo - Commit
AGENTS.md, no project CLAUDE. Upgrade to 2.1.277+. Check the load line on the next session (first session after install/upgrade may still skip native AGENTS). @AGENTS.mdimport (recommended for dual-file or provider fallback) - SiblingCLAUDE.md:
Claude reads the import first, then Claude-specific notes. Keeping the import does not double-read AGENTS under@AGENTS.md ## Claude Code Use plan mode for changes under `src/billing/`.claude-md-and-agents-md.- Always both files -
/config→ Project instructions →claude-md-and-agents-md. Or set user/managed settings:
Put that in{ "pluginConfigs": { "agents-md@builtin": { "options": { "instructionFiles": "claude-md-and-agents-md" } } } }~/.claude/settings.json, a--settingsfile, or managed settings - ignored in project/local settings files. Other values:claude-md-or-agents-md(default),claude-md,managed-only. - Symlink -
ln -s AGENTS.md CLAUDE.mdworks on Unix if you accept Edit/Write refusing to write through the link, and Windows Admin/Developer Mode +core.symlinkscheckout caveats. Prefer the@import for Windows/clone-safe teams. - Drop SessionStart hooks that print AGENTS, and word-only “please read AGENTS.md” lines. Keep
@AGENTS.mdif some sessions still lack native load.
Adjacent settings hygiene: /skill-doctor. Skills/plugins sync across Claude.ai ↔ Claude Code: How do I sync Claude.ai skills and plugins into Claude Code?.
When native AGENTS.md support is unavailable
CHANGELOG: not yet on Bedrock, Vertex, or Foundry. Memory docs also list sessions that never fetch feature flags (telemetry disabled / third-party providers), the first session after install/upgrade, and sessions where disableAllHooks / allowManagedHooksOnly or a disabled built-in agents-md plugin apply. In those sessions Project instructions may not appear in /config, and Claude reads CLAUDE.md only.
Fallback: always @AGENTS.md from a CLAUDE.md. Do not invent alternate flags or env vars.
Pitfalls
- Adding
CLAUDE.local.mdcounts and silently stops default AGENTS load - setclaude-md-and-agents-mdto keep both. - Default is or, not merge-both.
- HN thread (item 49760187) is discourse only - not product truth.
AGENTS.local.md,AGENTS.override.md, and anything under.agents/are not read as AGENTS instruction files.- Don’t claim native AGENTS on Bedrock/Vertex/Foundry.
- Spec B siblings on settings behavior: readonly-git permissions, commit attribution.
FAQ
Does Claude read AGENTS.md if I already have CLAUDE.md?
Default no - CLAUDE only. Use @AGENTS.md import or Project instructions claude-md-and-agents-md.
Where do I change the setting?
/config → Project instructions, or user/managed pluginConfigs["agents-md@builtin"].options.instructionFiles. Ignored in project/local settings files.
Why isn’t AGENTS in /memory or /context?
Direct AGENTS load isn’t listed there. Look for the AGENTS.md loaded line, or ask what project instructions say.
Bedrock / Vertex / Foundry?
Native AGENTS support not available yet (CHANGELOG + docs). Import @AGENTS.md from CLAUDE.md.
Symlink or @ import?
Import preferred for Windows and clone safety. Symlink OK on Unix if you accept Edit-tool and git symlink caveats (docs).
Sources (checked 2026-09-19)
- How Claude remembers your project - AGENTS.md defaults, Project instructions values, share/migrate, unavailable sessions
- Claude Code CHANGELOG.md - 2.1.277 AGENTS.md bullet (raw fetched same-day; head 2.1.278)
- Discourse only (not product truth): HN item 49760187
- [GAP] CLI untested - no live
/configlabels or load-line capture beyond docs examples
