CodeCRDT: Observation-Driven Coordination for Multi-Agent LLM Code Generation
Sergey Pugachev
TL;DR
CodeCRDT addresses the coordination bottleneck in multi-agent LLM code generation by using observation-driven coordination on a shared CRDT substrate to enable lock-free parallel editing with deterministic convergence. The authors formalize a TODO-claim protocol ensuring at-most-one winner under strong eventual consistency and evaluate the approach in 600 trials across six tasks, revealing task-dependent speedups and semantic conflicts that require reconciliation. Normalizing for code volume shows per-character speedups of $11\%$ to $52\%$ on five of six tasks, while some highly coupled tasks exhibit true coordination overhead and substantial code inflation ($82\%$–$189\%$). The work provides actionable deployment guidance, demonstrates zero character-level merge failures, and argues that the observation-driven coordination pattern generalizes beyond CRDTs to substrates offering observable updates and deterministic convergence.
Abstract
Multi-agent LLM systems fail to realize parallel speedups due to costly coordination. We present CodeCRDT, an observation-driven coordination pattern where agents coordinate by monitoring a shared state with observable updates and deterministic convergence, rather than explicit message passing. Using Conflict-Free Replicated Data Types (CRDTs), CodeCRDT enables lock-free, conflict-free concurrent code generation with strong eventual consistency. Evaluation across 600 trials (6 tasks, 50 runs per mode) shows both benefits and trade-offs: up to 21.1% speedup on some tasks, up to 39.4% slowdown on others, and 100% convergence with zero merge failures. The study formalizes observation-driven coordination for stochastic LLM agents, revealing semantic conflict rates (5-10%) and quality-performance tradeoffs, and provides empirical characterization of when parallel coordination succeeds versus fails based on task structure.
