Skip to content
For your teamWhat one developer teaches an agent, a teammate’s agent can use.How it worksWhere a lesson starts and how it reaches every agent.Code reviewYour team’s knowledge, checked in every PR.SecurityWhat it sends, what it changes and how to leave.Book a call30 minutes with Roei, if you want a hand. Never required.
On your ownYour corrections follow you across agents and repos.Install itnpx harborloop init, in your repo.Every commandWhat the CLI does, and how to take it off again.
DocsPricingSign in
Start free →
For teamsFor individualsHow it worksCode reviewSecurityDocsPricingSign inStart free →
Home/Blog

Blog

  • Supermemory alternatives
  • PR review against AGENTS.md
  • Claude Code second brain
  • Why Copilot ignores it
  • Cursor Team Rules
  • Rules vs skills
  • Claude Tag vs Claude Code
  • GitHub Copilot Memory
  • Codex memories
  • Cursor memories
  • Claude Code auto memory
  • Claude Code team memory
  • Supermemory Company Brain alternatives
  • 3,905 files checked
  • Why Codex ignores it
  • Mem0 alternatives
  • Codex skills
  • Karpathy's LLM wiki
  • Auto mode
  • Memory or documentation?
  • Best company brain tools
  • Claude Code and AGENTS.md
  • Claude Code skills
  • Claude Code hooks
  • claude-mem
  • Claude Code best practices
  • Karpathy CLAUDE.md
  • AGENTS.md vs CLAUDE.md
  • Cursor rules
  • copilot-instructions.md
  • Why Claude ignores it
  • CLAUDE.md length
  • Committing CLAUDE.md
  • Agent memory compared
  • CLAUDE.md vs skills vs hooks
  • Make Claude Code remember
  • Review comments to rules
  • Slack decisions
  • Company brain
  • Context engineering, Claude 5
  • Context rot, stale rules
  • AGENTS.md research
  • ADRs for agents
  • Memory poisoning
  • Best MCP memory servers
  • Shared memory across agents
  • Growing CLAUDE.md
  • Which rules got used

Blog

AGENTS.md vs CLAUDE.md: which tools read which

Published: October 30, 2026

Both are plain markdown instructions an agent reads at session start. AGENTS.md is the shared name that Codex, Cursor, Copilot, Antigravity CLI and others read. CLAUDE.md is Claude Code's own. Since v2.1.277 Claude Code also reads AGENTS.md, but by default only when no CLAUDE.md exists. Keep the rules in AGENTS.md and import it.

Every fact below was checked against the vendor's own docs and release notes on 2026-10-05. Three rows changed in the two weeks before that, so the date matters.

Which AI coding tools read AGENTS.md, and which read CLAUDE.md?

