Feature Request: Agent/sub-agent parity — skills invocation and nested sub-agent spawning
Feature Request
Is your feature request related to a problem?
Agents (main thread via claude --agent) and sub-agents currently have significant capability gaps:
- Sub-agents cannot invoke lazy-loaded skills — Skills (
/commit,/simplify, etc.) are only available in the main conversation context. Sub-agents can only receive skill content statically via theskillsfrontmatter field, not dynamically invoke them.
- Sub-agents cannot spawn other sub-agents — The architecture is intentionally single-level. Even if
Agentis listed in a sub-agent'stoolsfrontmatter, it has no effect. Only the main agent thread can spawn sub-agents.
This asymmetry limits composability and forces workarounds (manual chaining, inlining skill logic, flattening delegation hierarchies) that become increasingly brittle as workflows grow in complexity.
Describe the solution you'd like
Full capability parity between agents and sub-agents:
1. Lazy-loaded skill invocation for sub-agents
Sub-agents should be able to dynamically invoke skills via the Skill tool, controlled by frontmatter:
---
name: release-manager
description: Handles release workflow
tools: Read, Edit, Bash, Skill
skills_invocable: commit, simplify # allowlist of invocable skills
---
Skillintoolsenables dynamic invocation (not just static preloading)skills_invocableprovides an optional allowlist (omit for unrestricted access)
2. Nested sub-agent spawning
Sub-agents should be able to spawn other sub-agents, with configurable depth limits:
---
name: team-lead
description: Coordinates a team of specialized agents
tools: Agent(code-reviewer, debugger), Read, Bash
maxDepth: 2 # how many levels deep spawning is allowed
---
Agent(type)syntax works the same as it does for main agentsmaxDepthcontrols recursion depth (default: 1 for backwards compatibility, configurable up to a reasonable limit)- Context, cost, and permission tracking propagate through the hierarchy
Describe alternatives you've considered
- Sequential chaining from main thread: Works but forces all orchestration through a single bottleneck and can't express naturally hierarchical workflows.
- Static skill preloading via
skillsfrontmatter: Embeds content but doesn't support parameterized invocation or dynamic execution. - Agent teams: Useful for parallel coordination but heavyweight for simple nested delegation.
- Inlining skill/agent logic in prompts: Defeats the purpose of reusable, composable primitives.
Why this matters
Agents and skills are Claude Code's most powerful composition primitives. Allowing them to compose with each other at any depth unlocks significantly more sophisticated autonomous workflows — e.g., a release-manager agent that spawns a code-reviewer sub-agent, which invokes /simplify on flagged files, while the parent runs /commit on the final result.
Related issues
- #32336 (lazy-loaded skills in sub-agents)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