Problem/Motivation
Back in #3585894: LLM harm reduction in Drupal core contribution, AGENTS.md guidelines, we added a CLAUDE.md file that was a pointer over to our AGENTS.md file because at the time a) #6235: Feature Request: Support AGENTS.md in Claude Code was still open, b) Claude Code was the coding agent in widest use in the Drupal community (I believe still is), and so c) despite not wanting to put vendor-specific stuff in core, our hand felt forced.
However, AGENTS.md is now supported as of 2.1.277 (September 18, 2026) so we should be able to just blow the file away.
Steps to reproduce
1. Grab a fresh clone of https://git.drupalcode.org/project/drupal from the main branch
2. Delete CLAUDE.md
3. Start a Claude Code instance from within the "/core/" directory.
4. See that you get a message along the lines of the following:
```
agents-md: no CLAUDE.md found; AGENTS.md loaded: /
/AGENTS.md
```
5. Ask it something to prove that it's finding it, for example:
"Can you help me evaluate contributors for this issue?"
Proposed resolution
Delete CLAUDE.md; fallback to AGENTS.md.
Remaining tasks
^ Do those things.
Release notes snippet
- CLAUDE.md removed in favour of AGENTS.md
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | ACTION_LOG.redacted.txt | 25.94 KB | webchick |
Issue fork drupal-3636154
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
webchickFixing my artisanally crafted human typos :P and adding a bit more detail.
Comment #3
webchickI find it very poetic to make Claude remove its own proprietary crap, and I'm also curious to dig into claims that our AGENTS.md file is "doing nothing" so here's my prompt:
Comment #5
webchickComment #6
webchickGenerated by Claude Code 2.1.319 (Claude Opus 5.5)
The MR at https://git.drupalcode.org/project/drupal/-/merge_requests/17729 deletes core/CLAUDE.md. No other file in core references it.
Testing: Claude Code 2.1.319, run from core/ with CLAUDE.md removed. Asked for the first heading of the loaded project instructions. It answered "# Operator Rules for LLM Tools" from core/AGENTS.md.
The fallback depends on a Claude Code setting in /config. The default is claude-md-or-agents-md. Users who set it to claude-md will no longer load core/AGENTS.md. The change record could mention this.
Generated with the help of an LLM.
Comment #7
webchickGenerated by Claude Code 2.1.319 (Claude Opus 5.5)
Attached is the action log from the Claude Code session that worked on this issue. It lists URLs fetched, skills and tools loaded, commands run, and decisions made, including where core/AGENTS.md changed the agent's behavior. Personal details are redacted.
Change record (draft): https://www.drupal.org/node/3636155
Generated with the help of an LLM.
Comment #8
webchickCool, cool, cool. Welp, as expected, doing this uncovered a big, huge mess. :D Two follow-up issues:
1) Fixing this from a core maintainer's POV: #3636156: Rework core/AGENTS.md: move to repo root, add contribution workflow, align with AI policy
2) Fixing this from an AI native developer's POV: https://git.drupalcode.org/project/drupalorg/-/work_items/3607086
Based on the testing done underneath this banner, I'm on the fence now as to whether we want to remove CLAUDE.md or not. From How Claude remembers your project: When Claude Code reads AGENTS.md (confirmed with local testing):
In other words, CLAUDE.md is only part of the battle; if a user has CLAUDE.local.md or a .claude/CLAUDE.md file, then it'll take precedence over AGENTS.md and so they'll never get the instruction. :\
What Claude recommended about this conundrum though FWIW:
Comment #9
webchickPiped up on these two Anthropic issues in case that accomplishes anything. :P
Meanwhile, moving AGENTS.md to root was also suggested in #3636156: Rework core/AGENTS.md: move to repo root, add contribution workflow, align with AI policy, so see you over there. ;)
Comment #10
cainaruComment #11
smustgrave commentedDidn't read every comment but am aware CLAUDE.md isn't needed anymore so +1 for that.
Comment #12
webchickJust make sure to read this:
...as long as you're cool with that, +1 to RTBC.