{"id":32517859,"url":"https://github.com/stokasz/claude-code-multiagent","last_synced_at":"2026-04-16T11:01:28.987Z","repository":{"id":321061317,"uuid":"1084312582","full_name":"stokasz/claude-code-multiagent","owner":"stokasz","description":"Run Claude Code on different AI models (Grok, Gemini, GPT or any from 500+ on OpenRouter) in parallel. Each in its own container, its own branch. Compare and merge the best one.","archived":false,"fork":false,"pushed_at":"2025-10-27T15:16:25.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-27T16:25:55.015Z","etag":null,"topics":["ai","ai-agents","claude-code"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stokasz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-27T14:11:34.000Z","updated_at":"2025-10-27T15:16:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"4a6c539d-7d10-4f80-80bc-8af5f4a71f34","html_url":"https://github.com/stokasz/claude-code-multiagent","commit_stats":null,"previous_names":["stokasz/claude-code-multiagent"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/stokasz/claude-code-multiagent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokasz%2Fclaude-code-multiagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokasz%2Fclaude-code-multiagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokasz%2Fclaude-code-multiagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokasz%2Fclaude-code-multiagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stokasz","download_url":"https://codeload.github.com/stokasz/claude-code-multiagent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokasz%2Fclaude-code-multiagent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31882886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","claude-code"],"created_at":"2025-10-28T03:00:54.815Z","updated_at":"2026-04-16T11:01:28.974Z","avatar_url":"https://github.com/stokasz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code Multi-Agent Development (MAD)\n\n\u003cimg width=\"3234\" height=\"1904\" alt=\"image_2025-10-27_15-05-35\" src=\"https://github.com/user-attachments/assets/fbd8419e-8632-47d8-a0e5-143b2a7602c5\" /\u003e\n\nRun Claude Code on different AI models (Grok, Gemini, GPT or any from 500+ on OpenRouter) in parallel. Each Claude Code instance creates a separate branch from your current one, and runs in a different Docker container. \n\nYou can also use this tool to set up Claude Code with any free model available via OpenRouter's API, and use Claude Code for free!\n\n## Why Multi-Agent?\n\nGet multiple models to work on the same problem, so you can merge the one with the best results. It's like being a game master for a battle royale, where each model is a contestant and you pick the winner.\n\nI found tooling like Claude Code Router or Claude Code Proxy to be missing parallel execution w/ containers.\n\n**How it works:**\n\n- Choose any 4 models from OpenRouter's 500+ options\n- Run 4 models in parallel (you pick which 4)\n- Each runs Claude Code in a separate docker container\n- Each works on a separate git branch via worktrees\n- Watch them all in tmux 2x2 grid\n- Compare implementations with `mad compare`\n- Merge the best one with `mad merge \u003cmodel\u003e`\n\n*currently only macOS supported (sorry windows guys) / porting to linux is trivial\n\n## Setup\n\n```bash\n# install docker desktop from docker.com/products/docker-desktop\n# then install dependencies:\nbrew install bash tmux\n\ngit clone https://github.com/YOUR_USERNAME/mad.git\ncd mad\n\ncp .env.example .env\n# edit .env: add your api keys\n\n# edit docker/litellm/config.yaml: choose your 4 models from openrouter.ai/models\n\ndocker-compose build\n\necho 'export PATH=\"$PATH:'$(pwd)'/scripts\"' \u003e\u003e ~/.zshrc\nsource ~/.zshrc\n```\n\n## Usage\n\n```bash\ncd ~/your-project\nmad\n```\n```bash\nmad compare      # see what each model built\nmad merge gemini # merge the best one\nmad cleanup      # remove branches/worktrees\n```\n\n## Workflow\n\n```bash\ncd ~/my-project\nmad\n\n# tmux opens with 4 panes\n# give same task to all models\n# let them work in parallel\n\n# detach: ctrl+b then d\n# reattach: tmux attach -t mad-\u003csession-name\u003e\n\nmad compare\ngit checkout main\nmad merge gpt5\nmad cleanup\n```\n\n## Commands\n\n| command             | what it does                      |\n| ------------------- | --------------------------------- |\n| `mad`               | start new session                 |\n| `mad compare`       | compare all implementations       |\n| `mad merge \u003cmodel\u003e` | merge specific model's branch     |\n| `mad cleanup`       | remove all worktrees and branches |\n| `mad stop`          | stop containers and tmux          |\n\n## Changing models\n\nedit `docker/litellm/config.yaml`:\n\n```yaml\nmodel_list:\n  - model_name: gemini # change this to the model you want to use\n    litellm_params:\n      model: openrouter/google/gemini-2.5-pro # and this one, based on the link you got from openrouter.ai/models\n      api_key: os.environ/OPENROUTER_API_KEY\n      api_base: https://openrouter.ai/api/v1\n      supports_vision: true\n```\n\nbrowse models at openrouter.ai/models\n\nrebuild:\n\n```bash\ndocker-compose build\ndocker-compose up -d\n```\n\n## Troubleshooting\n\n**containers won't start:** `docker-compose ps` and `docker-compose logs litellm`. rebuild with `docker-compose down \u0026\u0026 docker-compose build --no-cache \u0026\u0026 docker-compose up -d`.\n\n**auth errors:** verify keys in `.env` start with `sk-or-v1-` (openrouter) and `sk-ant-api03-` (anthropic). no special characters in comments.\n\n**worktrees:** `git worktree list` to see all, `git worktree prune` to clean.\n\n**disk space:** `./scripts/docker-cleanup` to remove old containers/images.\n\n## Future ideas\n- Auto pick the model from the list of OpenRouter models\n- MCP/API/headless project management system to let agents collaborate despite separated branches\n- Launch more than 4 models at the same time (I am not sure how needed this is with Claude Code's subagents)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstokasz%2Fclaude-code-multiagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstokasz%2Fclaude-code-multiagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstokasz%2Fclaude-code-multiagent/lists"}