TL;DR
When AI coding agents tackle complex software projects alone, they frequently panic, write a single skeleton file, and quit early. Simply throwing multiple agents at a problem in parallel or chaining them in a sequence actually makes things worse due to overwritten code and cascading failures. AgentRoom gives concurrent AI coders a Google-Docs-style shared workspace paired with explicit tools to claim files and broadcast updates—proving that structured coordination, not raw parallelism, is the secret to reliable multi-agent software engineering.
What Problem Does This Paper Address?
Human software engineers collaborate across multi-file repositories simultaneously, using version control or real-time collaborative editors to stay out of each other's way. Most multi-agent AI coding frameworks, however, force agents into rigid, sequential assembly lines: Agent A designs, Agent B codes, Agent C reviews. Everyone waits their turn.
Alternative approaches try running agents in parallel and merging their files afterward, or letting them loose on a shared filesystem powered by CRDTs (Conflict-free Replicated Data Types—the math behind Google Docs that merges concurrent character edits without losing bytes). The catch? Merging bytes cleanly doesn't mean merging logic cleanly; two agents editing the same function simultaneously will often break compilation. Meanwhile, a solo agent facing a complex, 15-file backend task will abandon it up to half the time in a failure mode the authors call "stub-and-exit"—writing a placeholder file and calling it a day. The authors ask: at the exact same compute budget, can explicit, real-time coordination allow concurrent agents to beat both solo coders and sequential pipelines?
Methods
AgentRoom combines a standard real-time collaborative substrate with a novel state-management coordination layer:
- CRDT-Backed Shared Workspace: Multiple CLI coding agents (like Claude Code or Codex) operate simultaneously in one directory. Concurrent writes within 2 seconds are merged at the character level using
pycrdt(a port of Y.js), ensuring no data is overwritten. - Explicit Coordination via MCP: On top of the filesystem, a Model Context Protocol (MCP) server exposes five atomic tools:
claim,release,broadcast,state, andread. - Advisory Locking Protocol: Prompted with a six-step workflow, agents check the room state and call
room_claim(path)before creating a file. If another agent owns it, the server deterministically rejects the claim, forcing the second agent to work elsewhere. Importantly, locks are advisory (enforced via prompt cooperation and state checks rather than hard OS kernel blocks), leaving room for an agent to jump in and fix a stalled teammate's bug if needed.
Datasets
Because no training was involved, the authors built an evaluation suite of five Express.js/TypeScript backend tasks (T1–T5) escalating in scope and time budget (300s to 900s): from 6-file JWT authentication (T1) up to ≥15-file systems like a hash-chained double-entry financial ledger (T4) and an algorithmic trading platform (T5).
Unlike static unit-test benchmarks, agents write both the application and their own vitest test suites. Outputs are evaluated via a composite LLM-judge rubric (cross-validated against deterministic regex and TypeScript AST compilers). To check cross-language portability, the authors also evaluated a 10-project Python subset from DevBench (DevEval) and a Rust+axum port of the T4 ledger task.
Key Insights and Ideas
- Peer pressure cures "stub-and-exit": Having a teammate actively broadcasting progress and claiming files suppresses the lone-agent urge to give up early on daunting tasks.
- Naive parallelism is worse than working alone: Running two uncoordinated agents in separate folders and merging their files afterward scores lower than a single solo agent, because one agent's stub silently overwrites the other's real code. Sequential handoffs (ChatDev-style) perform worst of all, amplifying early exits at every phase boundary.
- System state beats free-text chat: When agents only coordinate via a free-text chat log, they occasionally claim the same file simultaneously and miss the conflict, resulting in catastrophic 0-test-pass runs. Deterministic
room_claim()rejections prevent this completely. - Two's company, three's a crowd: Scaling from 1 to 2 agents boosts quality, but at 3 and 4 agents, quality drops while broadcast messages spike super-linearly—classic communication overhead.
- Emergent politeness: Without being explicitly prompted to do so, agents in AgentRoom apologize in the broadcast log when crossing file boundaries to fix a teammate's routing bug and leave helpful dependency notes.
Key Results
Tested across CLI-stable frontier models (Claude Sonnet 4.6, Haiku 4.5, OpenAI Codex GPT-5.4, and Gemini 3 Flash):
- Drastic drop in task abandonment: Across 12 model-by-task strata, Solo agents had 13.7× higher odds of abandoning a task than AgentRoom pairs ($p < 10^{-5}$; flat rate dropped from 31% Solo to 5% in AgentRoom).
- Tighter consistency: Run-to-run quality variance ($\sigma$) contracted by 30–45% across all powered models when moving from Solo to AgentRoom $\times 2$.
- Coordination drives quality at matched compute: On the T4 ledger task with Sonnet 4.6, conditions ordered cleanly: ChatDev sequential (0.333) < Parallel-merge (0.456) < Solo (0.544) < Shared-CRDT-only (0.575) < Shared+Prompt without MCP (0.588) < Full AgentRoom (0.669)—a statistically significant +0.213 jump over parallel-merge ($p=0.003$).
- Budget-friendly pairing: Two smaller Haiku 4.5 agents in AgentRoom achieved a 0.662 mean score on T4, beating a single Sonnet 4.6 agent (0.544) at roughly two-thirds the dollar cost.
Limitations and Future Work
- Language & Runtime Scope: The core statistical claims rely on Express.js/TypeScript backend tasks; the Python and Rust experiments are small, underpowered spot checks.
- Self-Authored Tests & Judge Reliance: Because agents write their own test suites, correctness relies heavily on an LLM-judge composite rather than a massive held-out test oracle (save for one post-hoc probe). Furthermore, comparing Haiku pairs to Solo Sonnet using a Sonnet judge carries potential model-family bias.
- CLI Fragility & Sample Sizes: Vendor CLIs aren't built for concurrent MCP stress yet—GPT-5.4-mini crashed repeatedly and had to be excluded, and Gemini required a custom NDJSON framing fix. Several ablation cells also have small sample sizes ($n=5$ to $7$).
- Scaling Bottlenecks: Why quality degrades past $N=2$ agents remains an open question; future work will explore multi-channel topologies to test if the single broadcast log is the bottleneck.
Summary updated