Luros › Guides

AGENTS.md vs CLAUDE.md

AGENTS.md is the shared instructions file that Codex, Cursor, OpenCode and many other coding agents read; CLAUDE.md is Claude Code's own. Since v2.1.277, Claude Code reads AGENTS.md too, but by default only when there is no CLAUDE.md in your working directory or above it.

What each file is

Both are Markdown files of plain instructions that a coding agent reads at the start of a session: build commands, test commands, conventions, the things a new colleague would need to be told. Neither is enforced configuration. The agent treats them as context.

AGENTS.md is an open format. Its site describes it as a README for agents, used by over 60,000 open-source projects, and lists Codex, Jules, Cursor, Gemini CLI, GitHub Copilot, Zed, Warp, Junie, opencode and others as tools that read it.

CLAUDE.md is Claude Code's format. It supports things AGENTS.md does not define: @path imports, a gitignored CLAUDE.local.md for personal notes, path-scoped rules in .claude/rules/, and an organisation-wide managed file.

Which file Claude Code reads

This is the default behaviour, from Claude Code's own documentation:

Your repository hasClaude Code reads
An AGENTS.md, and no CLAUDE.md or CLAUDE.local.md in your working directory or above itYour AGENTS.md
An AGENTS.md and a CLAUDE.md or CLAUDE.local.md in your working directory or above itYour CLAUDE.md files only
A CLAUDE.md that imports AGENTS.md with @AGENTS.mdYour CLAUDE.md, with AGENTS.md included through the import

To change the default, open /config in a session and set Project instructions to claude-md-and-agents-md (both files, CLAUDE.md first), claude-md (CLAUDE.md only) or managed-only. The default is claude-md-or-agents-md.

Which one to use

It depends on how many tools read the repository.

Your situationWhat to do
Only Claude Code, now and laterUse CLAUDE.md. You get imports, local files and rules.
Several tools, nothing Claude-specificUse AGENTS.md alone. Claude Code v2.1.277 and later reads it with no extra file.
Several tools, plus Claude-only instructionsKeep AGENTS.md, and add a CLAUDE.md that starts with @AGENTS.md and puts the Claude-only lines below it.
Several tools, and you want personal notes in CLAUDE.local.mdSet Project instructions to claude-md-and-agents-md, or the local file stops AGENTS.md loading.

If you need no Claude-specific content, Claude Code's docs also allow a symlink: ln -s AGENTS.md CLAUDE.md.

The gotchas

The OpenCode side

OpenCode reads AGENTS.md as its rules file, from the project and from ~/.config/opencode/AGENTS.md for personal rules across every project. For people moving from Claude Code it falls back to CLAUDE.md when a project has no AGENTS.md, and to ~/.claude/CLAUDE.md when there is no global AGENTS.md. Setting OPENCODE_DISABLE_CLAUDE_CODE=1 turns that compatibility off.

So a repository with one AGENTS.md and no CLAUDE.md is read the same way by both tools, which is the simplest set-up if your team uses both.

Where Luros fits

Neither file defines roles. Agents with a remit live elsewhere: .claude/agents/ for Claude Code and .opencode/agents/ for OpenCode. Luros writes twenty-six of them into both folders and leaves your AGENTS.md and CLAUDE.md alone.

We make Luros, so weigh this section accordingly. Everything above it stands on the sources below.

Luros is built for a founder with no marketing team, not for general agent set-up. If that is you, request an invite.

Request an invite

One email. We will tell you when there is a place for you, and nothing else.

Questions people ask

Does Claude Code read AGENTS.md?
Yes, from v2.1.277, when there is no CLAUDE.md or CLAUDE.local.md in your working directory or above it. With a CLAUDE.md present it reads CLAUDE.md only, unless the CLAUDE.md imports AGENTS.md or you change the Project instructions setting.
Can I keep both files?
Yes. The usual pattern is an AGENTS.md for every tool and a CLAUDE.md whose first line is @AGENTS.md, with Claude-only instructions below it.
How do I make Claude Code read both files?
Set Project instructions to claude-md-and-agents-md in /config. Claude Code then reads each directory's CLAUDE.md files first and its AGENTS.md after them, and skips an AGENTS.md it has already loaded through an import or a symlink.
Does OpenCode read CLAUDE.md?
As a fallback. OpenCode reads AGENTS.md, and uses CLAUDE.md only when a project has no AGENTS.md.
Should I symlink CLAUDE.md to AGENTS.md?
Only if you have nothing Claude-specific to add. Claude Code's docs give the symlink as an option; an @AGENTS.md import does the same job and leaves room for Claude-only lines.

Related guides

Sources

Tools in this area change quickly. Every fact here comes from the sources above as they stood on the date shown; if one has moved on, the source is right and this page is out of date.