Coordinating multiple AI coding agents on one repo or multiple in your own ecosystem — without git worktrees
Description and use
Multiple AI assistants editing the same repository can clash when modifying files concurrently. The solution is a local WebSocket hub, SYNAPSE CHANNEL, that manages file claims, a shared task plan, and turn-based coordination. This eliminates conflicts and improves collaboration reliability.
Problem
Multiple AI coding agents editing the same repository concurrently cause file conflicts and lost work.
Outcome
Agents avoid file conflicts, maintain a shared plan, and coordinate turns without a central orchestrator, improving reliability and developer productivity.
Workflow
- Install Synapse Channel hub:
pip install synapse-channel synapse-hub --port 8876 --db ./synapse.db - Each agent connects to the hub:
agent = SynapseAgent("backend", uri="ws://localhost:8876") - Agent claims file paths before editing:
await agent.claim("auth-refactor", paths=["src/auth.py","src/session.py"]) - Use command-line to declare and update tasks:
synapse task declare BUILD --title "compile",synapse task update BUILD --status done - Agents wait for messages:
synapse wait --name backend-rx --for backend --directed-only - Send directed messages:
synapse send --target backend "rebased main, re-pull" - Wrap critical operations with a lease:
synapse lock myrepo:git -- git push - Hub persists state in SQLite; on restart it replays logs to resume leases and tasks.
Evidence
The hub refuses an overlapping claim. The hub never reads your filesystem — the globs are agent-declared.
Every claim, release, task, and checkpoint goes into an append-only SQLite log and is replayed on start-up, so a hub restart resumes live leases instead of dropping them.
- Record date: 2026-09-05T14:20:26.005Z