Coding agent instruction files compared: what each agent actually reads

Put portable rules in AGENTS.md; nearly every major agent reads it. The exceptions are where teams get burned: an agent that skips it when another file exists, one that needs a setting, one that ignores nested copies. This page lists the files, the precedence rules and the built-in spec features for eleven agents, each checked against the vendor's own documentation.

Last verifiedSeptember 29, 2026
Agents covered11, plus Spec Kit, OpenSpec and BMAD
Rule of thumbAGENTS.md for rules, the spec for the change

The comparison

"AGENTS.md" means the vendor documents native support. Precedence describes what happens when several files apply; most agents concatenate rather than override.

AgentIts own instruction filesAGENTS.mdPrecedenceSpec or plan feature
Claude Code
Anthropic
CLAUDE.md (managed, ~/.claude/, project, CLAUDE.local.md), .claude/rules/*.md with paths: globs, skills in .claude/skills/*/SKILL.mdYes, since 2.1.277 (Sep 18, 2026). Default: only if no CLAUDE.md existsAll levels concatenated, root first; subdirectory files load when Claude reads there; @path imports up to 4 hopsPlan mode (Shift+Tab or --permission-mode plan)
Codex
OpenAI, CLI / app / cloud
~/.codex/AGENTS.md or AGENTS.override.md; skills in .agents/skillsYes, native; its home formatWalks Git root to current directory; concatenated, closer file wins; 32 KiB cap (project_doc_max_bytes)Plan mode (/plan)
Cursor
Anysphere
.cursor/rules/*.mdc with alwaysApply, description, globs; User and Team RulesYes, root and subdirectoriesTeam, then Project, then UserPlan Mode; plans can be saved to the workspace
Kiro
AWS
.kiro/steering/*.md (product, tech, structure suggested), ~/.kiro/steering/; hooks in .kiro/hooks/Yes; nested AGENTS.md since v1.0.309 (Aug 13, 2026)Workspace steering wins over global; AGENTS.md always includedSpecs: requirements.md (EARS), design.md, tasks.md
Gemini CLI
Google
GEMINI.md: global, workspace and parents, then just-in-time; @./file.md importsOnly if configured: "context": {"fileName": ["AGENTS.md", ...]}ConcatenatedPlan Mode (/plan), read-only
Jules
Google
None of its ownYes, root AGENTS.mdn/aPlan you approve before code changes
Copilot coding agent
GitHub, cloud
.github/copilot-instructions.md, .github/instructions/*.instructions.md; also CLAUDE.md / GEMINI.md at rootYes, anywhere; nearest winsPersonal, then repository, then organization, but all are sentNot documented
Copilot in VS Code
GitHub / Microsoft
Same files, *.instructions.md with applyTo, prompt files .github/prompts/*.prompt.md; CLAUDE.md behind a settingYes (chat.useAgentsMdFile); nested files need chat.useNestedAgentsMdFiles, off by defaultAdditive; docs say not to rely on orderPlan agent (/plan)
Junie
JetBrains
.junie/AGENTS.md, .junie/playbook.md, .junie/rules/*.md; legacy .junie/guidelines.mdYes, root or .junie/.junie/AGENTS.md first; project beats ~/.junie/AGENTS.md; duplicates removed (CLI docs)Not documented
Devin Desktop
Cognition, formerly Windsurf
.devin/rules/ (legacy .windsurf/rules/), 12,000 chars per file; global rules 6,000 charsYes; root always on, subdirectories glob-scopedtrigger: always_on, model_decision, glob, manualNot documented
Amp
Amp
Falls back to AGENT.md or CLAUDE.mdYes, its primary fileWorkspace, personal, parents up to $HOME, subtree on read, systemNot documented
Cline
Cline
.clinerules/ or .cline/rules/, global rules folder; also reads .cursorrules, .windsurfrulesYesWorkspace wins over global; paths: conditional rulesNot checked

"Not documented" means we found no plan or spec feature in the vendor's docs for that surface, not that none exists. "Not checked" means we did not look.

Five places the portable file silently stops loading

Claude Code with a CLAUDE.md

The default setting reads AGENTS.md only when no CLAUDE.md exists. Keep an @AGENTS.md import in CLAUDE.md, or set "Project instructions" in /config to read both. Claude Code also ignores AGENTS.override.md.

Gemini CLI out of the box

It reads GEMINI.md. Add AGENTS.md to context.fileName in settings.json, and check with /memory show.

Nested files in VS Code

A root AGENTS.md works; per-package files in a monorepo do nothing until chat.useNestedAgentsMdFiles is on.

Big files in Codex

Codex caps project instructions at 32 KiB by default (project_doc_max_bytes). In a monorepo with several long AGENTS.md files on the path, check the limit before assuming the nearest file made it in.

Rules that are really specs

An instruction file that grows a feature's acceptance criteria is loaded on every task, for every change. Per-change rules belong in the spec for that change.

We measured the cost of missing rules

In our recorded agent runs, deleting a 13-line contract doc turned a safe API cleanup into one that broke the shipped mobile app in 2 of 3 runs.

A setup that works in all eleven

Files

AGENTS.md                  # stack, commands, boundaries, readers
packages/billing/AGENTS.md # rules only true inside billing
CLAUDE.md                  # "@AGENTS.md" + Claude-only notes
GEMINI.md                  # or set context.fileName instead
.github/copilot-instructions.md   # optional, Copilot-only
specs/2026-09-coupon/spec.md      # goal, non-goals, ACs, evidence

What goes where

  • AGENTS.md: facts that are true for every task. Who reads which table or field outside the repo, which files are generated, which migrations are frozen.
  • Tool files: only what that tool alone needs, plus a pointer to AGENTS.md. Never a second copy of the rules.
  • The spec: the rules for this change. The AGENTS.md guide covers the split in detail.

Built-in spec features and spec frameworks

Kiro specs

The only agent here with a spec workflow built in: requirements.md or bugfix.md, design.md, tasks.md. Requirements use EARS ("WHEN [condition/event] THE SYSTEM SHALL [expected behavior]"). Variants: Requirements-First, Design-First, and Quick Spec without approval gates. "Run all tasks" runs independent tasks in parallel waves.

Plan modes

Claude Code, Codex, Cursor, Gemini CLI and Copilot in VS Code all have a read-only planning mode. Cursor can save the plan into the repo; VS Code keeps local plans in session memory, outside the project. A plan is not a spec: it describes steps, not the behaviour that must be true when the steps are done.

Frameworks on top

GitHub Spec Kit reached v1.0 on August 21, 2026 (v1.0.12 on September 25). OpenSpec is at v1.13.2 (September 23). BMAD-METHOD is at v6.12.0 (September 4) after cutting its core skills from 14 to 8. Our OpenSpec vs Spec Kit vs Superpowers comparison covers how to combine them.

What the 2026 models changed for spec work

Vendors shipped a lot between May and September 2026. Three claims matter for how much you write down; all are the vendors' own words, linked below.

Runs got much longer

Anthropic reports a tester's Opus 5.5 task running "for over 18 hours" unattended; Meta describes Muse Code sessions of "1,000+ tool calls (up to 24 hours)"; Alibaba describes a 10+ day autonomous build with Qwen3.8-Max. The longer an agent runs without you, the more of its decisions happen where nobody reviews them.

Plan, fan out, verify

Claude Code dynamic workflows plan and "run hundreds of parallel subagents", with "the existing test suite as its bar"; Grok Build ships a plan mode with parallel subagents, and Muse Code bundles /plan and /goal skills. When tests are the bar, acceptance criteria written as tests are what the agent actually checks against.

Smaller models closed the gap, with a spec

Anthropic reports Sonnet 5.5 above Opus 5.5 on Terminal-Bench 4.0. In our own runs, a spec lifted Haiku 4.5 from 2–5 of 8 checks to 8 of 8 on the API task. See the cross-model runs.

Sources

Checked on September 29, 2026. Vendor docs move; if a link here has changed, the file names and settings above are what to search for.

Write the rules once, then the spec per change

The spec packet generator turns a ticket into goal, non-goals, acceptance criteria and evidence you can commit next to AGENTS.md.

Editorial note

Every row was checked against the vendor's documentation or changelog on the date below. We re-check this page when a major agent changes how it loads instructions; tell us if something here is out of date.