Parallel Claude Code agents: plan → endorse → spawn → monitor → review → integrate → ship.
bash
# 1. Write task prompts
cat > /tmp/prompt-task1.md << 'EOF'
Implement feature X...
EOF
# 2. Create tasks JSON
cat > /tmp/tasks.json << 'EOF'
[
{"id": "feat-x", "description": "/tmp/prompt-task1.md", "role": "builder"},
{"id": "feat-y", "description": "/tmp/prompt-task2.md", "role": "builder"}
]
EOF
# 3. Spawn batch (auto-endorses + auto-integration)
bash scripts/spawn-batch.sh "/path/to/project" "batch-1" "Description" /tmp/tasks.json
RoleModelEffortUsearchitectopushighDesign, planning, complex decisionsbuildersonnethighFeature implementation (parallel)reviewersonnetmediumAuto-review on completionintegratoropushighCross-branch merge + conflict resolution
Configure in config/duty-table.json.
ScriptPurposespawn-batch.shSpawn N parallel agents + integration watcherspawn-agent.shSpawn single agent in worktree + tmuxendorse-task.shEndorse task (required before spawn)check-agents.shShow status of all running agentscleanup.shRemove worktrees, branches, tmux sessionsnotify.shSend webhook/Telegram notificationnotify-on-complete.shAuto-watcher: notify + review on completionintegration-watcher.shAuto: merge all branches when batch completes
Break work into parallel tasks. Each task needs: ID, prompt, role.
Every task requires endorsement before spawning — safety gate to prevent runaway agents.
spawn-batch.sh auto-endorses all tasks in batchbash scripts/endorse-task.sh <task-id>Each agent runs in:
<project>-worktrees/<task-id>/)claude-<task-id>)claude --print --permission-mode bypassPermissions)When an agent completes, notify-on-complete.sh:
When all agents in a batch complete, integration-watcher.sh:
scripts/ and config/ to your workspaceconfig/swarm.conf.example → config/swarm.conf and configurebash 4+, tmux, git, gh, jq, claude (Claude Code CLI)Set SWARM_NOTIFY in swarm.conf:
webhook — POST to SWARM_WEBHOOK_URL (Slack/Discord/custom)telegram — Send via SWARM_TELEGRAM_BOT_TOKEN + SWARM_TELEGRAM_CHAT_IDnone — Log only (default)claude --print in background — use spawn-agent.sh