Skip to content

Rename CLAUDE.md to AGENTS.md - #4166

Merged
christophwille merged 1 commit into
masterfrom
docs/agents-md
Sep 21, 2026
Merged

christophwille merged 1 commit into
masterfrom
docs/agents-md

Conversation

@christophwille

Copy link
Copy Markdown
Member

Renames the repo's agent instruction files from CLAUDE.md to AGENTS.md, the vendor-neutral name that other coding agents already read. Claude Code picks them up through its built-in agents-md plugin:

https://github.com/anthropics/claude-code/tree/main/mods/agents-md

In the plugin's default mode (claude-md-or-agents-md), a project with no CLAUDE.md of its own gets its AGENTS.md files loaded exactly where and how CLAUDE.md would be, including nested ones.

What changed

  • CLAUDE.md -> AGENTS.md
  • ICSharpCode.Decompiler.Tests/CLAUDE.md -> ICSharpCode.Decompiler.Tests/AGENTS.md
  • Every mention of CLAUDE.md updated: both AGENTS.md files, .github/CODE_REVIEW.md, doc/DecompilerArchitecture.html, ICSharpCode.Decompiler/CSharp/Syntax/README.md.
  • The root file's heading and intro now address coding agents in general rather than Claude only. The content is otherwise unchanged.

Action required for every developer using Claude Code

/.claude/ is gitignored, so this PR cannot touch anything in it. If you have a local .claude/CLAUDE.md or a CLAUDE.local.md in your checkout, you have to deal with it by hand, because in the default mode any CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md between the repo root and the working directory makes the plugin stand down completely. Claude then loads only that local file and silently skips the repo's AGENTS.md files. Pick one:

  • rename it: .claude/CLAUDE.md -> .claude/AGENTS.md (the plugin reads that path too), or

  • keep it and switch the plugin to load both, in user settings (~/.claude/settings.json; a project's .claude/settings.json is not read for plugin options):

    {
      "pluginConfigs": {
        "agents-md@builtin": {
          "options": { "instructionFiles": "claude-md-and-agents-md" }
        }
      }
    }

    The same option is the "Project instructions" row in /config.

The second option is the more robust one if a tool regenerates .claude/CLAUDE.md for you (the CodeGraph setup appears to be one such tool): a recreated file would otherwise hand the project back to CLAUDE.md only, again without any warning.

How to check it worked: start a new session (or /clear); the transcript shows one line naming the loaded AGENTS.md files. /memory and the # shortcut do not know AGENTS.md and will not list them.

Caveats

  • Older Claude Code versions get no project instructions at all, silently. The plugin has to be present as a built-in. It was confirmed only indirectly on 2.1.278 (the mode string is in the binary); loading was not verified end to end in a fresh session before opening this PR. If supporting older versions matters, a one-line CLAUDE.md containing @AGENTS.md makes the engine itself load the file through the import on any version - at the price of keeping a CLAUDE.md around. This PR deliberately does not add that stub.
  • The plugin can be turned off in /plugin; with it off, the engine reads CLAUDE.md alone, which now means nothing.
  • Other agents read only the root and nested AGENTS.md, never .claude/AGENTS.md. Anything that every agent should see belongs in the checked-in files.
  • Nested file attaches on a text Read only. ICSharpCode.Decompiler.Tests/AGENTS.md is attached when a text file under that directory is read with the Read tool. Unlike a nested CLAUDE.md, it is not attached for a file @-mentioned in the prompt, the IDE's opened file or selection, or notebook/image/PDF reads.
  • After a compaction a nested AGENTS.md is not restored among the recently read files; it is attached again at the next Read under that directory. A mid-session change to it is not re-announced.
  • Non-fork subagents get the nested AGENTS.md again at their own first Read under that directory, even if the parent already had it (slightly more context used than with CLAUDE.md).
  • --add-dir directories contribute no AGENTS.md, where the engine would load their CLAUDE.md.
  • Paths compare by spelling, so a symlinked or aliased spelling of the working directory (e.g. a subst drive or junction) is not resolved the way the engine resolves it for CLAUDE.md.
  • @ imports pointing outside the working directory inside an AGENTS.md are honoured only once the external-import approval has been given, and the approval dialog is raised for CLAUDE.md imports alone. The files in this repo use no such imports.

The full list of differences is in the "Where it still differs from CLAUDE.md" section of the linked README.

Assisted-by: Claude:claude-fable-5-1:Claude Code

AGENTS.md is the vendor-neutral name other coding agents already read,
and Claude Code now loads it through its built-in agents-md plugin
whenever a project has no CLAUDE.md of its own. One set of instructions
then serves every agent instead of only Claude. The plugin stands down
as soon as any CLAUDE.md remains in the project, so both files move
together rather than one at a time.

Assisted-by: Claude:claude-fable-5-1:Claude Code
@christophwille
christophwille merged commit ae2129a into master Sep 21, 2026
15 checks passed
@christophwille
christophwille deleted the docs/agents-md branch September 21, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant