Table of Contents
Fetching ...

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.

CodeCRDT: Observation-Driven Coordination for Multi-Agent LLM Code Generation

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 to on five of six tasks, while some highly coupled tasks exhibit true coordination overhead and substantial code inflation (). 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.
Paper Structure (45 sections, 3 figures, 7 tables)

This paper contains 45 sections, 3 figures, 7 tables.

Figures (3)

  • Figure 1: CodeCRDT System Architecture. Observation-driven coordination pattern showing lock-free parallel agent execution. The Outliner Agent creates TODO skeleton in Shared CRDT State; Implementation Agents coordinate by observing updates and claiming TODOs via optimistic write-verify protocol. Strong eventual consistency (SEC) guarantees deterministic convergence with zero character-level conflicts.
  • Figure 2: Monaco Editor showing concurrent multi-agent code generation with colored cursors indicating different agents editing TODOs while CRDT synchronization maintains a single converged document.
  • Figure 3: Live preview rendering the evolving React application in real time, demonstrating end-to-end execution of agents' collaborative edits.