[FEATURE] create/write agents on the fly.
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When working on complex, multi-step tasks, Claude Code currently requires agents to be defined manually and statically in advance. This creates a rigid workflow where the orchestrator cannot adapt to emerging subtasks at runtime. In real-world projects — especially large codebases — the nature and scope of required agents often only becomes clear during execution, not before it. This forces developers to either over-provision agents upfront or interrupt the workflow to reconfigure manually.
Proposed Solution
Introduce a dynamic Agent Creator layer that sits between the Orchestrator and the individual Agents:
Orchestrator → Agent Creator → Agents
The Orchestrator analyzes the task and delegates to an Agent Creator, which dynamically spawns, configures, and names purpose-built agents at runtime — each with their own context, tools, and scope. Once created, these agents execute in parallel or sequence and report back to the Orchestrator.
This would enable:
Dynamic decomposition — the Orchestrator doesn't need to know all subtasks upfront
Scoped agents — each agent gets only the tools and context it needs
Reusability — the Agent Creator can reuse existing agents when appropriate
Scalability — complex tasks naturally self-organize into optimal agent topologies
This pattern mirrors how modern agentic frameworks (LangGraph, AutoGen) handle emergent complexity, and would make Claude Code significantly more powerful for large-scale, open-ended engineering tasks.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
API and model interactions
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