Engineering
swarm avatar

swarm

Orchestrate parallel Claude Code worker swarms with protocol-based behavioral governance for complex features, multi-step refactors, and long-running autonomous coding sessions.

Introduction

Claude Swarm is a sophisticated MCP server designed to manage autonomous, multi-hour software development sessions. By implementing an orchestrator-worker pattern, it enables developers to tackle massive refactors, complex feature implementations, or multi-step tasks that exceed the context capacity of single AI sessions. The orchestrator acts as the central planner, decomposing high-level requirements into independently testable feature chunks while enforcing strict behavioral constraints through a protocol system to ensure safety and alignment during execution.

  • Parallel Worker Swarms: Utilizes git worktree isolation and tmux to run multiple Claude Code worker instances simultaneously, significantly accelerating delivery for independent features.

  • Persistent State Management: Ensures session continuity by persisting task progress, worker logs, and git history outside of transient AI context windows, surviving even context compactions.

  • Protocol-Based Behavioral Governance: Provides a robust framework to define "rules of the road" for workers, preventing unauthorized actions and ensuring code quality through pre-spawn validation and continuous monitoring.

  • Long-Running Autonomy (Ralph Loop): Features a unique loop that refreshes the LLM context per iteration while maintaining session state, enabling multi-day autonomous operation without context rot.

  • Comprehensive Monitoring: Includes a real-time web dashboard (accessible at localhost:3456) for live terminal streaming, worker status tracking, and audit logs of protocol violations.

  • Competitive Planning & Verification: Supports automated architecture reviews and test-as-supervisor workflows, where workers propose and iterate on plans before implementation.

  • Usage: Requires Node.js 18+, tmux, and the Claude Code CLI. Always ensure .gitignore is configured to exclude .claude/ directory and progress logs to prevent state leakage.

  • Best Practices: Use for complex features that require deep code analysis and multi-file changes. Leverage the orchestrator to define dependencies between tasks, ensuring a logical build order.

  • Inputs/Outputs: Takes natural language task descriptions as input; outputs code commits, repository configuration updates, and detailed execution logs across isolated git worktrees.

  • Constraints: Designed specifically for software engineering environments; requires careful setup of Git and shell access. Always review auto-generated plans for critical architectural paths.

Repository Stats

Stars
109
Forks
10
Open Issues
0
Language
TypeScript
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 05:18 PM
View on GitHub