Repo Mesh
Cloud Only
Repo Mesh is available in the Cloud version only. It coordinates multiple same-account daemons, which the self-hosted single-machine setup does not provide.
A dashboard shows you one agent at a time. Repo Mesh puts your connected daemons under one control plane: one coordinator session hands work to agents running on many machines — or on many isolated git worktrees of the same machine — and converges the results. Split the work, let idle nodes claim it, and land the merges.
The cloud dashboard surfaces the mesh on the Repo Mesh page (/mesh).
How It Works
Repo Mesh runs over a direct daemon-to-daemon P2P DataChannel (via node-datachannel). The cloud server WebSocket relays only SDP offer/answer/ICE signaling and authorizes that both daemons belong to the same account.
This is daemon coordination — it is not a dashboard command fallback. Dashboard command and data traffic still uses the dashboard↔daemon P2P channel only; Repo Mesh never reroutes that through the server.
The coordinator daemon owns the aggregate mesh_status snapshot. Worker sessions are coordinator-dispatched and auto-approved by default. Completion is evidence-based — git status/checkpoint and ledger events, not an agent's self-report. Repo Mesh tools are exposed to coordinator sessions through the MCP server in mesh mode — see MCP Server.
Core Concepts
- Node — a workspace taking part in the mesh: a repo checkout or an isolated git worktree where an agent can run.
- Mission — a goal that groups the tasks working toward it and stays as a durable record. You create a mission before enqueueing a batch, and mark it
completedorabandonedonce the outcome is decided. - Task — a unit of work an agent on a node performs, moving through
pending → assigned → completed/failed. - Queue — the daemon-local list of waiting tasks that idle nodes autonomously claim. The queue is local-first and authoritative; Cloud/D1 holds only lightweight membership and signaling metadata.
- Ledger — the append-only mesh audit log of what has already happened across nodes (history, not a to-do list). Reconciled between daemons over bounded P2P ledger slices.
- Refinery — the process that converges a worktree branch back into its base: validate → merge → push → clean up.
Orchestration: pull-based task queue
You do not push a task at a specific machine and wait. You enqueue tasks against a mission, and idle nodes pull work autonomously from the local-first queue. That means:
- You can fan work out across machines and providers at once — Claude Code on one node, Codex on another, Gemini on a third.
- Slow or busy nodes simply do not claim more work; fast idle nodes drain the queue.
- The coordinator watches for completion/failure events rather than polling each session.
This is what makes one person able to coordinate many agents at once: decompose the goal into tasks, let idle nodes self-assign, and review the convergence.
Repo-centric collaboration
Repo Mesh is built around the same repo, worked from several places at once:
- Worktree isolation — each node can be an isolated git worktree, so parallel agents on the same repo never trample each other's working tree.
- Automatic convergence — the refinery takes a finished worktree branch and converges it back into its base: it validates, merges, pushes, and cleans up.
- Branch-convergence classification — every touched node/branch lands in exactly one final state (merged to main, pushed feature branch needing merge, blocked in review, cleanup candidate, or not mergeable) so nothing is silently left on a stray branch.
- Safe submodule handling — convergence accounts for submodule reachability; a branch whose submodule commits are not yet reachable from the submodule's origin is held for review rather than merged blindly.
Cross-verification (MAGI)
Beyond splitting distinct tasks, Repo Mesh can send the same read-only investigation to several machine × provider replicas and synthesize the results — agreement and divergence together (MAGI).
Running the same question through independent agents on independent machines is more trustworthy than a single agent's take: consensus surfaces the answer, and disagreement surfaces the parts that need a closer look.
