---
title: "Nested AGENTS.md instructions"
canonical: "https://canmyagentuse.com/features/nested-agents-md"
contentKind: "feature"
locale: "en"
description: "Apply nested AGENTS.md files with directory-sensitive precedence. This is tracked as an independent compatibility claim."
llmSummary: "Nested AGENTS.md instructions is atomic and does not follow automatically from broader instructions support."
publishedAt: "2026-08-28T00:00:00.000Z"
updatedAt: "2026-08-28T00:00:00.000Z"
verifiedAt: "2026-08-28"
tags: ["interfaces","instructions"]
---

# Nested AGENTS.md instructions

Nested AGENTS.md instructions is atomic and does not follow automatically from broader instructions support.

- HTML: https://canmyagentuse.com/features/nested-agents-md
- JSON: https://canmyagentuse.com/api/v1/features/nested-agents-md.json
- Markdown: https://canmyagentuse.com/features/nested-agents-md.md

Terminology basis: **AGENTS.md convention** — https://agents.md.

## Current support at a glance

Nested AGENTS.md instructions: 2 supported, 4 partial, 0 unsupported, 25 unreviewed across 31 cataloged products.

- Reviewed current products: 6 of 31
- Supported: 2
- Partial: 4
- Unsupported: 0
- Unreviewed: 25
- Not applicable: 0

Unknown or unreviewed means insufficient published evidence; it does not mean unsupported.

Apply nested AGENTS.md files with directory-sensitive precedence.

Support is recorded only when exact, dated evidence covers this behavior.

## Catalog context

- Category: [interfaces](/categories/interfaces.md)
- Specification: [agents-md](/specs/agents-md.md) — revision living
- Aliases: nested AGENTS.md
- Family: [Persistent instructions](/features/instructions.md)
- Siblings: [AGENTS.md root instructions](/features/agents-md.md), [Custom instructions](/features/custom-instructions.md), [Project rules](/features/native-rules.md)

## Compatibility assertions

Unknown means insufficient published evidence; it does not mean unsupported.

### ChatGPT (web)

- Harness: [ChatGPT](/harnesses/chatgpt-web.md)
- current: **Unknown**
- preview: **Unknown**

### Claude (web)

- Harness: [Claude](/harnesses/claude-web.md)
- current: **Unknown**
- preview: **Unknown**

### Gemini (web)

- Harness: [Gemini](/harnesses/gemini-web.md)
- current: **Unknown**
- preview: **Unknown**

### Copilot (web)

- Harness: [Copilot](/harnesses/copilot-web.md)
- current: **Unknown**
- preview: **Unknown**

### Grok (web)

- Harness: [Grok](/harnesses/grok-web.md)
- current: **Unknown**
- preview: **Unknown**

### Grok Bot (desktop)

- Harness: [Grok Bot](/harnesses/grok-bot-desktop.md)
- current: **Unknown**

### Perplexity (web)

- Harness: [Perplexity](/harnesses/perplexity-web.md)
- current: **Unknown**
- preview: **Unknown**

### Le Chat (web)

- Harness: [Le Chat](/harnesses/le-chat.md)
- current: **Unknown**
- preview: **Unknown**

### Devin (web)

- Harness: [Devin](/harnesses/devin-web.md)
- current: **Unknown**
- preview: **Unknown**

### Replit Agent (web)

- Harness: [Replit Agent](/harnesses/replit-agent.md)
- current: **Unknown**
- preview: **Unknown**

### ChatGPT (desktop)

- Harness: [ChatGPT](/harnesses/chatgpt-desktop.md)
- current: **Unknown**
- preview: **Unknown**

### Claude (desktop)

- Harness: [Claude](/harnesses/claude-desktop.md)
- current: **Unknown**
- preview: **Unknown**

### Cursor (desktop)

