Skip to content

Commit 337971e

Browse files
committed
docs: fix conflicting Copilot CLI custom agent precedence guidance
Project-level agents now take precedence over personal agents with the same name, and both pages clarify that identity is based on the frontmatter name value, not the file name.
1 parent aff9496 commit 337971e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Each {% data variables.copilot.copilot_custom_agent_short %} is defined by a Mar
3636
* **User** (`~/.copilot/agents/`)
3737

3838
> [!NOTE]
39-
> If you have {% data variables.copilot.custom_agents_short %} with the same name in both locations, the one in your home directory will be used, rather than the one in the repository.
39+
> If you have {% data variables.copilot.custom_agents_short %} with the same `name` value in both locations, the one in the repository will be used, rather than the one in your home directory.
4040
4141
1. Choose whether to get {% data variables.product.prodname_copilot_short %} to create the {% data variables.copilot.copilot_custom_agent_short %} file, or create it yourself.
4242

‎content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ By default, this file is located at `~/.copilot/providers.json`. Override its lo
102102

103103
### `agents/`
104104

105-
Store personal custom agent definitions here as `.agent.md` files. Agents placed in this directory are available in all your sessions. Project-level agents (in `.github/agents/`) take precedence over personal agents if they share the same name.
105+
Store personal custom agent definitions here as `.agent.md` files. Agents placed in this directory are available in all your sessions. Project-level agents (in `.github/agents/`) take precedence over personal agents if they share the same `name` value.
106106

107107
For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli).
108108

0 commit comments

Comments
 (0)