Skip to content

Instantly share code, notes, and snippets.

@conradcaffier03
Created June 22, 2026 16:29
Show Gist options
  • Select an option

  • Save conradcaffier03/730bb39d4f5cf7c5ddfa8a70550002ee to your computer and use it in GitHub Desktop.

Select an option

Save conradcaffier03/730bb39d4f5cf7c5ddfa8a70550002ee to your computer and use it in GitHub Desktop.
Claude Code Parallel Agents — how to run multiple agents at the same time

Dispatching Parallel Agents in Claude Code

Claude Code can run multiple agents at the same time — each one working on a separate task in parallel.

When to use this

You have 2+ tasks that are:

  1. Independent — fixing one doesn't affect the other
  2. Non-overlapping — they don't write to the same files

Classic examples:

  • 3 test files failing for different reasons → one agent per file
  • 4 subsystems to refactor → one agent per subsystem
  • Multiple API integrations to build → one agent per integration

How it works

You (coordinator)
├── Agent A: Fix auth tests
├── Agent B: Fix payment tests
└── Agent C: Fix notification tests

All three run at the same time. You review the results when they're done.

The pattern in Claude Code

Using the Agent tool (built-in)

Open Claude Code and run tasks in parallel by creating multiple TaskCreate entries:

Task("Fix the authentication test failures in tests/auth.test.ts")
Task("Fix the payment processing failures in tests/payments.test.ts")
Task("Fix the notification failures in tests/notifications.test.ts")

Using the Task system

  1. Break your work into independent units
  2. Open multiple Claude Code sessions (one per task) or use the Agent tool
  3. Each agent gets a focused, self-contained prompt — no shared context
  4. You review each result and integrate

The key principle

Each agent gets exactly the context it needs — nothing more.

Bad: "Here's our whole codebase, please fix everything" Good: "Fix the failing test in tests/auth.test.ts. The error is: [paste error]. The relevant files are: [list them]."

A focused agent with complete context outperforms a general agent with too much context every time.

Pitfalls to avoid

  • Don't parallelize tasks that share state (same file, same database table, same config)
  • Don't parallelize when step 2 depends on step 1's output
  • Don't send the same broad prompt to multiple agents — each should have a different scope

For the full parallel-agents skill used to orchestrate this in Claude Code: → Install the Superpowers skill pack: https://get.caffier-agency.com?utm_source=instagram&utm_medium=gist&utm_campaign=PARALLEL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment