Back Home

代理工具

Claude Code 2.1.277 adds AGENTS.md support, with shared instructions still subject to loading precedence and platform limits

The new release uses a bundled plugin to load AGENTS.md when a project lacks Claude instruction files, reducing maintenance across tools. Differences involving private instruction files, third-party platforms, and context restoration still require verification in each environment.

Прикли · CC0 · Image source
zh-Hant

Anthropic released Claude Code 2.1.277 on September 18, enabling projects without CLAUDE.md to load AGENTS.md directly. For teams that alternate between coding agents, this can reduce duplicate maintenance of build commands, testing guidelines, and directory descriptions. The key engineering question is which instructions actually enter the model’s context. [Release notes](https://github.com/anthropics/claude-code/releases/tag/v2.1.277)

By default, Claude Code checks the working directory and its parent directories for CLAUDE.md, including copies in .claude subdirectories. If it finds one, fallback loading is not enabled. An easily overlooked detail is that the private CLAUDE.local.md file also triggers this condition, so the same repository may load different instructions on different developers’ machines. Global instructions in the user’s home directory and organization-managed files do not count toward this project-level check. [Loading rules](https://code.claude.com/docs/en/memory#when-claude-code-reads-agentsmd)

The agents-md plugin bundled with the release adds files to the “project instructions” list when context is assembled, leaving the engine to present them in its existing order and format. Subdirectory rules are appended when text files are read, and content already loaded through imports or links is deduplicated. After context compaction, however, nested rules are appended again only when that directory is read again, which still differs from the restoration process for native instruction files. [Plugin implementation notes](https://raw.githubusercontent.com/anthropics/claude-code/v2.1.277/mods/agents-md/README.md)

Developers can use Project instructions in /config to choose whether to read both file types or only the existing format. This option must be set in user settings, explicitly specified settings, or managed settings; plugin options in project and local settings files have no effect. Committing a settings file to the repository is therefore not enough to standardize the loading mode across the team. [Settings scope](https://raw.githubusercontent.com/anthropics/claude-code/v2.1.277/mods/agents-md/README.md)

The release notes state that Bedrock, Vertex, and Foundry are not yet supported. The documentation also notes that support may be unavailable when disabled telemetry prevents feature flags from being retrieved, or during the first session after an upgrade. Existing @AGENTS.md imports in CLAUDE.md can remain in place, providing a transition path for mixed environments. [Availability notes](https://code.claude.com/docs/en/memory#when-agentsmd-support-is-unavailable)

The documentation also warns that directly loaded files do not appear in the /memory list, so workflows that rely on that list to audit context will need adjustment. Before migrating, teams should resolve conflicting duplicate rules, then use a small project to confirm which instructions take effect, rather than treating the mere presence of files as proof that setup is complete. [Documentation](https://code.claude.com/docs/en/memory#where-agentsmd-differs-from-claudemd)

Engineering teams should next verify three scenarios—startup, subdirectory reads, and behavior after context compaction—and inspect the loading messages. A shared filename can reduce maintenance costs, but instructions remain part of the model’s context; permissions and sandbox restrictions must be enforced by the execution system. [Memory and instructions documentation](https://code.claude.com/docs/en/memory)

Sources

  1. Claude Code v2.1.277 release
  2. How Claude remembers your project
  3. agents-md 外掛說明:v2.1.277