- Harness: [Cursor](/harnesses/cursor.md)
- current: **Supported**
  - Target: dated-documentation — current Cursor Rules documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (host-role): claim is scoped to Cursor Agent in the desktop workbench
  - Evidence: [Cursor — Rules](https://prod.cursor.com/docs/rules) — documented; observed 2026-08-28
  - Qualification note 2: Evidence checked 2026-08-28: Cursor combines nested AGENTS.md files with parent instructions and gives more-specific directories precedence.
- preview: **Unknown**

### OpenWork Desktop (desktop)

- Harness: [OpenWork Desktop](/harnesses/openwork-desktop.md)
- current: **Unknown**

### Copilot Chat (desktop)

- Harness: [Copilot Chat](/harnesses/vscode-copilot.md)
- current: **Partial**
  - Target: dated-documentation — current VS Code custom-instructions documentation; observed 2026-08-28
  - Environment: preview-enabled
  - Constraint (feature-flag): requires chat.useNestedAgentsMdFiles
  - Constraint (runtime): VS Code adds relative paths to chat context and lets the agent decide which instructions to use; deterministic nearest-file precedence is not documented
  - Evidence: [Microsoft — Use custom instructions in VS Code](https://code.visualstudio.com/docs/agent-customization/custom-instructions) — documented; observed 2026-08-28
  - Qualification note 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.
- preview: **Unknown**

### Chrome WebMCP origin trial (desktop)

- Harness: [Chrome WebMCP origin trial](/harnesses/chrome-webmcp-preview.md)
- current: **Unknown**

### Windsurf (desktop)

- Harness: [Windsurf](/harnesses/windsurf.md)
- current: **Partial**
  - Target: dated-documentation — current Windsurf Rules documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (runtime): root AGENTS.md is always on and subdirectory files become automatic glob-scoped rules, but conflict precedence is not documented
  - Evidence: [Windsurf — Memories and Rules](https://docs.windsurf.com/windsurf/cascade/memories) — documented; observed 2026-08-28
  - Qualification note 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.
- preview: **Unknown**

### Zed Agent (desktop)

- Harness: [Zed Agent](/harnesses/zed-agent.md)
- current: **Unknown**
- preview: **Unknown**

### Continue (desktop)

- Harness: [Continue](/harnesses/continue.md)
- current: **Unknown**
- preview: **Unknown**

### Cline (desktop)

- Harness: [Cline](/harnesses/cline.md)
- current: **Unknown**
- preview: **Unknown**

### JetBrains AI (desktop)

- Harness: [JetBrains AI](/harnesses/jetbrains-ai.md)
- current: **Unknown**
- preview: **Unknown**

### Warp (desktop)

- Harness: [Warp](/harnesses/warp.md)
- current: **Unknown**
- preview: **Unknown**

### Claude CLI (cli)

- Harness: [Claude CLI](/harnesses/claude-cli.md)
- current: **Unknown**
- preview: **Unknown**

### ChatGPT CLI (cli)

- Harness: [ChatGPT CLI](/harnesses/chatgpt-cli.md)
- current: **Unknown**
- preview: **Unknown**

### Codex CLI (cli)

- Harness: [Codex CLI](/harnesses/codex-cli.md)
- current: **Supported**
  - Target: dated-documentation — current Codex AGENTS.md documentation; observed 2026-08-28
  - Environment: local-default
  - Evidence: [OpenAI — Custom instructions with AGENTS.md](https://learn.chatgpt.com/docs/agent-configuration/agents-md) — documented; observed 2026-08-28
  - Qualification note 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.
- preview: **Unknown**

### OpenCode (cli)

- Harness: [OpenCode](/harnesses/opencode.md)
- current: **Unknown**
- preview: **Unknown**

### Gemini CLI (cli)

- Harness: [Gemini CLI](/harnesses/gemini-cli.md)
- current: **Partial**
  - Target: dated-documentation — current Gemini CLI context-file documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (runtime): hierarchical and just-in-time discovery applies only after AGENTS.md is added to context.fileName; GEMINI.md is the default
  - Evidence: [Google — Provide context with GEMINI.md files](https://geminicli.com/docs/cli/gemini-md/) — documented; observed 2026-08-28
  - Qualification note 4: Evidence checked 2026-08-28: Gemini CLI provides hierarchical and just-in-time context discovery, but AGENTS.md requires configuring context.fileName.
- preview: **Unknown**

### Aider (cli)

- Harness: [Aider](/harnesses/aider.md)
- current: **Unknown**
- preview: **Unknown**

### Goose (cli)

- Harness: [Goose](/harnesses/goose.md)
- current: **Unknown**
- preview: **Unknown**

### Copilot CLI (cli)

- Harness: [Copilot CLI](/harnesses/copilot-cli.md)
- current: **Partial**
  - Target: dated-documentation — current GitHub Copilot CLI custom-instructions documentation; observed 2026-08-28
  - Environment: local-default
  - Constraint (runtime): the CLI documentation establishes directory-sensitive discovery but does not specify conflict precedence between nested AGENTS.md files
  - Evidence: [GitHub — Adding custom instructions for Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions) — documented; observed 2026-08-28
  - Qualification note 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.
- preview: **Unknown**

### Amp (cli)

- Harness: [Amp](/harnesses/amp-cli.md)
- current: **Unknown**
- preview: **Unknown**