ToolReads by defaultAGENTS.mdCLAUDE.md
Claude Code 2.1.289CLAUDE.md, .claude/CLAUDE.md, CLAUDE.local.md, .claude/rules/Yes, when the project has no CLAUDE.md; both with the claude-md-and-agents-md mode. Every session since 2.1.281, Bedrock and telemetry-off included.Yes
OpenAI CodexAGENTS.override.md or AGENTS.md, global then repo root down to the working directoryYes, in trusted projects. Since 0.150.0 an untrusted project's AGENTS.md is not readOnly if you add it to project_doc_fallback_filenames
Cursor.cursor/rules/*.mdc, AGENTS.md, CLAUDE.mdYes, root and subdirectoriesYes, at the project root, applied to every conversation
Copilot cloud agent.github/copilot-instructions.md, .github/instructions/*.instructions.mdYes, anywhere; the nearest one winsYes, a single one at the repo root (or GEMINI.md)
Copilot in VS Codecopilot-instructions.md, *.instructions.mdYes (chat.useAgentsMdFile); nested files behind chat.useNestedAgentsMdFiles, off by defaultYes, behind chat.useClaudeMdFile
Copilot CLI 1.0.89copilot-instructions.md, *.instructions.md, AGENTS.md, CLAUDE.md, GEMINI.md, and .claude/rules since 1.0.89Yes, at the root, the working directory and the directories betweenYes, or .claude/CLAUDE.md. Custom agents get neither unless they opt in
Antigravity CLIAGENTS.md and GEMINI.mdYesNot in its docs

Sources: Claude Code memory, Codex AGENTS.md guide, Cursor rules, GitHub Copilot repository instructions, VS Code custom instructions, Copilot CLI custom instructions and its 1.0.89 release, the Codex 0.150.0 release, Antigravity CLI migration guide.

Read the table by columns. AGENTS.md is the only file every tool here reads. CLAUDE.md is read by more tools than its name suggests, but not by Codex, and Antigravity's docs do not mention it. Gemini CLI, which Antigravity CLI replaced for individual accounts on 2026-06-18, read only GEMINI.md unless context.fileName listed more.

What is CLAUDE.md, and how does Claude Code use it?

CLAUDE.md is a markdown file of instructions that Claude Code reads at the start of every session: build and test commands, conventions, the project's quirks. It loads from the repo root, from parent directories, and from ~/.claude/CLAUDE.md for your personal defaults; files in subdirectories load when Claude works there. Because it is in the prompt on every turn, every line costs tokens whether or not the task needs it. See how long should CLAUDE.md be. Loaded is not the same as followed, which is why Claude ignores CLAUDE.md at times. To see which agents load your file from where it sits, paste it into the rule-file checker.

Is it AGENTS.md or agent.md?

AGENTS.md, plural and in capitals. Loaders look for the exact name. Codex reads AGENTS.override.md, then AGENTS.md, and only reads another name if you add it to project_doc_fallback_filenames in its config. A file called agent.md is just a markdown file to most tools.

Is AGENTS.md the same as CLAUDE.md?

The content is the same kind of thing: build commands, conventions, the gotchas a new engineer would trip on. The format is the same: markdown, no schema. The difference is the loader around each file.

Claude Code gives CLAUDE.md features that other tools do not honour. @path imports pull in other files up to four hops deep. CLAUDE.local.md holds personal notes that stay out of git. Files in .claude/rules/ can carry a paths: field and load only when Claude reads, writes or edits a matching file. Codex has its own extras: an AGENTS.override.md that replaces AGENTS.md at the same level, and a 32 KiB default cap on the combined instructions (project_doc_max_bytes). Claude Code does not read AGENTS.override.md.

So an @ line written for Claude is plain text to Codex, and a Codex override is invisible to Claude. Keep tool-specific mechanics out of the shared file.

Should I symlink CLAUDE.md to AGENTS.md or use @AGENTS.md?

Both leave AGENTS.md as the one file you edit. The import is the safer default.

Symlink@AGENTS.md import
Setupln -s AGENTS.md CLAUDE.mdA CLAUDE.md whose first line is @AGENTS.md
Claude-only notesNot possible; the two files are oneWrite them below the import
Windows clonesGit checks the link out as a one-line text file unless core.symlinks is enabledWorks everywhere
Claude editing the fileEdit and Write refuse to write through the link and point at AGENTS.mdClaude edits either file directly
Other toolsCursor and Copilot read both names, so they may load the same rules twiceOnly Claude Code documents the @ import; the others read AGENTS.md on their own
A teammate adds a CLAUDE.local.mdThe rules still loadThe rules still load

Claude Code skips a file it has already loaded, by path or by content, so neither setup makes Claude read the rules twice. Both also protect you from the two traps of native support: a teammate's CLAUDE.local.md, and /init writing a fresh CLAUDE.md, each of which switches the AGENTS.md fallback off without a word. The details are in does Claude Code read AGENTS.md.

Does Codex read CLAUDE.md?

Not by default. Codex walks from the repository root to the working directory and, in each directory, reads AGENTS.override.md if present, otherwise AGENTS.md. It skips empty files and stops adding once the combined size reaches project_doc_max_bytes. You can teach it other names in ~/.codex/config.toml:

project_doc_fallback_filenames = ["CLAUDE.md"]

That works, but it points the dependency the wrong way. If the rules live in CLAUDE.md, every tool has to be configured to find Claude's file, per machine. If they live in AGENTS.md, only Claude Code needs a pointer, and that pointer is one committed line.

One more condition since Codex 0.150.0, published 2026-08-26: “Untrusted projects no longer supply project-level AGENTS.md instructions.” That takes an explicit trust_level = "untrusted" for the project in ~/.codex/config.toml; a project with no entry still loads its files. The other reasons Codex skips a file are in why Codex ignores AGENTS.md.

Does Copilot CLI read AGENTS.md and CLAUDE.md?

Yes, both, along with GEMINI.md and Copilot's own files, from the repository root, the working directory and every directory between. Two September releases changed the edges. Since 1.0.86 (2026-09-17), a custom agent reads none of these unless its frontmatter sets include-custom-instructions: true. Since 1.0.89 (2026-09-28), Copilot CLI also reads Claude Code's .claude/rules files as custom instructions, so a path-scoped rule written for Claude now reaches Copilot too.

What goes in AGENTS.md and what stays in CLAUDE.md?

The shared file holds what is true of the repo for any agent: how to build and test, the conventions that differ from defaults, the decisions with their reasons. The Claude file holds what only Claude Code can act on: @ imports of other docs, notes about Claude's skills or subagents, and anything that refers to Claude's hooks. Path-scoped rules for Claude go in .claude/rules/, where a paths: field keeps them out of the prompt until Claude reads, writes or edits a matching file.

Does Cursor read AGENTS.md?

Yes. Cursor reads AGENTS.md at the project root and in subdirectories, and it reads a root CLAUDE.md the same way, applied to every conversation. Rules apply only to Agent (chat). Tab completion, Inline Edit and Bugbot reviews do not see them. The old .cursorrules file is marked legacy. How to write rules Cursor follows is in Cursor rules best practices.

AGENTS.md vs copilot-instructions.md

For the Copilot cloud agent, both load. .github/copilot-instructions.md is repository-wide, .github/instructions/*.instructions.md is path-specific with an applyTo pattern, and AGENTS.md can sit anywhere with the nearest one taking precedence. If your team also runs Claude Code or Codex, put the shared rules in AGENTS.md and keep copilot-instructions.md for what only Copilot needs. More on that pair, and what Copilot does with each, in copilot-instructions.md vs AGENTS.md.

One source of truth

The practical setup for a mixed team, as of today:

AGENTS.md                  # the rules, for every tool
CLAUDE.md                  # @AGENTS.md, then Claude-only notes
.github/copilot-instructions.md   # only if Copilot needs something extra
CLAUDE.local.md            # gitignored, yours

One caution with that last line. A CLAUDE.local.md counts as a CLAUDE.md for Claude Code's default mode, so without the import it switches native AGENTS.md loading off for whoever created it.

Avoid keeping two copies instead. When we checked 3,905 files on GitHub, 7 percent of repos with both files had copies that had drifted apart, so Claude and Codex followed different rules in the same repo. For the Cursor and Copilot files too, see all four rule files compared.

That gets every agent reading the same text. It does not make the text right. One file is one source of truth for wording, not for decisions. The webhook decision was made in #eng-payments, argued again in a pull request review, and reaches AGENTS.md only when someone copies it there. Nobody reviews whether line 40 still holds after the queue changes.

Harbor starts from the decisions instead of the file. It reads Slack, review threads and docs, puts what it finds through the gate you set, and serves Claude Code, Codex, Cursor and Copilot the facts that apply to the task. It also counts how often each rule was served and how often an answer cited it, so a dead line shows up as a number rather than a hunch. The agents docs cover what each tool gets.

Next: what in .claude/ to commit and whether AGENTS.md helps at all, per the research.

Questions

Is AGENTS.md the same as CLAUDE.md?

Both are plain markdown instructions an agent reads at session start. The difference is the loader: CLAUDE.md gets Claude Code features such as @ imports, CLAUDE.local.md and path-scoped rules, while AGENTS.md is the name most other coding agents read.

Does Cursor read CLAUDE.md?

Yes. Cursor reads a CLAUDE.md at the project root the same way it reads AGENTS.md and applies it to every Agent conversation. Rules do not apply to Tab completion, Inline Edit or Bugbot.

Does Codex read CLAUDE.md?

Not by default. Codex reads AGENTS.override.md or AGENTS.md in each directory from the repo root down, and reads other names only if you list them in project_doc_fallback_filenames in ~/.codex/config.toml. Since 0.150.0 it reads no project AGENTS.md at all in a project you have not trusted.

Does Copilot CLI read CLAUDE.md?

Yes. Copilot CLI reads AGENTS.md, CLAUDE.md or .claude/CLAUDE.md, and GEMINI.md from the repository root down to the working directory, and since 1.0.89 also Claude Code's .claude/rules files. Custom agents read them only with include-custom-instructions: true.

Does OpenCode read AGENTS.md or CLAUDE.md?

AGENTS.md. OpenCode reads it from the project root and uses CLAUDE.md only when there is no AGENTS.md; if both exist, only AGENTS.md is used. Globally, ~/.claude/CLAUDE.md stands in when ~/.config/opencode/AGENTS.md is missing. OPENCODE_DISABLE_CLAUDE_CODE=1 turns the CLAUDE.md fallback off.

Does Gemini CLI read AGENTS.md or GEMINI.md?

GEMINI.md by default, from ~/.gemini and from your workspace folders and their parents. To make it read AGENTS.md as well, set context.fileName in settings.json to a list such as ["AGENTS.md", "GEMINI.md"].

Should I symlink CLAUDE.md to AGENTS.md?

It works, but an @AGENTS.md import in a real CLAUDE.md is safer. The import survives Windows clones and lets you add Claude-only notes below it. Either one keeps the shared rules loading when a teammate adds a CLAUDE.local.md.

Your team’s rules, in every agent, checked on every PR.

Harbor is shared memory for your team’s Claude Code, Cursor, Codex and Copilot. Free for you and one teammate. No card. No end date.

Start free →

Product

  • How it works
  • Every agent
  • Code review
  • The result
  • Security
  • For coding agents
  • Pricing

Developers

  • Docs
  • Quickstart
  • CLI
  • MCP server
  • Served and cited
  • Rule-file checker
  • Blog

Guides

  • Why Claude ignores CLAUDE.md
  • AGENTS.md vs CLAUDE.md
  • Does Claude Code read AGENTS.md?
  • Why Codex ignores AGENTS.md
  • Why Cursor ignores rules
  • Copilot instructions vs AGENTS.md
  • Shared memory across agents
  • Make Claude Code remember

Compare

  • vs Mem0
  • vs Zep
  • vs Unblocked
  • vs ByteRover
  • vs Cognee
  • vs Hindsight
  • vs OpenViking
  • vs Supermemory
  • vs Glen

Company

  • Questions
  • Contact
  • X
  • LinkedIn
  • Privacy Policy
  • Terms of Service
  • Data Processing Agreement
  • Refund Policy
© 2026 HarborStart free