AGENTS.md vs CLAUDE.md: which file do your coding agents read?

By Arun Dass · Published 12 October 2026 · Updated 13 October 2026

AGENTS.md is an open format that most coding agents read for project instructions, including Codex, Cursor, GitHub Copilot and Gemini CLI. CLAUDE.md is Claude Code’s own file. Claude Code now reads AGENTS.md too, when a project has no CLAUDE.md, so one file can brief every agent your team uses.

What is AGENTS.md?

AGENTS.md is a Markdown file at the root of a repository that tells coding agents how to work in it: how to build and test, the code style, and anything a new contributor would need. Its own site calls it “a README for agents”. It has no required fields.

The format grew out of work between OpenAI Codex, Amp, Google’s Jules, Cursor and Factory, and is now stewarded by the Agentic AI Foundation under the Linux Foundation. In a monorepo you can put an AGENTS.md in each package, and agents read the nearest one, so the closest file to the code being edited wins.

What is CLAUDE.md?

CLAUDE.md is Claude Code’s memory file: plain Markdown that Claude Code reads at the start of every session. It can live in several places, and Claude Code loads all of them, broadest first.

FileWhereWho it is for
Project./CLAUDE.md or ./.claude/CLAUDE.mdThe whole team, through the repository
Local./CLAUDE.local.md (add it to .gitignore)Only you, in this project
User~/.claude/CLAUDE.mdOnly you, in every project
Managed policyA system folder set by ITEveryone in the organization

Claude Code also reads CLAUDE.md files in folders above where you start it, and loads the ones in subfolders when it works there. A CLAUDE.md can pull in other files with @path, for example @docs/testing.md.

Which file does each coding agent read?

AgentReadsNotes
Claude CodeCLAUDE.md, or AGENTS.md when there is no CLAUDE.mdReading AGENTS.md directly needs version 2.1.277 or later
CodexAGENTS.mdAlso ~/.codex/AGENTS.md for you, and AGENTS.override.md to override a folder
Cursor.cursor/rules/*.mdc and AGENTS.mdThe Cursor CLI also reads a CLAUDE.md at the project root
GitHub Copilot, Gemini CLI, Junie, Amp, OpenCode, Kilo CodeAGENTS.mdListed as supporting it on agents.md

Checked against each maker’s documentation on 12 October 2026.

How do you use one file for every agent?

  1. Write your project instructions in AGENTS.md at the root of the repository and commit it.
  2. If you do not need Claude-only instructions, stop there: Claude Code reads AGENTS.md when there is no CLAUDE.md.
  3. If you do, create a CLAUDE.md that starts with the line @AGENTS.md, then add the Claude-only parts below it. Claude Code reads both; other agents read AGENTS.md.
  4. In a monorepo, add an AGENTS.md to each package that needs its own commands or rules.
  5. Keep personal preferences out of the shared file: CLAUDE.local.md and ~/.codex/AGENTS.md are for you alone.

A CLAUDE.md that shares AGENTS.md with every other tool:

@AGENTS.md

## Claude Code only
- Use the test-writer subagent for new tests.
- Run /review before opening a pull request.

What should go in AGENTS.md or CLAUDE.md?

The AGENTS.md project suggests a project overview, build and test commands, code style, testing instructions and security considerations. Write what an agent would get wrong without being told, and leave out what it can read from the code.

# AGENTS.md

## Setup
- Install: pnpm install
- Dev server: pnpm dev

## Tests
- Run pnpm test before every commit; all tests must pass.
- Tests sit next to the file they cover, as name.test.ts.

## Style
- TypeScript strict mode. No default exports.
- Use the logger in src/log.ts, never console.log.

## Don’t
- Edit files in src/generated/; run pnpm codegen instead.
  • Keep it short. Anthropic suggests under 200 lines for a CLAUDE.md, because every line is loaded into every session.
  • Be specific: “run pnpm test” beats “test your changes”.
  • Remove rules that contradict each other; an agent may follow either one.
  • Run /init in Claude Code to draft a CLAUDE.md from your codebase, then edit it.

How does Friday Work use AGENTS.md?

Friday Work runs Claude Code, Codex, Cursor and 11 more coding agents side by side in one session. Each reads the project’s instruction files as it normally would. Friday adds a project brain: what agents learn on a repository, from every tool, briefs the next agent that works on it.

Sources

Common questions

Does Claude Code read AGENTS.md?

Yes, from version 2.1.277. It reads AGENTS.md when your project has no CLAUDE.md or CLAUDE.local.md. If you have a CLAUDE.md, add @AGENTS.md to it to load both.

Should I rename CLAUDE.md to AGENTS.md?

If your team uses more than one coding agent, yes: move the shared instructions to AGENTS.md and keep a short CLAUDE.md that imports it, for anything only Claude Code needs.

Can I have both AGENTS.md and CLAUDE.md?

Yes. Claude Code reads CLAUDE.md and ignores AGENTS.md unless CLAUDE.md imports it with @AGENTS.md. Other agents read AGENTS.md.

Where does CLAUDE.md go?

At the root of the repository for the team, in ~/.claude/CLAUDE.md for your own preferences, and in CLAUDE.local.md for personal notes on one project.

What is CLAUDE.local.md?

Your private CLAUDE.md for one project. It loads after CLAUDE.md and should be in .gitignore so it is not shared.

What are Cursor rules?

Files in .cursor/rules with the .mdc extension, each with frontmatter that says when it applies. Cursor reads AGENTS.md too, as a simpler option.

How long should AGENTS.md be?

As short as it can be while covering what agents get wrong. Anthropic suggests under 200 lines for CLAUDE.md, and the same reasoning holds for AGENTS.md.

Run your next task in Friday.

Free on your own, in your browser or on Windows and Mac. A new team gets Team Basic free for 7 days. No card required.

One email, nothing else. No newsletter.