CAM: A Causality-based Analysis Framework for Multi-Agent Code Generation Systems
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Despite the remarkable success that Multi-Agent Code Generation Systems (MACGS) have achieved, the inherent complexity of multi-agent architectures produces substantial volumes of intermediate outputs. To date, the individual importance of these intermediate outputs to the system correctness remains opaque, which impedes targeted optimization of MACGS designs. To address this challenge, we propose CAM, the first Causality-based Analysis framework for MACGS that systematically quantifies the contribution of different intermediate features for system correctness. By comprehensively categorizing intermediate outputs and systematically simulating realistic errors on intermediate features, we identify the important features for system correctness and aggregate their importance rankings. We conduct extensive empirical analysis on the identified importance rankings. Our analysis reveals intriguing findings: first, we uncover context-dependent featurestextemdash features whose importance emerges mainly through interactions with other features, revealing that quality assurance for MACGS should incorporate cross-feature consistency checks; second, we reveal that hybrid backend MACGS with different backend LLMs assigned according to their relative strength achieves up to 7.3% Pass@1 improvement, underscoring hybrid architectures as a promising direction for future MACGS design. We further demonstrate CAM's practical utility through two applications: (1) failure repair which achieves a 73.6% success rate by optimizing top-3 importance-ranked features and (2) feature pruning that reduces up to 33.6% intermediate token consumption while maintaining generation performance. Our work provides actionable insights for MACGS design and deployment, establishing causality analysis as a powerful approach for understanding and improving MACGS.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 52 of its 89 references that are in the map. First posted on arXiv 2 Feb 2026.
Builds on
52 of 89 references.
Closest ancestors · 11
Same direction, newest first
- 2026Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering20 Jan
- 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectories23 Jun
- 2025Why Do Multi-Agent LLM Systems Fail?17 Mar
- 2025CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debugging8 Feb
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving18 May
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024LLM-Based Multi-Agent Systems for Software Engineering: Literature Review, Vision and the Road Ahead7 Apr
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges14 Jan
- 2023ChatDev: Communicative Agents for Software Development16 Jul
- 2023Self-collaboration Code Generation via ChatGPT15 Apr
Other references · 41
- 2023GPT-4 Technical Reportcited by 18,132
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
29 more
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023LLM-Pruner: On the Structural Pruning of Large Language Modelscited by 643
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023Causal Reasoning and Large Language Models: Opening a New Frontier for Causalitycited by 348
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 325
- 2018Insights on representational similarity in neural networks with canonical correlationcited by 318
- 2024AutoCodeRover: Autonomous Program Improvementcited by 272
- 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 243
- 2023AutoAgents: A Framework for Automatic Agent Generationcited by 211
- 2025Thoughts Are All Over the Place: On the Underthinking of o1-Like LLMscited by 162
- 2020Augmented SBERT: Data Augmentation Method for Improving Bi-Encoders for Pairwise Sentence Scoring Taskscited by 136
- 2023CLadder: Assessing Causal Reasoning in Language Modelscited by 102
- 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 94
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 65
- 2024LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluationcited by 46
- 2024MegaAgent: A Large-Scale Autonomous LLM-based Multi-Agent System Without Predefined SOPscited by 45
- 2022SPT-Code: Sequence-to-Sequence Pre-Training for Learning Source Code Representationscited by 35
- 2025Efficient Agents: Building Effective Agents While Reducing Costcited by 32
- 2024HumanEvo: An Evolution-aware Benchmark for More Realistic Evaluation of Repository-level Code Generationcited by 26
- 2018Causal Testing: Finding Defects' Root Causescited by 22
- 2024A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinementcited by 21
- 2022Causality in Configurable Software Systemscited by 13
- 2021From Verification to Causality-based Explicationscited by 12
- 2020Causality-Guided Adaptive Interventional Debuggingcited by 9
- 2024LLMorpheus: Mutation Testing using Large Language Modelscited by 8
- 2025How Far Are We from Optimal Reasoning Efficiency?cited by 8
- 2025Quantifying the Impact of Structured Output Format on Large Language Models through Causal Inferencecited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025Understanding and Bridging the Planner-Coder Gap: A Systematic Study on the Robustness of Multi-Agent Systems for Code Generation
- 2025CodeCoR: An LLM-Based Self-Reflective Multi-Agent Framework for Code Generation
- 2024Self-Organized Agents: A LLM Multi-Agent Framework toward Ultra Large-Scale Code Generation and Optimization
- 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation
- 2026How Generation Architecture Shapes Code Complexity in Multi-Agent LLM Systems: A Paired Study on HumanEval
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latency
- 2026MACGen: Toward Functionally Correct and Secure Code Generation via Multi-Agent Collaboration
- 2025Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Tasks