Making Claude Code follow an existing AGENTS.md file

CCAR-F Claude Code Configuration & Workflows Easy Question 46 of 59

Your repository maintains a detailed AGENTS.md that two other coding agents read and will keep reading. Claude Code sessions in the repo ignore those conventions. Nobody wants a second copy of the same text that can drift out of step, and the team also has three Claude-specific notes to add. Project settings in this repo are checked into source control, not deployed as managed policy.

How should the team make Claude Code follow those conventions?

Show answer and explanation

BCreate a CLAUDE.md whose first line is @AGENTS.md, with the Claude-specific notes under it

Claude Code reads CLAUDE.md and not AGENTS.md, so one source survives by creating a CLAUDE.md that imports the existing file, with the Claude-specific notes appended below it. The import command is the right move when you are migrating off another coding agent for good, because it appends a one-time copy, which is the second copy this team is trying to avoid. Renaming is right when Claude Code is the only agent in the repository, and here two others still look for the old filename. The claudeMd key is how an organization ships instruction content centrally, and it is honored only in managed and policy settings, so a checked-in project settings file has no effect.

Source: code.claude.com/docs/en/memory

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 59 original CCAR-F practice questions