Skip to content

Sub-agents cannot see skills from their own plugin due to <available_skills> token truncation #2416

@Shazwazza

Description

@Shazwazza

Describe the bug

The default/main agent says it knows about every skill registered because it doesn't take up info in its context window. But when you change to a custom agent, apparently that custom agent only has a list of truncated (29) skills available.

Component: Copilot CLI — Skill/Agent Context Builder

Severity: High — Renders certain custom agents non-functional

Description:

Custom agents launched via the task tool (e.g., dothisthing) cannot reliably invoke skills they depend on because the <available_skills> list injected into their
context is truncated by token limits. The system currently displays "Showing 29 of 53 skills due to token limits," and there is no guarantee that a sub-agent's
required skills fall within that window.

Repro Steps:

  1. Install the myplugin plugin (which provides both a dothisthing agent and a stack skill)
  2. Change the agent to: dothisthing
  3. Ask the CLI to /triggerthething (triggering the /triggerthething skill)
  4. The agent attempts to find and invoke the triggerthething skill
  5. The agent reports the skill cannot be found, despite it being installed and visible via /skills list

Expected Behavior:

Sub-agents should always be able to see and invoke skills they depend on, especially skills from the same plugin family.

Actual Behavior:

The <available_skills> list is independently truncated for each agent context. Skills critical to a sub-agent's function can be excluded. The truncation is not aware
of agent–skill dependencies.

Suggested Fixes (any of the following):

  1. Dependency declaration: Allow agents to declare required skills in their config (e.g., depends_on: [stack]) so those skills are always included in the agent's
    context
  2. Plugin affinity: Prioritize including skills from the same plugin as the agent being launched
  3. Full skill list for sub-agents: Skip truncation for the <available_skills> block, or at minimum include skill names without full descriptions to fit more within
    the token budget
  4. Skill name passthrough: Even if descriptions are truncated, always include the full list of skill names so agents can invoke by name (the tool already supports
    invoking unlisted skills)

Workaround:

Invoke the skill directly from the main conversation context instead of through the sub-agent, since the main context may (or may not) include the needed skill in
its truncated list.

Affected version

1.0.14

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agents

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions