Running Tasks in Parallel
Deslize para mostrar o menu
Subagents allow Claude Code to delegate specific tasks to separate agents while the main conversation remains focused on the overall workflow. Each subagent completes its assigned work independently and returns only its results and a summary to the primary agent.
This helps reduce unnecessary context in the main conversation. Research, tool calls, intermediate files, and detailed reasoning from each task remain inside the relevant subagent instead of filling the primary context window.
Subagents can also run independent tasks in parallel. In this example, Claude is asked to complete an entire outreach workflow:
- Find five new dental practice leads;
- Use the lead-scraping skill to verify and save them;
- Generate a personalized website mockup for each lead;
- Draft an outreach email for every prospect;
- Save the completed messages as Gmail drafts.
The primary agent acts as the coordinator. It reviews the available skills, determines which tasks depend on earlier results, and decides which steps can happen simultaneously.
For example, several subagents can search for leads at the same time. After the leads are reviewed and approved, Claude can start a separate mockup-generation subagent for each prospect. Once the mockups are ready, the email drafts can be created.
You can monitor these agents through the background tasks panel. It shows which tasks are running, how long they have been active, and how many tokens they are using. You can also open an individual task to review its conversation.
Different models may be assigned based on task complexity. A more capable model can handle difficult creative or technical decisions, while a faster model can complete predictable tasks. This helps balance quality, speed, and token usage.
Subagents are most useful when a workflow contains several clearly defined tasks, especially when some of them can run independently. Instead of completing every step one at a time, Claude can coordinate the process and produce several finished results in parallel.
Obrigado pelo seu feedback!
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo