DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

AGENTS.md vs CLAUDE.md: Choose the Right Shared Instructions for Coding Agents

Use AGENTS.md as shared repository guidance where your coding agents support it. Add CLAUDE.md for Claude-specific needs, and verify Claude Code’s version, settings, and file-loading mode before relying on both files.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a repository used by Codex, Claude Code, and compatible coding agents, use AGENTS.md as the shared project guidance file where those tools support it. Add CLAUDE.md only if Claude needs separate instructions or its deployed configuration does not load AGENTS.md. If you use both, make Claude’s behavior explicit: configure it to read both, or import the shared file from CLAUDE.md.

What is the difference between AGENTS.md and CLAUDE.md?

They are repository instruction files, but their names are not interchangeable in every coding-agent setup. AGENTS.md is the practical shared default for Codex and compatible tools. CLAUDE.md is Claude Code’s tool-specific instruction file. Which files an agent actually reads depends on its harness, version, settings, and file-discovery rules.

As an Amazon Associate I earn from qualifying purchases.

OpenAI’s Codex documentation says, “Codex reads AGENTS.md files before doing any work.” Codex can also use configured fallback filenames, but a differently named file is not automatically recognized just because another tool supports it. OpenAI’s AGENTS.md documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which file should you use for a shared repository?

Use one AGENTS.md as the source of truth for instructions that apply across agents: project conventions, build and test commands, code organization, and task-specific expectations. This reduces the risk that two files drift apart and give agents conflicting guidance.

Claude Code can read AGENTS.md directly in current documented configurations, so a separate CLAUDE.md is not automatically required. But the feature is version- and configuration-dependent: Anthropic documents direct support for Claude Code v2.1.277 or later, with exceptions such as older versions or a disabled built-in plugin. Check the version and settings used by your team before relying on it. Anthropic’s Claude Code memory documentation

What happens when both files exist?

Claude Code’s documented default mode, claude-md-or-agents-md, reads CLAUDE.md files, or falls back to AGENTS.md when there is no CLAUDE.md or CLAUDE.local.md in the working directory or above it. In this mode, adding a CLAUDE.md can therefore affect whether Claude loads the shared file.

Rank #2
SKLaserDesign Two-Sided Medical Coding Carousel Rotating Book Stand - Made in the USA
  • New design has wider shelves and supports, increasing stability for wide books. Shelf width is now 14.5".
  • Easily holds two large medical coding books.
  • Made in the USA - Minor assembly required.

Anthropic documents two other modes: claude-md-and-agents-md reads both, with Claude files before AGENTS files at each directory; claude-md reads only Claude files. A managed-only mode limits launch-time project and user instruction loading to managed Claude instructions and auto memory. Confirm the active configuration rather than assuming that both files are being combined. Anthropic’s Claude Code memory documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep one source of truth and add Claude-only guidance

If Claude needs extra instructions, Anthropic documents putting @AGENTS.md at the top of CLAUDE.md, then adding Claude-specific guidance below it. A symlink is another documented option. This approach keeps shared rules in one place while allowing the Claude file to carry tool-specific content.

Use two independent files only deliberately

If both files contain overlapping rules, assign a clear purpose to each and tell the team which one governs shared conventions. Otherwise, a change made to one file may leave the other outdated. Also account for Claude’s documented behavior for hooks and some additional directories if your setup uses those features; the main project-file rules do not necessarily describe every instruction-loading mechanism.

How do discovery and nested instructions differ?

File format alone does not guarantee that every harness discovers instructions the same way. Codex starts with global and project instructions. For project scope, it starts at the project root—typically the Git root—and walks down to the current working directory. In each directory, it checks AGENTS.override.md, then AGENTS.md, then configured fallback filenames, loading at most one file per directory. A nearer override can specialize guidance; discovery stops at the current directory. OpenAI’s AGENTS.md documentation

Rank #4
Mark Twain Forensic Investigations Workbook, Using Science to Solve High Crimes Middle School Books, Critical Thinking for Kids, DNA and Handwriting Analysis Labs, Classroom or Homeschool Curriculum
  • Students build unmatched deductive-reasoning skills as they become crime-solving stars
  • Most scenarios have more than one plausible outcome, allowing individuals or groups to broadly interpret evidence
  • Includes interpretive handwriting, body language, fingerprinting, and many more activities

Claude Code’s file choice and ordering depend on its configured memory mode, while VS Code support depends on the selected harness and settings. Microsoft lists AGENTS.md as a recommended project instruction format for OpenAI Codex and Copilot, and CLAUDE.md for the Anthropic Claude harness. It recommends a shared supported format where possible, while noting that nested discovery and support depend on the harness and configuration. Microsoft’s VS Code custom-instructions documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Tool or setup What the documentation establishes What to verify
Codex Reads AGENTS.md; supports a project hierarchy and configured fallback filenames. Whether any nonstandard filename is configured as a fallback.
Claude Code Can read AGENTS files in supported current configurations; its mode determines whether it reads Claude files, AGENTS files, or both. Version, settings, plugin availability, and the active memory mode.
VS Code with an agent harness Documents AGENTS.md for Codex and Copilot, and CLAUDE.md for Claude. Selected harness, settings, and nested-file discovery.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How should you write the instructions?

Make the file useful at the moment an agent begins work. Keep durable, repository-specific guidance there; move long procedures or specialized task guidance to the appropriate tool feature when available. Avoid treating the instruction file as a dumping ground for every possible rule.

Best Value
The Standards Real Book, C Version
  • Used Book in Good Condition
  • State essential commands and prerequisites clearly, including how to run the relevant tests.
  • Use concise, actionable rules tied to this repository rather than broad advice that applies to any project.
  • Separate truly tool-specific requirements from shared project rules, and explain the relationship between files.
  • Check nested instructions and overrides in each harness so a local rule does not silently diverge from the root guidance.
  • Review the instructions when project tooling or conventions change, just as you would maintain build documentation.

What do studies say about context files?

Two 2026 studies offer useful cautions, not universal verdicts. Prakhar Khatri’s two-agent ablation study evaluated 288 runs across 17 tasks using Claude Code and Codex. It reported no measurable correctness change from context strategy within the study’s equivalence bounds. That result is limited to the agents, tasks, and conditions studied; it does not establish that instruction files never help. Study: Do Context Files Help Coding Agents?

A separate study by Helio Victor F. dos Santos and coauthors analyzed 100 popular open-source repositories containing AGENTS.md or CLAUDE.md. Using the authors’ heuristics, it identified at least one configuration smell in 91 repositories: lint leakage in 62% of sampled files, context bloat in 42%, and skill leakage in 35%. These are findings from that sample and method—not prevalence estimates for all repositories. The practical lesson is to keep instruction files scoped and maintainable, not to assume a particular file name guarantees better results. Study: Configuration Smells in AGENTS.md Files

A practical decision rule

  1. Start with AGENTS.md. Put shared project guidance there for Codex and other tools that support the format.
  2. Check Claude Code’s actual setup. Confirm its version, settings, and memory mode before assuming it reads AGENTS files.
  3. Add CLAUDE.md only for a reason. Use it for Claude-specific rules or when the deployed configuration requires it.
  4. Make the relationship explicit. Configure Claude to read both, or use the documented @AGENTS.md import or a symlink so the shared instructions stay synchronized.
  5. Validate nested behavior per harness. Do not assume overrides, fallback names, or directory discovery work identically across tools.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.