Which files does each AI coding agent read?
Most agents read AGENTS.md: Cursor, Devin, GPT-5 Codex, Kimi 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.
Which files does each agent read?
| Agent | Reads from the repo | Notes |
|---|---|---|
| Claude Code |
| Reads AGENTS.md only when no CLAUDE.md is found (v2.1.277 and later). A CLAUDE.md that starts with @AGENTS.md loads both. code.claude.com/memory |
| Cursor |
| Project rules live in .cursor/rules/; .cursorrules is the deprecated single-file form. cursor.com/rules |
| Devin |
| Looks for AGENTS.md before it starts coding and includes its first 16 KiB. Setup comes from its environment snapshot. docs.devin.ai/environment docs.devin.ai/agents-md |
| GPT-5 Codex |
| Reads AGENTS.md before any work, including one per directory; AGENTS.override.md takes precedence. learn.chatgpt.com/agents-md |
| Kimi CLI |
| /init writes an AGENTS.md. Its docs name no CLAUDE.md fallback. github.com/agents.md github.com/slash-commands.md |
| Gemini CLI |
| Reads GEMINI.md at every level from global to per-directory. AGENTS.md loads once it is listed in the context.fileName setting. geminicli.com/gemini-md |
| Aider |
| Reads AGENTS.md or CONVENTIONS.md only when .aider.conf.yml lists it under read:. aider.chat/lint-test.html aider.chat/aider_conf.html |
| OpenHands |
| Runs .openhands/setup.sh in its sandbox when a session starts. docs.openhands.dev/repository docs.openhands.dev/skills |
| Pi |
| Loads either name from the working directory and every directory above it. github.com/configuration.md |
How do I write one file every agent reads?
- Write it in
AGENTS.mdat the repo root. What to put in it. - If you keep a CLAUDE.md, start it with
@AGENTS.md, or Claude Code skips AGENTS.md. AGENTS.md vs CLAUDE.md. - Aider: list AGENTS.md under
read:in.aider.conf.yml. Gemini CLI: add it tocontext.fileName, or keep a GEMINI.md. - Cursor-only rules go in
.cursor/rules/, OpenHands setup in.openhands/setup.sh.
How many repos have each file?
AGENTS.md197 of 401 (49%)CLAUDE.md19 of 401 (5%).cursor/rules or .cursorrules18 of 401 (4%)GEMINI.md8 of 401 (2%).openhands/setup.sh2 of 401 (0.5%).aider.conf.yml1 of 401 (0.2%)
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.