Mitigating Collaboration Degeneration in Multi-Agent Code Generation via a Controllable Competitive Collaboration Approach

Mitigating Collaboration Degeneration in Multi-Agent Code Generation via a Controllable Competitive Collaboration Approach

Shanzhi Gu, Mingyang Geng, Yihong Dong, Yunxin Mao, Zhaoyang Qu, Hao Zou, Ruochun Jin, Zhipeng Liu, Chuanfu Xu, Haotian Wang

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence
Main Track. Pages 127-135. https://doi.org/10.24963/ijcai.2026/15

Empowered by large language models (LLMs), multi-agent systems (MAS) have shown significant potential in code generation by simulating collaborative workflows. However, we identify a collaboration degeneration phenomenon, where one agent dominates while others remain disengaged, occurring in 38.4% of non-routine HumanEval tasks. Surprisingly, introducing competition among LLM agents eliminates this degeneration and sparks innovation in generated code. Inspired by this catfish effect, we posit that competition helps prevent collaboration degeneration. We thus propose C3, a Controllable Competitive Collaboration framework featuring two novel mechanisms: Centralized Auction-Based Competition (CAB) for role allocation via bidding and Decentralized Communication-Aware Competition (DCC) for solution refinement through opponent-aware adaptation. Evaluated on 70 complex projects from extended SoftwareDev, C3 reduces collaboration degeneration from 32.4% to 12.8%, while enhancing code innovation and diversity. Human evaluations further confirm C3’s superiority in functionality, maintainability, and robustness over purely collaborative or competitive baselines.
Keywords:
Agent-based and Multi-agent Systems: Coordination and cooperation
Agent-based and Multi-agent Systems: Multi-agent learning