I've been using Claude Code since launch, but I kept hitting the same wall.
When you ask it to build a complex feature, it works on one file at a time, loses context, and you end up babysitting the process for hours. For anything beyond a simple script, you become the project manager, the code reviewer, and the QA team all at once.
If you need a full feature (Database + API + UI + Tests), you have to manage every step. If you walk away, it stops.
I'm lazy. I don't want to sit at my computer typing "continue" and "fix this error" all day. I want to give one prompt, go lie on the couch, and watch a team of AI agents do the work for me.
So I built Hivemind. It's an open-source orchestrator that turns Claude Code into a full engineering team working in parallel.
ποΈ The Architecture That Makes It Possible
Instead of chatting with one agent, you describe what you want in plain language. Here is how Hivemind handles it:
- PM Agent: Breaks the feature down into a Directed Acyclic Graph (DAG) of dependent tasks.
- Specialist Agents: Frontend, Backend, DB, and QA agents spin up in parallel using separate Claude Code CLI sessions.
- Artifact Flow: When an agent finishes, it passes a structured artifact (like an API contract or schema) to the downstream agents.
- Reviewer Agent: Automatically checks their work. If tests fail, it sends the dev agent back to fix it.
- Memory Agent: Reads all task outputs and updates a persistent
PROJECT_MANIFEST.mdso the team doesn't lose context as the project grows.
System Workflow
βββββββββββββββββββββββββββββββββββββββββββββββ
β Orchestrator (Meta-Agent) β
β Decides what needs to be done β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β Creates DAG
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Task Queue (DAG Executor) β
β Stores and distributes work β
βββββββ¬ββββββββ¬ββββββββ¬ββββββββ¬ββββββββββββββββ
β β β β
βΌ βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ βββββββββββ
β Agent 1 β β Agent 2 β β Agent 3 β β Agent N β
βFrontend β β Backend β β Tests β β Reviewerβ
βββββββββββ βββββββββββ βββββββββββ βββββββββββ
β β β β
βββββββββ΄ββββββββ΄ββββββββ
β
βΌ
ββββββββββββββββββββ
β Mobile Dashboard β
ββββββββββββββββββββ
Zero Extra API Costs
The best part? No API Keys needed.
Hivemind runs directly on top of the Claude Code CLI. It spawns local subprocesses of the CLI you already have installed. You don't pay for tokens; it just uses your existing subscription. It handles the terminal heavy lifting while you watch.
The Mobile Dashboard
I wanted to be able to kick off a complex task, go lie on the couch, and see exactly what's happening from my phone. I built a real-time UI (React + TypeScript + WebSockets) that shows:
- Live streaming of what every agent is doing right now.
- File diffs: See exactly which files are being touched in real-time.
- DAG Progress: Visual task graph showing agent status and dependencies.
How It Handles The Hard Stuff
When you build an AI system that runs locally and orchestrates multiple agents, you run into some serious engineering challenges. Here is how Hivemind solves them:
1. Handling Rate Limits (429 Too Many Requests)
Running up to 4 agents concurrently (the default DAG_MAX_CONCURRENT_NODES) on a single Claude subscription will hit rate limits. Hivemind has a built-in EventThrottler and a CircuitBreaker for the SDK client. When an agent hits a 429, the system catches the EXTERNAL_RATE_LIMIT failure category and automatically applies an exponential backoff retry strategy (up to 3 retries with a 10-second delay) before gracefully pausing the affected node while other agents continue.
2. Active Escalation (Preventing Infinite Loops)
Agents get stuck. They repeat the same error, get caught in circular delegations, or burn through the budget without modifying files. Hivemind has a background Watchdog that monitors 5 distinct "stuck signals" (e.g., orchestrator text similarity > 85%, no file progress for 3 rounds). When triggered, the Active Escalation module steps in:
-
Reassign: Passes the task to a fallback agent (e.g., if
frontend_developeris stuck, trydeveloper). - Simplify: Rewrites the prompt to focus on the minimum viable implementation.
- Kill & Respawn: Hard-kills the stuck Claude session and spawns a fresh one.
3. Security & Sandboxing
Because Hivemind spawns local processes that execute code, security is critical. At the SDK layer, there is a hard project guard that intercepts every Read/Write/Edit/Glob command and blocks any path that resolves outside the designated project directory. For maximum isolation, the entire orchestrator is packaged in a Docker container (docker-compose.yml included) that mounts only the specific project folders it needs, keeping your host system safe.
Try It Out
Hivemind is completely free and open-source under the Apache 2.0 License.
GitHub: cohen-liel/hivemind
You can get started in one line:
git clone https://github.com/cohen-liel/hivemind.git && cd hivemind && ./setup.sh
I'd love to hear your thoughts on the DAG implementation, or if you have any ideas for new specialist agents! Drop a comment below or open an issue on GitHub.


Top comments (0)