Back to feed
Dev.to
Dev.to
7/18/2026
Swarming Claude Code and Codex in Parallel: Running Multiple Agents at Once with tmux and Git Worktrees

Swarming Claude Code and Codex in Parallel: Running Multiple Agents at Once with tmux and Git Worktrees

Short summary

A detailed tutorial on running multiple Claude Code and Codex agents in parallel using tmux and git worktrees. The author presents a three-layer protocol (plan.json declaration, orchestrator script, worker script) that isolates each agent in its own worktree branch to eliminate conflicts. Includes full code for session setup, worktree creation, and artifact consolidation.

  • Three-layer orchestration protocol: plan.json, orchestrate-worktrees.js, and worker shell scripts
  • Git worktrees isolate each agent's changes to eliminate merge conflicts
  • Tmux splits enable visual monitoring of all parallel agent sessions

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more