Automated code generation remains a persistent challenge in software engineering, as conventional multi-agent frameworks are often constrained by static planning, isolated execution, high computational overhead, and limited adaptability to complex tasks. This paper introduces CollabCoder, a novel Plan-Code Co-Evolution framework that improves code generation through dynamic multi-agent collaboration. The core idea is to design a collaborative decision-making process between the plan module and the code module to decide which module should be executed for the debugging process. Extensive experiments on widely used benchmarks demonstrate that CollabCoder consistently improves code quality and robustness across tasks. Importantly, CollabCoder achieves performance comparable to or exceeding current state-of-the-art methods while reducing computational overhead, with efficiency gains becoming more pronounced as benchmark difficulty increases. On the more challenging LiveCodeBench and xCodeEval benchmarks, our approach improves performance by 11-20% over strong baselines while reducing the number of API calls by an average of 4-10 per execution.
Figures & tables
Figure 1: Overview of (a) a representative traditional code generation and (b) the proposed CollabCoder framework. Unlike conventional methods that rely on a fixed plan throughout code generation, CollabCoder allows the plan to be revised during execution. Multiple agents collaboratively assess intermediate outcomes and determine whether plan or code updates are required, enabling iterative refinement toward the final result.
Figure 2: Architecture of the CollabCoder Framework. This diagram illustrates the co-evolutionary dynamics of the Dynamic Planning Agent and Adaptive Coding Agent, integrated with the Collaborative Debug Agent and Reasoning Trajectory Module, highlighting their continuous feedback loops and self-improving debugging mechanisms that enable adaptive plan evolution and code generation, overcoming the limitations of static planning in prior works.
Accuracy ↑
Efficiency ↓
Method
HE
HE-ET
MBPP
MBPP-ET
Average
k
n
Token I/O
API calls
Backbone LLM: Seed-Coder-8B
Direct
18.90
17.07
59.19
38.03
33.30
–
–
0 175.27 / 0 289.66
1.00
CoT
82.32
75.00
75.06
50.13
70.63
–
–
1087.79 / 0 182.70
1.00
Self-Planning
82.32
71.34
74.06
51.13
69.71
–
–
2154.48 / 1018.15
2.00
MapCoder
79.88
70.12
73.55
49.12
68.78
5
5
6323.28 / 3022.59
9.84
Table 1: Accuracy and efficiency comparison across multiple benchmark datasets and backbone LLMs. Accuracy is measured by Pass@1, while efficiency is assessed using Token In/Out and the number of API calls. Token In/Out is averaged across all API calls and datasets, with its detailed formulation provided in Appendix B.3 . In the Accuracy section, boldface indicates the best-performing method for each backbone, and underlined values denote the second-best. In the Efficiency section, boldface highlights the results of our method.
Figure 3: Distribution of solved competitive programming problems across different difficulty levels, illustrating the proportion of problems completed at each level.
Figure 4: Accuracy vs. Inference budget on LiveCodeBench benchmark.
Figure 5: Relationship between Plan Update Rate and Code Update Rate across different backbone LLMs and datasets. Marker shapes denote backbone models, colors indicate datasets, and marker sizes are proportional to accuracy on the corresponding dataset. The update rate is a normalized metric that allows comparison across different datasets, defined as the ratio of the number of updates to the total number of iterations; further details are provided in Appendix B.3 .
Model
w/ CDM
w/ RT
HumanEval
HumanEvalET
MBPP
MBPP-ET
Avg
Seed-Coder-8B
×
✓
85.37 ↓ 1.83
75.00 ↓ 3.05
76.07 ↓ 7.30
51.64 ↓ 4.78
72.02 ↓ 4.24
Seed-Coder-8B
✓
×
85.00 ↓ 2.20
75.61 ↓ 2.44
79.34 ↓ 4.03
51.64 ↓ 4.78
72.90 ↓ 3.36
Seed-Coder-8B
✓
✓
87.20
78.05
83.37
56.42
76.26
Qwen2.5-Coder-32B
×
✓
90.24 ↓ 5.49
81.10 ↓ 3.05
83.38 ↓ 6.79
56.93 ↓ 3.02
77.91 ↓ 4.59
Qwen2.5-Coder-32B
✓
×
92.68 ↓ 3.05
82.92 ↓ 1.23
88.41 ↓ 1.76
58.94 ↓ 1.01
80.74 ↓ 1.76
Qwen2.5-Coder-32B
✓
✓
95.73
84.15
90.17
59.95
82.50
Table 3: Ablation study on the impact of CDM and RT. We evaluate different variants of CollabCoder with and without CDM and RT on the HumanEval and MBPP benchmarks using the Pass@1 metric. w/ CDM and w/ RT indicate that the corresponding component is enabled in the pipeline.
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 6: An example of self-improving debugging.
Dataset
Method
Pass@1
Token In
Token Out
API
Backbone LLM: GPT-5.2
MBPP
MapCoder
93.94
2717.31
0 3346.24
0 5.04
CodeSIM
94.74
1998.49
0 2861.05
0 4.60
CollabCoder (Ours)
95.21
2293.08
0 2377.44
0 3.52
LCB
MapCoder
63.39
19691.38
12469.18
14.82
CodeSIM
64.29
18294.05
0 7555.67
13.13
Appendix
Table 4: Performance and Efficiency on Frontier LLMs
Method
Budget Setting
Solved (out of 90)
Best-of-N
N=5
32
N=10
33
N=15
33
N=20
33
N=25
33
Reflexion
t=5
35
Appendix
Table 5: Comparison with limited inference-time baselines on the first 90 problems of LiveCodeBench using GPT-4o-mini.
Figure 7: Accuracy vs. inference budget on xCodeEval benchmark.
Model
Dataset
Plan Update
Code Update
Quantity
Rate (%)
Quantity
Rate (%)
Seed-Coder-8B
HumanEval
12
04.72
78
30.71
MBPP
55
07.90
244
35.06
LiveCodeBench
128
22.98
317
56.91
Qwen2.5-Coder-32B
HumanEval
14
06.76
29
14.01
MBPP
64
11.74
84
15.41
Appendix
Table 6: A detailed report of the quantity and update rate of plan and code updates for different backbone models on HumanEval, MBPP, and LiveCodeBench.
Figure 8: Sensitivity of CollabCoder to Trust Weights.
Figure 9: Prompt for initial planning π(0)←Aplan(P) (Algorithm 1 , Line 2).
Figure 10: Prompt for initial code generation c(0)←Acode(π(0),T) (Algorithm 1 , Line 3).
Large language models (LLMs) have achieved strong performance in code generation, but most methods rely on autoregressive decoding without global planning, often leading to locally coherent yet globally suboptimal solutions (e.g., failing test cases or inefficient complexity). While recent approaches such as Chain-of-Thought (CoT) and multi-agent systems (MAS) introduce planning, their limited role specialization and coordination hinder performance on complex tasks. To address the challenges of coordination and specialization in multi-agent code generation, we propose Collaborative Reinforcement Code (CoRe-Code), a framework for role specialized LLM agents that enhances inter-agent coordination to generate more accurate and efficient code. CoRe-Code adopts a simple Planner-Coder paradigm, where the Planner produces high-level plans and the Coder executes them to generate code. We further introduce a collaboration-aware reinforcement learning stage based on Group Relative Policy Optimization (GRPO) to enhance role specialization and alignment. Experiments show that CoRe-Code outperforms a wide range of existing RL-based and multi-agent methods. In addition, we demonstrate that CoRe-Code can generalize to other multi-agent frameworks (e.g., Retrieval and Debugging agents), highlighting its flexibility and scalability. We evaluate CoRe-Code on multiple benchmarks of varying difficulty using three base models. Compared to existing baselines, the results show consistent improvements in accuracy, while also achieving higher efficiency in terms of execution time and memory usage, demonstrating the effectiveness and practicality of CoRe-Code.
Zhihao Dou, Qinjian Zhao, Zhongwei Wan +2
Department of Computer Science Kean University · Department of Computer Science Case Western Reserve University
Multi-agent coding systems are designed to tackle complex software engineering tasks through collaboration. However, existing evaluations typically assume configured organizations are followed faithfully, whereas reality differs. This behavioral gap, combined with differences in underlying system components, prevents clear attribution of observed gains. To this end, we introduce OpenCollab, a multi-agent coding framework that provides a unified infrastructure for programmable collaboration and controllable runtime. Specifically, OpenCollab unifies organization design, enforces experimental control on a shared runtime, and tracks execution through fine-grained event streams. On this basis, we define Adherence to quantify whether the declared organization is actually realized. Our experiments reveal that agents collaborate very differently across configurations: changing any single dimension shifts Adherence, from 47.2% to as high as 97.2%. Furthermore, extensive agentic coding benchmarks show that OpenCollab (Duo) establishes new SOTA performance compared to the mainstream harnesses such as Mini-SWE-agent, OpenHands, Codex CLI, and Claude Code, showing that a well-designed organization can outperform strong existing harnesses, while OpenCollab's single-agent configuration uses the fewest tokens across all evaluated suites. OpenCollab establishes a unified multi-agent infrastructure for easy programmable collaboration and controlled causal evaluation.
Chun-Wah Hsu, Kai Gong, Yu Wu +12
Shanghai Jiao Tong University · University of Cambridge · Nanyang Technological University +4
Test-time scaling has emerged as a promising approach for improving code generation by exploring large solution spaces at inference time. However, existing methods often rely on public test cases that are unavailable in practice, or require extensive LLM inference for candidate selection, leading to significant token consumption and time overhead. We present DiffCodeGen, a novel test-time scaling method for code generation based on coverage-guided differential analysis. DiffCodeGen generates diverse code candidates using various sampling and prompting strategies, then applies coverage-guided fuzzing to synthesize inputs without requiring any existing tests or large language models. By executing all candidates on these inputs, DiffCodeGen captures their dynamic behavior and clusters candidates based on behavioral similarity. DiffCodeGen selects the medoid of the largest cluster as the final output. Unlike prior test-time scaling methods that invoke additional LLM inference for candidate selection, DiffCodeGen performs selection without any extra model calls, incurring little to no additional token consumption. DiffCodeGen is fully asynchronous, naturally suited to the current trend of agentic coding, and is thus efficient and highly scalable. We evaluate DiffCodeGen across 4 large language models, demonstrating consistent improvements over baselines. Compared to state-of-the-art test-time scaling methods, DiffCodeGen achieves competitive or superior performance while using only a fraction of time and tokens. DiffCodeGen is model-agnostic and can be combined with reasoning models to further boost performance.
Yifeng He, Ethan Wang, Jicheng Wang +2
University of California, Davis · Wuhan University · University of Hong Kong