Four assistants in one VS Code workspace can mean four instruction files saying slightly different things, and the one you forgot to update is the one that will quietly tell an agent to run a test command you deleted last month. The files have converged enough that this is now avoidable: most tools read AGENTS.md, and the ones that do not can be pointed at it with a one-line import or a one-sentence rule.
What Each Tool Reads
Claude Code reads CLAUDE.md (or .claude/CLAUDE.md) from the working directory and every directory above it, concatenated rather than overriding, with a gitignored CLAUDE.local.md for personal notes. It also loads .claude/rules/*.md, which can carry a paths field so a rule about migrations only costs context when a migration is open. If a repository has an AGENTS.md and no CLAUDE.md or CLAUDE.local.md anywhere in or above the working directory, it reads the AGENTS.md instead; if both exist, it reads only the CLAUDE.md files unless one of them imports the other with @AGENTS.md. That rule has a trap: adding a CLAUDE.local.md for your own uncommitted notes counts as having a CLAUDE.md, and silently stops AGENTS.md loading for you unless you change the project-instructions setting to load both. Anthropic's documentation is the reference for the loading order, and /articles/claude-code-in-a-repository-you-care-about covers how to work with it once it is in place.
GitHub Copilot in VS Code reads .github/copilot-instructions.md as its own always-on file, plus AGENTS.md at the repository root (the chat.useAgentsMdFile setting, on by default), and CLAUDE.md when chat.useClaudeMdFile is enabled. Targeted rules go in .github/instructions/*.instructions.md with an applyTo glob in the front matter. The documentation is explicit that applicable sources are additive and that there is no general precedence order between the files, so two that disagree are simply both in the prompt.
Continue reads Markdown files in .continue/rules/, loaded in lexicographical order (so 01-general.md precedes 02-frontend.md), each with optional globs, regex and alwaysApply front matter. Its rules documentation says nothing about AGENTS.md or CLAUDE.md, so treat .continue/rules/ as the thing you can rely on.
Cline reads rules from .clinerules/ and .cline/rules/ at the project root, merges them with global rules from a folder under the user's home directory (workspace rules win on a conflict), and also detects AGENTS.md, .cursorrules and .windsurfrules, each of which can be toggled off individually in its Rules panel. Rules can carry paths front matter to activate only for matching files; a rule without front matter is always active.
AGENTS.md itself is the common denominator: plain Markdown with no required fields, stewarded by the Agentic AI Foundation under the Linux Foundation, and listed as supported by Codex, Copilot's coding agent, Cursor, Zed, Gemini CLI, Devin, Windsurp and a long list of others. In a monorepo each subproject can have its own, and the file nearest the edited file wins.
One Source of Truth
Write the content once, in AGENTS.md at the root, and make everything else a pointer. For Claude Code, a CLAUDE.md containing the single line @AGENTS.md pulls it in; anything Claude-specific, such as which subagents to use, goes below the import. Copilot needs nothing: it reads AGENTS.md by default, so .github/copilot-instructions.md can either be deleted or hold only Copilot-specific lines. Cline detects the file. For Continue, add a rule in .continue/rules/ that says "Follow the conventions in AGENTS.md at the repository root" and make sure the file is in context; it is the one tool where the pointer is a sentence rather than a mechanism.
The failure case to design against is the one where a tool reads two files that disagree. Copilot's own guidance is to remove duplicate guidance and resolve contradictions at their source rather than assume one file overrides another, and Anthropic's says that given two contradictory instructions Claude may pick one arbitrarily. A repository that keeps a full CLAUDE.md and a full AGENTS.md written on different days is exactly that conflict: the day someone renames the test runner, one file says npm test and the other says pnpm test, and an agent reading both picks whichever it likes.
Check that the pointer worked. Claude Code's /context lists the memory files it loaded, and an interactive session prints a line when it falls back to AGENTS.md; Copilot shows the instructions it used under References on a response; Cline's Rules panel lists what it detected. Creating a file is not the same as a harness loading it.
What Belongs in the File
The useful content is what you would otherwise re-explain in every session: how to build, test and format (./cx.sh check, not "run the tests"); the structural decisions a newcomer would get wrong, such as a web root that is not where the framework expects it; naming and layout conventions a linter does not enforce; and the things not to touch, like generated files, committed build output or a vendored directory. Anthropic's advice is that the more specific and concise the instructions, the more consistently they are followed; Copilot's is to explain the reasoning behind a rule, because a rule with a why survives the edge case the rule did not anticipate.
A worked example: a Laravel project whose public directory is public_html/ rather than public/ encodes that in two places that must agree, the application bootstrap and the Vite configuration. A line in AGENTS.md saying so, naming both files, saves an agent from "fixing" one of them back to the default, which is a plausible-looking change that breaks the deployment. That one sentence has earned its place more than a paragraph on code style ever will.
What Does Not Belong
Anything a formatter or linter already enforces is wasted context; Copilot's documentation says to skip those rules outright, since the tool will apply them regardless and the agent has to read them every session. Personal preferences (your sandbox URL, your preferred test fixture) belong in CLAUDE.local.md or Cline's global rules, not in a committed file your colleagues inherit. Secrets have no place in any of them, since the file is sent to a model provider with every request.
Length costs more than it seems. Every tool loads these files into the prompt on every turn, so a three-thousand-word file is paid for on every message, and the model's attention to any one line falls as the file grows. Anthropic's guidance is to keep each CLAUDE.md under about 200 lines, and it notes that an @import organises a long file without reducing its cost, because the imported file loads with it. Claude Code's path-scoped .claude/rules/, Copilot's applyTo, Continue's globs and Cline's paths exist precisely so that the always-on file can stay short and the detail loads only when relevant. If an instruction only matters for one directory, put it in that directory's AGENTS.md rather than at the root.
Finally, these files are context, not enforcement. Anthropic's documentation says plainly that if an action must be blocked regardless of what the model decides, a PreToolUse hook is the tool, not a sentence in CLAUDE.md. Write the instructions file for guidance, and reach for a hook or a CI check for anything you cannot afford to have ignored.