Subagent Patterns: Parallel, Sequential, Background

Table of content

Subagents let you delegate work while staying focused on your main task. The key is knowing which dispatch pattern to use.

Parallel Dispatch

Run multiple subagents simultaneously when tasks are independent.

When to use:

Examples:

Task A ──────────►
Task B ──────────►  (all run simultaneously)
Task C ──────────►

Key requirement: Tasks must not touch the same files. If agents edit shared files, you get merge conflicts and wasted work.

Sequential Dispatch

Chain subagents when later tasks depend on earlier results.

When to use:

Examples:

Task A ──► Task B ──► Task C (each waits for previous)

Key requirement: Define clear handoff points. Each agent should produce output the next agent can consume.

Background Dispatch

Move subagents to background when results aren’t blocking your current work.

When to use:

Examples:

Background: Research ─────────────────►
                                        (notifies when done)
Main work:  Implementation ──────────►

Key shortcut: Ctrl+B moves a running subagent to background. The main session continues while the subagent works independently.

Decision Framework

Ask these questions in order:

  1. Are tasks independent with no shared files?

    • Yes → Parallel
    • No → Continue
  2. Does the next task need output from the previous?

    • Yes → Sequential
    • No → Continue
  3. Do you need the results to continue your current work?

    • Yes → Sequential (wait for it)
    • No → Background

Quick Reference

PatternTasksShared StateBlocking
Parallel3+ independentNoneAll at once
SequentialDependent chainYesOne at a time
BackgroundResearch/analysisNoneNon-blocking

Common Mistakes

Using parallel when files overlap. Two agents editing the same file creates conflicts. Check file boundaries first.

Using sequential when parallel works. Unnecessary waiting. If tasks are truly independent, run them together.

Forgetting background exists. Long research tasks don’t need to block you. Move them to background and keep working.

Practical Tips

Next: Orchestrating Complex Workflows

Topics: ai-agents workflow architecture