AgentSpawn: Adaptive Multi-Agent Collaboration Through Dynamic Spawning for Long-Horizon Code Generation
–arXiv.org Artificial Intelligence
Large language models have transformed code generation from single-function synthesis to comprehensive software engineering spanning multiple files and architectural layers [2, 20]. Long-horizon code generation, i.e., tasks requiring dozens of interdependent steps, presents unique challenges: 1. Context explosion: Maintaining relevant information across extended execution 2. Complexity discovery: Identifying when subtasks exceed agent capabilities during runtime 3. Specialized expertise: Requiring different skills at different stages 4. Interruption recovery: Resuming after spawning specialized agents 5. Concurrent modifications: Coordinating multiple agents editing overlapping regions Current approaches fall into two categories: single-agent systems with extended context windows [2], which struggle with task decomposition, and static multi-agent systems [17, 28, 24] with predefined workflows, which cannot adapt to runtime-discovered complexity.
arXiv.org Artificial Intelligence
Feb-10-2026