Skip to content
Agent Friendly Code

Does Claude Code read AGENTS.md? Files each AI agent reads

Most agents read AGENTS.md: Cursor, Devin, Codex, Kimi Code CLI, OpenHands, and Pi. Claude Code reads CLAUDE.md and falls back to AGENTS.md. Gemini CLI and Aider read their own files, and AGENTS.md only when configured to. Checked against each agent's docs on 27 Nov 2026. How repos are set up for each, side by side: compare agents.

By Himanshu Singh · Updated · How we score →

Which agents read which file

Instruction files each AI coding tool reads, per its docs
AgentAGENTS.mdAGENTS.md in subfoldersCLAUDE.mdGEMINI.md.github/copilot-instructions.md.cursor/rules.agents/skills.claude/skillsllms.txt
Claude CodeFallback (new tab)Fallback (new tab)Yes (new tab)————Yes (new tab)—
CursorYes (new tab)Yes (new tab)Yes (new tab)——Yes (new tab)Yes (new tab)Yes (new tab)—
DevinYes (new tab)—Yes (new tab)——Yes (new tab)Yes (new tab)Yes (new tab)—
CodexYes (new tab)Yes (new tab)————Yes (new tab)——
Kimi Code CLIYes (new tab)—————Yes (new tab)——
Gemini CLISetting (new tab)——Yes (new tab)——Yes (new tab)——
AiderSetting (new tab)————————
OpenHandsYes (new tab)—Yes (new tab)———Yes (new tab)——
PiYes (new tab)Yes (new tab)Yes (new tab)———Yes (new tab)——
GitHub CopilotYes (new tab)Yes (new tab)Yes (new tab)Yes (new tab)Yes (new tab)—Yes (new tab)Yes (new tab)—
Google AntigravityYes (new tab)Yes (new tab)—Yes (new tab)—————
OpenCodeYes (new tab)Yes (new tab)Yes (new tab)———Yes (new tab)Yes (new tab)—
Devin Desktop (formerly Windsurf)Yes (new tab)Yes (new tab)———————
KiroYes (new tab)Yes (new tab)———————
Repos with it51%28%33%4%12%3%18%14%4%

Each cell links the agent's docs. Fallback: read only when CLAUDE.md is missing. Setting: read once configured. —: the docs don't say. The last row is the share of 388 popular GitHub repos with the file, at any depth, on 16 Nov 2026.

Files each agent reads

Repo files each AI coding agent reads
AgentReads from the repoNotes
Claude Code
  • CLAUDE.md
  • .claude/CLAUDE.md
  • .claude/rules/
  • CLAUDE.local.md
  • AGENTS.md
  • .claude/AGENTS.md
  • .claude/skills/
