Skip to content

Custom agents with builtin agent names are silently ignored #1528

Closed

Description

@RyanHecht

Problem

If a user creates a custom agent (e.g., .github/agents/explore.md) that shares a name with a builtin agent (explore, task, code-review, general-purpose), the custom agent loads successfully but can never be invoked. The task tool dispatch logic checks builtin agents first via isYamlBasedAgent(), so the builtin always takes precedence. No warning or error is surfaced — the conflict is silently ignored.

Relevant code

  • Builtin agent names: src/agents/customAgents/builtinAgents.ts — CORE_YAML_AGENT_NAMES
  • Agent dispatch: src/tools/taskTool.ts — isYamlBasedAgent() is checked before isUserAgent(), so builtin always wins
  • Custom agent loading: src/cli/hooks/useCustomAgents.ts — no conflict detection against builtin names

Suggested behavior

A few options (not mutually exclusive):

  1. Warn at load time — When a custom agent name collides with a builtin, log a warning so the user knows their agent will not be used.
  2. Custom agents override builtins — Let users intentionally replace builtin agents with their own. This gives power users more control.
  3. Block conflicting names — Reject custom agents that collide with builtin names, with a clear error message suggesting a rename.

Context

Discovered via internal feedback.

Activity

  1. ilsubyeega commented on Mar 13, 2026

    @ilsubyeega

    at debug log i can find this:
    Image

    just for my case, i purpose just make option to entirely disable builtin agents from start, while i believe vscode's copilot chat didnt have, and also concerns about permission overtaking(read+agent agent can spawn write agent etc)

  2. added
    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agents
    on Apr 6, 2026
  3. copilot-cli-bot commented on Nov 7, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.107. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agents

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions