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).