The root cause is simple: there's no shared state between agents. Each one starts with a blank slate every session, and when you run them in parallel, conflicts are inevitable.
Hivemind is my attempt at fixing this. It's a persistent, append-only event log exposed as an MCP server. Every agent publishes structured events (decisions, completions, blockers) and every agent can query the log to understand what's happening across the project. I find it most useful when one agent completes a large task, and then my next agent can easily see the updates done instead of scanning through my codebase or git commits, trying to piece together the changes. This alone has saved me tons of session context / tokens.
What it does:
- Shared event log — Agents publish what they're doing and query what others have done. "What auth approach did we decide on?" returns a real answer instead of the agent guessing.
- Advisory file locks — Before editing a file, an agent acquires a lock. If another agent holds it, the edit is blocked with an explanation. TTL-based expiry handles crashes. This alone eliminated most of the conflicts I was seeing. There's also a --no-locks configuration option to disable locking files entirely and then dealing with any potential merge conflicts.
- Semantic search — Events are embedded with vector search, so agents find relevant context by meaning. Searching "login changes" matches "Migrated authentication to JWT" even though no keywords overlap.
- Task state — Active tasks, blockers, and completions are derived from the event stream. Any agent can check what's in progress before starting new work.
- Knowledge base — Persistent project docs that survive across sessions. Architecture decisions, conventions, context that agents need repeatedly.
- Human approvals — Agents can request sign-off before touching critical files. You approve/deny from the dashboard.
How it works in practice:
Install globally (npm install -g @hivemindai/mcp-server), run hivemind login, then hivemind init in your project. It auto-configures your editor's MCP settings and adds coordination rules to CLAUDE.md so agents know to use it.
Would love feedback from anyone running multi-agent workflows!!