Leanpub Header

Skip to main content

Claude Code AGENTS.md Interop Handbook

One instruction file across Claude Code, Codex, Copilot, Cursor, Gemini CLI, and more — verified setup, copy-paste templates, rollback-safe migration.

Claude Code AGENTS.md Interop Handbook
This book is 100% completeLast updated on 2026-09-20

Stop maintaining CLAUDE.md and AGENTS.md as two files that drift apart. This handbook documents which file each of nine tools reads — checked on 2026-06-02 against each tool's official docs — and ranks six ways to keep one instruction file in sync, from an @AGENTS.md import to a symlink to a CI drift check. It is also precise about where official support still is not: issue #6235 was closed as completed, but the official CHANGELOG does not mention AGENTS.md anywhere, and on v2.1.246 AGENTS.md is still not loaded into the model's context the way CLAUDE.md is.

Minimum price

$9.99

$12.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

Buying multiple copies for your team? See below for a discount!

PDF
About

About

About the Book

AGENTS.md became native in Claude Code 2.1.277 — in a project with no CLAUDE.md. That one clause is the whole remaining problem, and it is why this handbook did not become obsolete on the day the feature shipped.

Issue #6235 was the most-reacted feature request in Claude Code's history — more than 6,600 reactions — closed as completed on 2026-08-17. Chapter 9 shows what actually shipped behind that closure on 2.1.246 — not a reader, and not what the closure implies. Chapter 11 then measures the real thing on 2.1.278 across three layers: the changelog (AGENTS.md went from zero mentions to two), the shipped binary, and the running behaviour.

The answer is most of the gap closed, not all of it. The file is read only where there is no CLAUDE.md, and not yet on Bedrock, Vertex or Foundry — so what remains is exactly what bites a repository that already has a CLAUDE.md, which is every repository this handbook was written for.

The rest of your stack never had the gap, and it does not have one shape. Codex, Amp, GitHub Copilot, Cursor, Windsurf and Cline read AGENTS.md with no setup at all. Aider and Gemini CLI read it only after one config line — and a config tool with no config is quietly running on a different rule set from everything else you use.

This handbook removes the duplication tax across all nine. It gives you a verified 9-tool matrix: which file each tool reads, whether it needs setup, and the one thing to watch — checked against every tool's official documentation on 2026-06-02 and re-checked row by row on 2026-09-20.

Chapter 12 records that re-check with the source URL for every row. Five of the eight rows came back different from the June text, and three of them change what you do. Codex does not read “the nearest AGENTS.md up the tree” — it concatenates from the repo root down, and stops adding files once the combined size hits 32 KiB, so the deepest and most specific file is the one that silently never arrives. Amp never dropped AGENT.md, and reads CLAUDE.md as a fallback. Windsurf's rules documentation now lives on another domain, where the URL you had bookmarked lands on a 404.

It ranks six sync paths by trade-off: the official @AGENTS.md import, symlink, pre-commit sync, SessionStart hook, direnv, and a CI drift check. And it hands you the parts: copy-paste templates for all nine tools plus a complete repo layout, a rollback-safe migration runbook to move CLAUDE.md to AGENTS.md without losing Claude-only behaviour, and a team drift guard that makes divergence fail loudly.

49 pages, dense and practical, with free updates as conventions change — the 2.1.277 chapter and the 2026-09-20 re-check were both free updates for everyone who had already bought. Read the free sample before you buy.

Try the free AGENTS.md Setup Generator and the field-guide Gist first; buy this for the full matrix, the runbook, and the templates in one place.

Also sold in two bundles. The four-book Claude Code Operator's Library — this handbook plus Safety Mastery, the Migration Playbook, and the token-cost guide — is from $29: https://leanpub.com/b/cc-operators-library . The seven-book Complete Edition adds Claude Code Safety, CLAUDE.md Under Test and the free Field Manual, from $39: https://leanpub.com/b/cc-operators-complete

Written by an independent operator who runs Claude Code unattended and maintains cc-safe-setup, a free MIT-licensed collection of more than 900 example safety hooks: https://github.com/yurukusa/cc-safe-setup . Independent handbook — not affiliated with Anthropic, OpenAI, GitHub, or Google.

Team Discounts

Team Discounts

Get a team discount on this book!

  • Up to 3 members

    Minimum price
    $24.00
    Suggested price
    $32.00
  • Up to 5 members

    Minimum price
    $39.00
    Suggested price
    $51.00
  • Up to 10 members

    Minimum price
    $69.00
    Suggested price
    $90.00
  • Up to 15 members

    Minimum price
    $99.00
    Suggested price
    $129
  • Up to 25 members

    Minimum price
    $149
    Suggested price
    $194

Bundles

Bundles that include this book

Author

About the Author

yurukusa

Everything I publish starts from something that actually broke.

I run Claude Code on real projects, often unattended, and I have lost work to it. Most of what the books catalogue did not happen to me, though. It happened to other people, in public: every incident is tied to a numbered issue you can open and read, including the ones that were closed without a fix. The hooks in cc-safe-setup (MIT, open source) exist because I wanted a floor under an agent nobody was watching, and I would rather show you a stranger's incident with a link than a story of my own without one.

Two things I hold myself to. If a number in one of my books is not something I measured, it says so. And if a command is printed, the output beside it came back from an actual run — failures included, because a check that cannot fail is not a check.

I am not selling certainty. Most of what I know here, I learned by breaking my own setup.

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub