Claude Orchestrator
A powerful command-line tool that orchestrates multiple Claude Code instances to work in parallel on complex development tasks using git worktrees.
Overview
Claude Orchestrator uses a divide-and-conquer strategy to tackle complex projects by:
- Planning work with Claude Opus 4 (highest intelligence model)
- Executing parallel workstreams with Claude Sonnet 4 (faster/cheaper model)
- Merging and reviewing the results with Claude Opus 4
This approach allows you to leverage AI assistance at scale while maintaining code quality and consistency.
Features
- Intelligent Work Planning: Uses Claude Opus 4 to create comprehensive project plans
- Parallel Execution: Runs multiple Claude Sonnet 4 instances simultaneously on different workstreams
- Git Worktree Isolation: Each workstream operates in its own git worktree to prevent conflicts
- Progress Tracking: Real-time monitoring of all parallel workstreams
- Automatic Merging: Intelligently merges all work back together
- Final Review: Claude Opus 4 reviews and integrates all work
- Detailed Reporting: Generates execution reports with timing and status information
- Clear Role Separation: Supervisor focuses on planning/architecture, workstreams handle implementation
- Visualization Support: Built-in support for charts and plots with quality checks
Prerequisites
Required
- Python 3.8 or higher
- Git 2.5+ (with worktree support)
- Claude Code CLI - Must be installed and authenticated
- Install from: https://claude.ai/download
- After installation, run
claude loginto authenticate
Automatic Setup
- Git Repository: The tool will automatically initialize a git repository if you run it in a directory without one. The repository will be named after your project directory.
Installation
From PyPI
# Using pip
pip install claude-orchestrator
# Using uv (recommended)
uv pip install claude-orchestrator
From Source
# Clone the repository
git clone https://github.com/kmaurinjones/claude-orchestrator.git
cd claude-orchestrator
# Install in development mode
pip install -e .
Usage
Navigate to your git repository and run:
# Basic usage
claude-orchestrator
# With verbose logging
claude-orchestrator --verbose
# Skip worktree cleanup after completion
claude-orchestrator --no-cleanup
# Use a different base branch
claude-orchestrator --base-branch develop
# Require permission prompts during planning/review (default is automatic)
claude-orchestrator --require-permissions
Note: By default, the orchestrator runs with --dangerously-skip-permissions for a hands-off experience. Use the --require-permissions flag if you want to approve tool usage during planning and review phases.
How It Works
-
Planning Phase: Claude Opus 4 interactively works with you to create a comprehensive project plan (
PLAN.md) that divides the work into parallel workstreams. -
Setup Phase: After the plan is approved, Claude Opus 4 sets up the base framework:
- Creates/configures the virtual environment
- Installs all project dependencies
- Creates the base directory structure and shared components
- Ensures
.gitignoreincludes orchestrator files - Commits the base framework to avoid merge conflicts
-
Execution Phase: Only after setup is complete, the tool creates separate git worktrees for each workstream and launches Claude Sonnet 4 instances to work on them simultaneously.
-
Integration Phase: All workstream branches are merged back together, and Claude Opus 4 performs a final review to ensure everything works cohesively.
Example Workflow
# Navigate to your project
cd my-project
# Run the orchestrator
claude-orchestrator
# Claude Opus 4 will help you create a plan
# Then multiple Claude Sonnet 4 instances work in parallel
# Finally, Claude Opus 4 reviews and integrates everything
Important Notes
-
Git Worktrees: The tool creates worktrees as siblings to your current directory, so ensure you have write permissions in the parent directory.
-
Model Names: The tool uses specific model identifiers:
opus(alias for the latest Opus model for planning and review)sonnet(alias to the latest Sonnet model for parallel execution)
These may need updating as new models are released.
-
Safety: The tool uses
--dangerously-skip-permissionsfor autonomous operation during parallel execution. This means Claude can execute commands without asking. Use with caution. -
Branch Strategy: All work happens on a new branch (
parallel_work_TIMESTAMP), keeping your main branch safe.
Package Management
Claude Orchestrator prompts encourage the use of uv as the default package manager for Python projects:
- Claude instances will use
uv sync,uv add, anduv runcommands - Projects will use
pyproject.tomlfor dependency management requirements.txtfiles are only created for backwards compatibility when needed
Architecture
The package is organized into several modules:
orchestrator.py- Main orchestration logicmodels.py- Data models (WorkStream, ExecutionReport)utils.py- Utility functions for git, logging, and parsingconstants.py- Configuration constants and prompts__main__.py- CLI entry point
Troubleshooting
- "Claude Code not found": Ensure
claudeis in your PATH and authenticated - "Git worktree not supported": Upgrade to Git 2.5+
- Merge conflicts: The tool will notify you but won't resolve automatically
- Git repository issues: The tool now automatically initializes a git repo if needed
Development
To contribute to this project:
# Clone the repository
git clone https://github.com/kmaurinjones/claude-orchestrator.git
cd claude-orchestrator
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black claude_orchestrator
isort claude_orchestrator
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Release files for claude-orchestrator 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| claude_orchestrator-0.2.1.tar.gz | 26.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude_orchestrator-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.0 kB
Release files / claude_orchestrator-0.2.1.tar.gz
| Download URL | claude_orchestrator-0.2.1.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7b9adfb3501eb823d03d16dc98f93e71ab5f819d129d247defd200cd80ae2ed
|
|
BLAKE2b-256 checksum How to use checksums |
427ce95609fef658d287266b5e50e14358598f304aa47c2252508beab47ca25b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.0
|
Release files / claude_orchestrator-0.2.1-py3-none-any.whl
| Download URL | claude_orchestrator-0.2.1-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67133110ebba73d83acf236ed57dbda4f85ffd81711d00b51d32668e9c8da62c
|
|
BLAKE2b-256 checksum How to use checksums |
5074b4c8f1c7bc296a00ca7e74dcd24f0209c4c15330e14d72e1801f8b9d250d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.0
|