Transcript
When you're running parallel agents on a codebase, one useful pattern is to designate one Claude session as the coordinator. The coordinator decomposes complex tasks and routes them to specialized subagents.
Think about a large refactoring project. You might have one coordinator instruction file that says: "You are the coordinator for this refactoring project. Your role is to break down high-level requests into specific, focused tasks and delegate them to specialist agents. Do not write code yourself - instead, identify what needs to be done and create clear specifications for each subtask."
The coordinator analyzes the overall goal, identifies the different components that need work - maybe the core business logic, the API layer, the database schema, and the frontend components. Then it creates focused task descriptions for each area.
For example, when you ask the coordinator to "improve system performance," it might break that down into: analyzing current bottlenecks in the service layer, profiling database queries, reviewing API response caching, and checking frontend rendering optimization. Each of these becomes a task for a specialized subagent.
The coordinator maintains the big picture and ensures all the pieces fit together, while the subagents dive deep into their specific domains without getting distracted by the broader context. This hierarchical approach is useful for large-scale brownfield work where the complexity would overwhelm a single conversation thread.