Reads AGENTS.md only when no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md is found (v2.1.277 and later). A CLAUDE.md that imports @AGENTS.md loads both, as does a setting. code.claude.com/memory (new tab)code.claude.com/skills (new tab)
Cursor
  • .cursor/rules/*.mdc
  • AGENTS.md
  • CLAUDE.md
  • .agents/skills/
  • .claude/skills/
Project rules are .mdc files in .cursor/rules/, subfolders included; a plain .md there is ignored. AGENTS.md is read at the root and in subdirectories, combined, the more specific winning. CLAUDE.md is read the same way; the docs describe one at the root. A root .cursorrules is legacy and will be deprecated. cursor.com/rules (new tab)cursor.com/skills (new tab)cursor.com/rules (new tab)cursor.com/using (new tab)
Devin
  • AGENTS.md
  • CLAUDE.md
  • .cursor/rules/*.mdc
  • .devin/blueprint.yaml
  • .agents/skills/
  • .claude/skills/
Looks for AGENTS.md before it starts coding and includes its first 16 KiB. Pulls CLAUDE.md and Cursor rule files into its Knowledge, which its docs mark deprecated in favour of Skills. Setup comes from its environment snapshot, which .devin/blueprint.yaml can define. docs.devin.ai/environment (new tab)docs.devin.ai/agents-md (new tab)docs.devin.ai/knowledge-onboarding (new tab)docs.devin.ai/skills (new tab)docs.devin.ai/git-backed-blueprints (new tab)
Codex
  • AGENTS.md
  • AGENTS.override.md
  • .agents/skills/
Reads AGENTS.md before any work, one per directory from the repo root down to the working directory, up to 32 KiB combined; AGENTS.override.md replaces the AGENTS.md beside it. learn.chatgpt.com/agents-md (new tab)learn.chatgpt.com/build-skills (new tab)
Kimi Code CLI
  • AGENTS.md
  • .kimi-code/AGENTS.md
  • .agents/skills/
/init writes an AGENTS.md. Its docs name no CLAUDE.md fallback. github.com/agents.md (new tab)github.com/slash-commands.md (new tab)github.com/skills.md (new tab)
Gemini CLI
  • GEMINI.md
  • .agents/skills/
Reads GEMINI.md from the global file, the workspace and its parent directories, and one per subdirectory once a tool reaches it. AGENTS.md loads once listed in the context.fileName setting. geminicli.com/gemini-md (new tab)geminicli.com/skills (new tab)
Aider
  • .aider.conf.yml
Reads AGENTS.md or CONVENTIONS.md only when .aider.conf.yml lists it under read:. Its docs name only .aider.conf.yml, never .aider.conf.yaml. aider.chat/lint-test.html (new tab)aider.chat/aider_conf.html (new tab)
OpenHands
  • AGENTS.md
  • CLAUDE.md
  • .openhands/setup.sh
  • .agents/skills/
Runs .openhands/setup.sh when it starts work on a repo. Treats CLAUDE.md and GEMINI.md as context for Claude and Gemini models. docs.openhands.dev/repository (new tab)docs.openhands.dev/skills (new tab)docs.openhands.dev/overview (new tab)
Pi
  • AGENTS.md
  • CLAUDE.md
  • AGENTS.override.md
  • .agents/skills/
Loads the first of AGENTS.override.md, AGENTS.md and CLAUDE.md from the working directory and every directory above it, so an empty AGENTS.md hides a CLAUDE.md beside it. github.com/configuration.md (new tab)github.com/skills.md (new tab)github.com/security.md (new tab)github.com/resource-loader.ts (new tab)

How do repos score for each pair of agents?

Average score of the board's repos for each agent in a pair
ComparisonAveragesHigher for each
Claude Code vs Cursor81.0 vs 71.3419 vs 15
Claude Code vs Codex81.0 vs 78.7346 vs 86
Gemini CLI vs Claude Code71.4 vs 81.04 vs 430
Cursor vs Codex71.3 vs 78.719 vs 415
Aider vs Claude Code72.6 vs 81.019 vs 415
OpenHands vs Claude Code71.3 vs 81.03 vs 430
Pi vs Claude Code77.5 vs 81.042 vs 376
Kimi Code CLI vs Claude Code77.6 vs 81.044 vs 352
Devin vs Claude Code75.3 vs 81.03 vs 430
Codex vs Gemini CLI78.7 vs 71.4428 vs 6

Averages over the board's repos scored for both agents. “Higher for each” counts the repos that score higher for the first agent, then the second; the rest tie. Scores measure how well a repo is set up for an agent, not which agent writes better code.

Other tools, not on our board

Repo files AI coding tools we don't score read, per their docs
ToolReads from the repoAGENTS.md?Docs
GitHub Copilot
  • .github/copilot-instructions.md
  • .github/instructions/*.instructions.md
  • AGENTS.md
  • CLAUDE.md
  • GEMINI.md
  • .agents/skills/
  • .claude/skills/
Cloud agent, code review, CLI and VS Code
Google Antigravity
  • AGENTS.md
  • GEMINI.md
  • .agents/AGENTS.md
  • .agents/GEMINI.md
  • .agents/rules/*.md
Yes, with GEMINI.md
OpenCode
  • AGENTS.md
  • CLAUDE.md
  • opencode.json
  • .agents/skills/
  • .claude/skills/
Yes, CLAUDE.md as fallback
Devin Desktop (formerly Windsurf)
  • .devin/rules/*.md
  • .devin/global_rules.md
  • AGENTS.md
  • .windsurf/rules/*.md
  • .windsurfrules
Yes, always on
Kiro
  • .kiro/steering/*.md
  • AGENTS.md
Yes, always included

Does my agent read AGENTS.md?

Does Claude Code read AGENTS.md?
Yes, when there is no CLAUDE.md. Claude Code v2.1.277 and later reads AGENTS.md and .claude/AGENTS.md by default, but only when no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md is in the working directory or above it. With both files, import @AGENTS.md in CLAUDE.md, or set Project instructions in /config to claude-md-and-agents-md. Run /memory to see what loaded.
Does Cursor read AGENTS.md?
Yes. Cursor reads AGENTS.md at the project root and in subdirectories, the more specific winning, and reads CLAUDE.md the same way (its docs describe one at the root). Its own project rules are .mdc files in .cursor/rules/.
Does Devin read AGENTS.md?
Yes. Devin looks for AGENTS.md anywhere in the repo before it starts coding, and includes the first 16 KiB of each. It also pulls CLAUDE.md and Cursor rule files into its Knowledge, which its docs mark deprecated in favour of Skills.
Does Codex read AGENTS.md?
Yes. Codex reads AGENTS.md before any work, one per directory from the repo root down to the working directory, an AGENTS.override.md taking its place, up to 32 KiB combined. It reads CLAUDE.md only if project_doc_fallback_filenames lists it.
Does Kimi Code CLI read AGENTS.md?
Yes. Kimi Code CLI reads AGENTS.md or .kimi-code/AGENTS.md from the project, and /init writes one. Its docs name no CLAUDE.md fallback.
Does Gemini CLI read AGENTS.md?
Only when configured to. Gemini CLI reads GEMINI.md by default. List AGENTS.md in context.fileName in .gemini/settings.json, or make GEMINI.md the line @AGENTS.md. Run /memory show to see what loaded.
Does Aider read AGENTS.md?
Only when configured to. Aider reads only the files you hand it: list AGENTS.md under read: in .aider.conf.yml, or pass --read AGENTS.md.
Does OpenHands read AGENTS.md?
Yes. OpenHands reads AGENTS.md as repository context, and treats CLAUDE.md and GEMINI.md as context for Claude and Gemini models.
Does Pi read AGENTS.md?
Yes. Pi loads AGENTS.md from the working directory and every directory above it. An AGENTS.override.md replaces it, and a CLAUDE.md is read where there is no AGENTS.md.
Does GitHub Copilot read AGENTS.md?
On some surfaces. Copilot cloud agent and code review read AGENTS.md files anywhere in the repo, the nearest one taking precedence, or a single root CLAUDE.md or GEMINI.md instead. Copilot CLI combines every AGENTS.md, CLAUDE.md and GEMINI.md from the repo root to the working directory and on the path to each file it works on. In VS Code, the Copilot harness combines every AGENTS.md on its path; the Local harness reads a root one only with chat.useAgentsMdFile on, and nested ones only with the experimental chat.useNestedAgentsMdFiles on as well. Copilot's own file, its CLAUDE.md equivalent, is .github/copilot-instructions.md, which every surface but Eclipse code review reads; the support matrix lists no AGENTS.md for chat on github.com or in Visual Studio, JetBrains, Eclipse or Xcode.
Does Google Antigravity read AGENTS.md?
Yes. Antigravity reads AGENTS.md or GEMINI.md, at the top of a folder or in its .agents/, plus .agents/rules/*.md, in the workspace folder and its parents up to the repo root, and combines every rule it finds. Subfolders below the workspace are not loaded, and each rule file is capped at 24,000 bytes.
Does OpenCode read AGENTS.md?
Yes. OpenCode loads every AGENTS.md from the current directory up to the home directory (the project root, for a project outside it), after the global ~/.config/opencode/AGENTS.md, and reads CLAUDE.md in any directory without one. Reading a file below it, such as one in a monorepo package, also loads the AGENTS.md files on the way. Other instruction files go in the instructions list in opencode.json.
Does Devin Desktop (formerly Windsurf) read AGENTS.md?
Yes. Windsurf became Devin Desktop on June 2, 2026, and treats AGENTS.md as an always-on rule, read in each directory from the workspace root down to the working directory. Its own rules go in .devin/rules/*.md; the legacy .windsurf/rules/ and .windsurfrules are still read.
Does Kiro read AGENTS.md?
Yes. Kiro reads AGENTS.md in the workspace root and subdirectories and always includes it. Its own steering files go in .kiro/steering/, with an inclusion mode in their frontmatter: always, fileMatch, manual or auto.

Checked against each tool's docs on .

How do I write one file every agent reads?

  1. Write it in AGENTS.md at the repo root. What to put in it.
  2. If you keep a CLAUDE.md, import @AGENTS.md in it, or Claude Code skips AGENTS.md. AGENTS.md vs CLAUDE.md.
  3. Aider: list AGENTS.md under read: in .aider.conf.yml. Gemini CLI: add it to context.fileName, or keep a GEMINI.md.
  4. Cursor rules go in .cursor/rules/, OpenHands setup in .openhands/setup.sh.
  5. Longer task steps go in .agents/skills/, which every agent here but Claude Code and Aider loads when a task matches. Agent skills.

How many repos have each file?

A repo with both files counts under AGENTS.md unless it is empty; empty files don't count. Read the files.

Agent names link to their boards. The methodology has every weight; the guide covers the rest of an agent-ready repo.