Updated 2026-06-02 · independent, verified against each tool's docs

AGENTS.md vs CLAUDE.md

Claude Code reads CLAUDE.md. Almost every other AI coding tool reads AGENTS.md. Here's the difference, whether you need both, and the one-line way to make them share a single file.

If you use Claude Code and another tool — Codex, GitHub Copilot, Cursor, Gemini CLI, Windsurf, Cline, Amp, or Aider — you've probably ended up maintaining the same project rules in two files. This is the single largest open feature request in Claude Code: issue #6235, with 5,270+ reactions, asking Claude Code to read AGENTS.md too. As of mid-2026 it is still open.

The short answer

AGENTS.md is the cross-tool standard — a plain-Markdown instruction file at the repo root that most coding agents read. CLAUDE.md is Claude Code's own instruction file. They serve the same purpose; they're just different filenames.

You don't have to choose. Make AGENTS.md your single source of truth and point Claude Code at it with a one-line import (or a symlink). One real file, every tool reads it, nothing drifts. Jump to how →

What each file is

CLAUDE.md

Claude Code's instruction file. Read from the repo root and from ~/.claude/CLAUDE.md (global). Claude Code does not read AGENTS.md on its own today.

AGENTS.md

The cross-tool convention (agents.md). Generic name, plain Markdown, repo root. Codex, Amp, and GitHub Copilot read it natively; others read it with one line of config or a symlink.

Why did everyone converge on AGENTS.md? The name isn't vendor-specific, the format is plain Markdown (no DSL), and it lives at the repo root next to README.md. It's the obvious shared choice once tools decide to interoperate.

Which tool reads which file (verified 2026-06-02)

ToolReads by defaultTo share AGENTS.md
Claude CodeCLAUDE.mdimport / symlink
CodexAGENTS.mdnothing
AmpAGENTS.mdnothing
GitHub CopilotAGENTS.md (agent/chat)nothing
Cursor.cursorrulessymlink
Windsurf.windsurfrulessymlink
Cline.clinerulessymlink
Aider— (must be told)config: read: AGENTS.md
Gemini CLIGEMINI.mdconfig: context.fileName

native reads AGENTS.md already · config needs one line in a settings file · file/symlink reads its own filename, point it at AGENTS.md with a symlink. Conventions change — recheck against each tool's docs before relying on it.

Do you need both files?

If every rule is shared (conventions, test commands, security rules): no — keep one real AGENTS.md and link Claude Code to it. Nothing to maintain twice.

If you have a few Claude-Code-only rules (a specific hook, a /command, sub-agent behavior): keep a tiny CLAUDE.md that imports AGENTS.md and holds just those extra lines underneath. Still one shared source of truth.

How to make them share one file

Recommended: the @AGENTS.md import

This is the method documented in Claude Code's own memory docs. Make CLAUDE.md contain just this — Claude loads AGENTS.md at session start, so there's one real file and it can't drift:

@AGENTS.md

Add any Claude-only rules below that line; the other tools never see them. On Windows this needs no Admin/Developer Mode (unlike a symlink). First run shows a one-time approval for the import — accept it.

Lighter: a symlink (when you need no Claude-only section)

ln -sf AGENTS.md CLAUDE.md
ls -l CLAUDE.md      # confirm:  CLAUDE.md -> AGENTS.md

On a team, symlinks don't always survive every clone — add a pre-commit check that fails when copies drift.

Get the exact setup for your stack (free). The AGENTS.md Setup Generator prints the precise commands and files for whichever tools you pick (Claude Code, Codex, Copilot, Cursor, Windsurf, Cline, Aider, Gemini CLI) — including the team drift guard. Browser-only, no signup. There's also a free field-guide and an MIT drift-checker hook.

FAQ

Does Claude Code read AGENTS.md?

Not on its own, as of mid-2026 (issue #6235 is still open). You bridge it with a one-line @AGENTS.md import in CLAUDE.md, or a symlink. Some blogs claim Claude Code reads AGENTS.md "as a fallback" — that is not accurate; the import is the supported bridge.

Which should I name my file — AGENTS.md or CLAUDE.md?

Make AGENTS.md the real file (it's the cross-tool standard) and point CLAUDE.md at it. That way every other tool works with zero extra config and Claude Code reads it via the import/symlink.

Can I use both with no duplication?

Yes. The @AGENTS.md import keeps one real file. A symlink does too. Only avoid keeping two real copies edited by hand — that's what drifts.

What about Cursor's .cursor/rules/ or Windsurf's .windsurf/rules/?

Those newer directory formats can't be symlinked from one file. Use them only for genuinely tool-specific rules; keep shared rules in AGENTS.md and symlink the legacy single-file name (.cursorrules, .windsurfrules) to it.

How do I keep AGENTS.md and CLAUDE.md in sync on a team?

Prefer the import or symlink (one real file). Where real copies are unavoidable, add a pre-commit hook (and a CI step) that fails when any copy diverges from AGENTS.md. The generator emits both.

Independent reference by an operator running Claude Code 800+ hours, maintainer of cc-safe-setup (free MIT safety hooks). Want the full kit — the verified matrix, all six interop paths, copy-paste templates, and a rollback-safe migration runbook — in one place? AGENTS.md × Claude Code Interop Handbook ($12, English) · a deeper Japanese edition is on Zenn. Not affiliated with Anthropic, OpenAI, GitHub, or Google. Tool conventions verified 2026-06-02; recheck before relying on any single line.