# how to run multiple claude code agents in parallel

Canonical URL: https://bernstein.run/q/how-to-run-multiple-claude-code-agents-in-parallel
Markdown URL: https://bernstein.run/q/how-to-run-multiple-claude-code-agents-in-parallel.md
Tags: claude-code, parallel, how-to

install bernstein (pipx install bernstein), cd into your repo, write a plan.yaml with one stage that lists several steps, then run bernstein run --from-plan plan.yaml. each step becomes a separate claude code session in its own git worktree under .sdd/worktrees/<session-id>. bernstein spawns them concurrently up to max_agents in bernstein.yaml (default 6, or set BERNSTEIN_MAX_AGENTS), tracks per-agent cost, runs quality gates on each worktree, and merges only the worktrees that pass. for one-shot parallelism: bernstein -g "goal" lets bernstein decompose the goal into parallel tasks itself. step-by-step at https://bernstein.run/cli-quickstart.

## Related

- https://bernstein.run/q/git-worktree-parallel-ai-agents
- https://bernstein.run/cli-quickstart
