Claude Code · tool · fg-0482

Claude Code ignores AGENTS.md when the repository also has a CLAUDE.md

If you see Rules written in AGENTS.md are not followed while CLAUDE.md rules are, the cause and the fix for Claude Code are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Rules written in AGENTS.md are not followed while CLAUDE.md rules areAGENTS.md is never read at all on Claude Code older than v2.1.277
Cause
Claude Code reads AGENTS.md directly only when no CLAUDE.md or CLAUDE.local.md exists in the working directory or above it, and only from v2.1.277. When both kinds of file exist, only the CLAUDE.md files load.
Fix
Import AGENTS.md from CLAUDE.md so one file serves Claude Code and the other agents, or set Project instructions to claude-md-and-agents-md in /config (or pluginConfigs in ~/.claude/settings.json) so both load. Update Claude Code first.
Apply
echo '@AGENTS.md' >> CLAUDE.md && claude update
Affected
Claude Code before v2.1.277 (no direct AGENTS.md support), and any version when a CLAUDE.md is present, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun