New YorkGet in touch

Claude Code

Claude Code AGENTS.md support and precedence in version 2.1.277

Claude Code 2.1.277 reads AGENTS.md only where no CLAUDE.md exists, toggled under Project instructions in /config, and not yet on Bedrock, Vertex or Foundry.

Published
September 18, 2026
Read
5 min
Author
Samir Sengupta
Repo tree showing CLAUDE.md taking precedence and AGENTS.md used only in folders without one

the short version

  • CLAUDE.md still wins: the changelog says Claude Code reads AGENTS.md instead where no CLAUDE.md exists, not in addition to it.
  • The fallback ships as a built-in Claude Code mod whose source Anthropic published in the anthropics/claude-code repository, toggled under Project instructions in /config.
  • Bedrock, Vertex and Foundry do not have the fallback yet, so teams on those backends still need CLAUDE.md.
  • The release says nothing about extending the fallback to skills; its only skills path reference is .claude/skills.

Claude Code 2.1.277, published 18 September 2026, adds one rule: in a project with no CLAUDE.md, Claude Code reads AGENTS.md instead. CLAUDE.md wins wherever it exists, and the changelog wording is "instead", not in addition, so no merge is documented. You change the behaviour under "Project instructions" in /config, and the changelog states it is not yet on Bedrock, Vertex or Foundry. Run claude --version to check which build you have.

That is the whole mechanism as the two first-party sources describe it. There is no priority list to configure, no ordering flag and no merge setting. The only control is the /config toggle, and the only trigger is the absence of a CLAUDE.md at the point where Claude Code looks.


Starting today in version 2.1.277, if there is no CLAUDE.md in a folder, Claude will check for and use AGENTS.md.
Thariq (@trq212) on X, 18 September 2026

What 2.1.277 changed about project instructions

The changelog entry and the announcement post state the rule at two different granularities, and the difference decides how you lay out a repo. The changelog says "in a project with no CLAUDE.md, Claude Code reads AGENTS.md instead." The post says "if there is no CLAUDE.md in a folder." Plan against the folder wording, because the same release contains a separate line about the "per-directory CLAUDE.md lookup", which describes discovery as running per directory rather than once per repository.

  • Version: 2.1.277, 18 September 2026.
  • Trigger: no CLAUDE.md at the location being checked.
  • Toggle: "Project instructions" in /config.
  • Excluded backends: Bedrock, Vertex and Foundry, per the changelog's parenthetical.
  • Scope: project instruction files. The release says nothing about extending the fallback to skills; the only skills path it names is .claude/skills.

Claude Code AGENTS.md support precedence, folder by folder

If the lookup runs per directory and the fallback fires on absence, precedence is decided locally, one directory at a time. On that reading, a root CLAUDE.md does not suppress an AGENTS.md three levels down; it governs the directory it sits in. Equally, a stub CLAUDE.md left in a subdirectory by an older tooling script shadows the AGENTS.md next to it, and neither source gives a way to invert that.

The sources do not spell out the full nested ordering, do not say whether parent and child files are concatenated, and do not define the semantics of the @ import syntax. Those are the details a deep monorepo needs, and the changelog does not supply them. It does supply one related performance change: session start-up for SDK and headless (-p) use was improved so the first turn no longer waits on the per-directory CLAUDE.md lookup. The changelog gives no timing numbers for that lookup before or after the change.

Restructuring a repo that carries both files

The layout that matches this rule is one instruction file per directory that needs one, with no duplicates. A folder holding both files does not get a merge; it gets CLAUDE.md, plus an AGENTS.md that other harnesses still read, leaving two copies to drift apart.

  1. Decide per directory which file governs, then delete the other one in that directory rather than maintaining both.
  2. If AGENTS.md is to be the source of truth, remove CLAUDE.md wherever it exists, including stubs generated by older scripts.
  3. Keep CLAUDE.md for any team whose Claude Code runs on Bedrock, Vertex or Foundry, since the changelog says those backends do not have the fallback yet.
  4. Leave skills where they are: the release notes reference project skills loading from .claude/skills, including a fix for --worktree sessions where .claude/skills is untracked.
  5. Check the "Project instructions" setting in /config on each machine before assuming the fallback is on. Neither source documents a command that reports which instruction file a session actually loaded; 2.1.277 does fix typed /mcp, /hooks, /memory and /rewind opening their dialogs in the VS Code extension, but the changelog does not say what those dialogs display.

Why it ships as a built-in mod

The announcement thread says AGENTS.md support is built off Claude Code mods, described as an upcoming way to customize the Claude Code harness, that this one is a built-in mod, and that you will be able to build custom versions of project instructions yourself. The thread links to the mod's source on GitHub in the anthropics/claude-code repository, and a Hacker News commenter links to the same source under a mods/ path; the full path is truncated in both sources. One commenter asked whether AGENTS.md awareness was simply part of the system prompt and was corrected with the mods link. For anyone building tooling, the distinction matters: project-instruction discovery is presented as a mod rather than a fixed harness behaviour, which is a different extension point from hooks, skills or MCP servers.

What practitioners are pushing back on

Commenters on Hacker News mostly describe removing the workarounds this replaces. One mentions deleting a sync-agent-docs.sh that recursively symlinked AGENTS.md to GEMINI.md and CLAUDE.md. Another posts a global post-checkout git hook that symlinks .agents/skills to .claude/skills, which is a reminder that the fallback covers instruction files only and leaves the skills path unsolved for people with an .agents directory. A third shares a CLAUDE.md whose entire content tells Claude to treat AGENTS.md exactly as it would a CLAUDE.md, at root level and in any subdirectory, ending with an @AGENTS.md line. Neither source documents that import syntax, so treat it as a community pattern rather than specified behaviour.

The design objection is about model-specific prompting. One commenter argues that prompts should be tuned for models and that blindly applying AGENTS.md is probably an antipattern, because it converges every model on a common, ill-defined standard of instruction following: a good local minimum and a bad global one. Others frame the change as a response to user pressure and lost users rather than goodwill. Two commenters raise the adjacent thing neither source addresses, using a Claude subscription inside other harnesses; the changelog and the announcement say nothing about it. The fallback makes the instruction file portable and says nothing about credentials.

What the sources do not answer

Three gaps are worth tracking. First, the backend gap: the changelog says "not yet on Bedrock, Vertex or Foundry" without a version or date, and the same release treats those three separately elsewhere, changing the Bash sandbox instructions there to the first-party wording and reframing workflow scripts' computed agent() prompts as script-authored text. Second, nested and import semantics: the sources establish absence-triggered fallback and a per-directory lookup, and stop there. Third, whether the mods mechanism will let teams define their own precedence, since the thread promises custom project instructions without describing the interface.

Until those are documented, the defensible posture is one instruction file per directory, CLAUDE.md retained wherever a Bedrock, Vertex or Foundry session might run, and a check of the "Project instructions" setting in /config on each machine.

Questions this raises

Does Claude Code read AGENTS.md or CLAUDE.md first?

CLAUDE.md wins wherever it exists. Claude Code 2.1.277 only checks AGENTS.md when no CLAUDE.md is found at the location being checked, and the changelog wording is 'instead', so no merge of the two files is documented.

Does a root CLAUDE.md block AGENTS.md in subdirectories?

The announcement describes the check as per folder, and the same release references a per-directory CLAUDE.md lookup. On that reading precedence is decided locally, so a root CLAUDE.md governs its own directory and does not suppress an AGENTS.md three levels down. The sources do not spell out the full nested ordering or whether parent and child files are concatenated.

Why does AGENTS.md support not work on Bedrock or Vertex?

The 2.1.277 changelog states the fallback is not yet on Bedrock, Vertex or Foundry, without giving a version or date for when it will arrive. Teams running Claude Code on those backends should keep CLAUDE.md in place.

These daily notes are drafted by a model I run and operate myself - the same kind of pipeline this site is about - from sources published in the previous 24 hours, and every one lists what it read. The longer essays, the talks and the preprint are mine, written by hand.

More notes

Building something on this?

I ship production LLM, RAG and agentic systems for a living - the infrastructure behind the things these notes are about. Open to roles, contract work and research collaboration.