Developers who switch between AI coding agents can keep one shared instruction file, AGENTS.md, and Anthropic's Claude Code now reads it directly, according to Anthropic's documentation. The project's site, agents.md, says the open format is used by more than 60,000 open-source projects.
The topic came back this week on X, where developers traded setups for keeping project context in sync between tools such as Claude Code and OpenAI's Codex, according to an X summary of the discussion.
What the file does
AGENTS.md is a plain Markdown file at the root of a code repository. The agents.md site calls it "a README for agents," a place for build steps, test commands, code style and pull request rules that would clutter a human-facing README.
The site lists tools that read it, including Codex, Google's Jules, Cursor, GitHub Copilot's coding agent and Cognition's Devin. It says the format is now stewarded by the Agentic AI Foundation.
Large projects can nest files. Agents read the nearest AGENTS.md in the folder tree, so each package can carry its own rules, the site says. It said OpenAI's main repository had 88 of them at the time of writing.
How Codex reads it
The agent builds an instruction chain at startup, according to OpenAI's Codex docs. It reads a global file in ~/.codex first, then walks from the project root down to the current folder, taking at most one file per folder.
In each folder, an AGENTS.override.md wins over AGENTS.md, according to OpenAI. Files closer to the working folder come later in the combined prompt, so they take precedence. Codex stops adding files at 32 KiB by default, a limit set by project_doc_max_bytes.
How Claude Code reads it
Anthropic added AGENTS.md support in Claude Code v2.1.277 on Sept. 18, 2026, its changelog shows. By default, Claude reads AGENTS.md only when there's no project CLAUDE.md file in the working folder or above it, the docs say.
That rule has a catch. A personal CLAUDE.local.md also counts, so adding one quietly stops Claude from reading AGENTS.md. Setting "Project instructions" to claude-md-and-agents-md in the /config panel makes Claude read both, according to Anthropic.
Claude Code doesn't read AGENTS.override.md or AGENTS.local.md, the docs say. That means Codex-style override files won't reach Claude.
Cleaning up older workarounds
Many teams set up their own bridge before native support arrived. Anthropic's docs say a CLAUDE.md that contains the line @AGENTS.md, an import, can stay, since Claude never reads the file twice.
A CLAUDE.md that only tells Claude in words to read AGENTS.md is weaker. Claude sees the file only if it decides to open it, so the docs recommend swapping in the import or deleting the CLAUDE.md.
A startup hook that prints AGENTS.md should go, Anthropic says, because it now adds a second copy to the context. A symlink from CLAUDE.md to AGENTS.md also works, but the docs warn that Git on Windows can check it out as a one-line text file unless core.symlinks is turned on.
To confirm what loaded, Anthropic suggests running /context all in a new session and checking the list of memory files.
Source: agents.md, AGENTS.md project, “AGENTS.md: a simple, open format for guiding coding agents”
Additional sources: Anthropic, Claude Code docs, “How Claude remembers your project”; Anthropic, Claude Code changelog, “v2.1.277, Sept. 18, 2026”; OpenAI, Codex docs, “Custom instructions with AGENTS.md”
