-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Sub-agents cannot see skills from their own plugin due to <available_skills> token truncation #2416
Description
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:
- Install the myplugin plugin (which provides both a dothisthing agent and a stack skill)
- Change the agent to: dothisthing
- Ask the CLI to /triggerthething (triggering the /triggerthething skill)
- The agent attempts to find and invoke the triggerthething skill
- 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):
- 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 - Plugin affinity: Prioritize including skills from the same plugin as the agent being launched
- 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 - 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