Specification feature · interfaces
Nested AGENTS.md instructionsAGENTS.md convention
Apply nested AGENTS.md files with directory-sensitive precedence.
Terminology basis: AGENTS.md convention. AGENTS.md convention
Nested AGENTS.md instructions: 2 supported, 4 partial, 0 unsupported, 25 unreviewed across 31 cataloged products.
Current evidence by product
Can my agent use Nested AGENTS.md instructions?
Read across for the answer. 6 of 31 current product columns have reviewed evidence; unreviewed does not mean unsupported.
Web
9 productsDesktop
13 productsCLI
9 productsDefinition and scope
What this capability means
Apply nested AGENTS.md files with directory-sensitive precedence.
Support is recorded only when exact, dated evidence covers this behavior.
Traceable compatibility
Assertion ledger
Documentation evidence only. No runtime conformance test is implied.
- Target
- current Codex AGENTS.md documentation · dated-documentation
- Environment
- local-default
- Observed
- 2026-08-28
No additional condition is recorded for this statement.
- OpenAI — Custom instructions with AGENTS.mddocumented · reviewed 2026-08-28
- Target
- current Cursor Rules documentation · dated-documentation
- Environment
- local-default
- Observed
- 2026-08-28
- host-roleclaim is scoped to Cursor Agent in the desktop workbench
- Cursor — Rulesdocumented · reviewed 2026-08-28
- Target
- current VS Code custom-instructions documentation · dated-documentation
- Environment
- preview-enabled
- Observed
- 2026-08-28
- feature-flagrequires chat.useNestedAgentsMdFiles
- runtimeVS Code adds relative paths to chat context and lets the agent decide which instructions to use; deterministic nearest-file precedence is not documented
- Microsoft — Use custom instructions in VS Codedocumented · reviewed 2026-08-28
- Target
- current Gemini CLI context-file documentation · dated-documentation
- Environment
- local-default
- Observed
- 2026-08-28
- runtimehierarchical and just-in-time discovery applies only after AGENTS.md is added to context.fileName; GEMINI.md is the default
- Google — Provide context with GEMINI.md filesdocumented · reviewed 2026-08-28
- Target
- current GitHub Copilot CLI custom-instructions documentation · dated-documentation
- Environment
- local-default
- Observed
- 2026-08-28
- runtimethe CLI documentation establishes directory-sensitive discovery but does not specify conflict precedence between nested AGENTS.md files
- GitHub — Adding custom instructions for Copilot CLIdocumented · reviewed 2026-08-28
- Target
- current Windsurf Rules documentation · dated-documentation
- Environment
- local-default
- Observed
- 2026-08-28
- runtimeroot AGENTS.md is always on and subdirectory files become automatic glob-scoped rules, but conflict precedence is not documented
- Windsurf — Memories and Rulesdocumented · reviewed 2026-08-28
- 1. Evidence checked 2026-08-28: Codex walks from the project root to the working directory, concatenating AGENTS.md guidance root-to-leaf so nearer files override earlier guidance.
- 2. Evidence checked 2026-08-28: Cursor combines nested AGENTS.md files with parent instructions and gives more-specific directories precedence.
- 3. Evidence checked 2026-08-28: VS Code's nested AGENTS.md support is experimental and exposes discovered paths to the agent, which decides relevance rather than enforcing documented nearest-file precedence.
- 4. Evidence checked 2026-08-28: Gemini CLI provides hierarchical and just-in-time context discovery, but AGENTS.md requires configuring context.fileName.
- 5. Evidence checked 2026-08-28: Copilot CLI discovers AGENTS.md in intermediate directories and directories nested in the path of a file it is working on, but the reviewed CLI page does not define conflict precedence.
- 6. Evidence checked 2026-08-28: Windsurf converts subdirectory AGENTS.md files into directory-scoped automatic rules, but the reviewed page does not define conflict precedence between nested files.
No sourced issues are attached to this row.
- Nested AGENTS.md instructions reference spec
- OpenAI — Custom instructions with AGENTS.md documented · OpenAI · reviewed 2026-08-28
- Cursor — Rules documented · Cursor · reviewed 2026-08-28
- Microsoft — Use custom instructions in VS Code documented · Microsoft · reviewed 2026-08-28
- Google — Provide context with GEMINI.md files documented · Google · reviewed 2026-08-28
- GitHub — Adding custom instructions for Copilot CLI documented · GitHub · reviewed 2026-08-28
- Windsurf — Memories and Rules documented · Windsurf · reviewed 2026-08-28
Found a wrong or incomplete result?
Name the exact product, describe what happened, add the date, and link public evidence when available. A community report starts a review. It does not change the support state by itself.