Claude Code ignores AGENTS.md when CLAUDE.md exists unless explicitly imported
·2026.11.04 11:11
Key point
A conflict between AGENTS.md and CLAUDE.md causes the former to be skipped by default, requiring a specific import syntax or configuration change to load both.
Details
- When both AGENTS.md and CLAUDE.md exist in a repository, Claude Code loads only CLAUDE.md by default, ignoring AGENTS.md entirely.
- To load both files, users must add
u/AGENTS.mdas the first line of CLAUDE.md or set the project instruction configuration toclaude-md-and-agents-md. - The behavior was verified in Claude Code 2.1.312 using test folders with distinct nonsense rules, confirming that AGENTS.md rules were absent when CLAUDE.md was present.
- Additional files like CLAUDE.local.md or .claude/CLAUDE.md also hide AGENTS.md, while AGENTS.local.md and AGENTS.override.md are not read at all.
- Direct reading of AGENTS.md requires version 2.1.277 or later, with some sessions like Bedrock or telemetry-off modes requiring version 2.1.281.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.