CodeCoR: An LLM-Based Self-Reflective Multi-Agent Framework for Code Generation
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Code generation aims to produce code that fulfills requirements written in natural language automatically. Large Language Models (LLMs) like ChatGPT have demonstrated promising effectiveness in this area. Nonetheless, the LLMs often fail to ensure the syntactic and semantic correctness of the generated code. Recently, researchers proposed multi-agent frameworks that guide LLMs with different prompts to analyze programming tasks, generate code, and perform testing in a sequential workflow. However, the performance of the workflow is not robust as code generation depends on the performance of each agent. To address this challenge, we propose CodeCoR, a multi-agent framework that prunes intermediate outputs at different stages to reduce error propagation in sequential code generation workflows. Specifically, for a given task description, four agents in CodeCoR generate prompts, code, test cases, and repair advice, respectively. Each agent generates more than one output and prunes away the low-quality ones. The generated code is tested in the local environment: the code that fails to pass the generated test cases is sent to the repair agent, and the coding agent re-generates the code based on repair advice. Finally, the code that passes the highest number of generated test cases is returned to the users. Our experiments on four widely used datasets, HumanEval, HumanEval-ET, MBPP, and MBPP-ET, demonstrate that CodeCoR outperforms existing baselines (e.g., CodeCoT and MapCoder), achieving an average Pass@1 score of 77.13%.
Key facts. Cited by 33 papers 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 29 of its 49 references that are in the map. First posted on arXiv 14 Jan 2025.
Builds on
29 of 49 references.
Closest ancestors · 4
Same direction, newest first
- 2024CodeTree: Agent-guided Tree Search for Code Generation with Large Language Models7 Nov
- 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 · 25
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2023Reasoning with Language Model is Planning with World Modelcited by 846
13 more
- 2023StarCoder: may the source be with you!cited by 790
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 618
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2022Generating Sequences by Learning to Self-Correctcited by 271
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2023Structured Chain-of-Thought Prompting for Code Generationcited by 136
- 2023Self-planning Code Generation with Large Language Modelscited by 121
- 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2023CodeChain: Towards Modular Code Generation Through Chain of Self-revisions with Representative Sub-modulescited by 58
Built on by
Citing papers per year: 2025: 17; 2026: 16.
33 papers.
Sort:
By area:
- 2026Code as Agent Harnesscited by 40
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AIcited by 39
- 2025The FM Agentcited by 20
- 2025AutoP2C: An LLM-Based Agent Framework for Code Repository Generation from Multimodal Content in Academic Paperscited by 18
- 2025Position: Foundation Models for Tabular Data within Systemic Contexts Need Groundingcited by 5
- 2025NL-Debugging: Exploiting Natural Language as an Intermediate Representation for Code Debuggingcited by 4
- 2026EvoMAS: Evolutionary Generation of Multi-Agent Systemscited by 4
- 2025MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLMcited by 3
- 2025Designing LLM-based Multi-Agent Systems for Software Engineering Tasks: Quality Attributes, Design Patterns and Rationalecited by 3
- 2025MoT: Modularization-of-Thought Prompting for Effective Code Generationcited by 2
- 2026Rollout-Training Co-Design for Efficient LLM-Based Multi-Agent Reinforcement Learningcited by 2
- 2026LLM-Based Multi-Agent Systems for Code Generation: A Multi-Vocal Literature Reviewcited by 2
21 more
- 2026Cross-Model LLM Code Review: Should you use Claude to review Codex or vice versa?cited by 2
- 2025Test Amplification for REST APIs via Single and Multi-Agent LLM Systemscited by 1
- 2025MemoCoder: Automated Function Synthesis using LLM-Supported Agentscited by 1
- 2025Beyond Language Barriers: Multi-Agent Coordination for Multi-Language Code Generationcited by 1
- 2025From LLMs to Agents: A Comparative Evaluation of LLMs and LLM-based Agents in Security Patch Detectioncited by 1
- 2026Persistent Cross-Attempt State Optimization for Repository-Level Code Generationcited by 1
- 2026ARIADNE: Agentic Reward-Informed Adaptive Decision Exploration via Blackboard-Driven MCTS for Competitive Program Generationcited by 1
- 2026FASE: Fast Adaptive Semantic Entropy for Code Qualitycited by 1
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuningcited by 1
- 2025LOCA: Logical Chain Augmentation for Scientific Corpus Cleaningcited by 0
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generationcited by 0
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programmingcited by 0
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMscited by 0
- 2025Agentic LLMs for REST API Test Amplification: A Comparative Study Across Cloud Applicationscited by 0
- 2026AI-for-Science Low-code Platform with Bayesian Adversarial Multi-Agent Frameworkcited by 0
- 2026AutoB2G: Agentic Simulation and Reinforcement Learning for Spatio-Temporal Grid-Interactive Building Controlcited by 0
- 2026You Don't Need Public Tests to Generate Correct Codecited by 0
- 2026Self-Refining Topology Optimization via an LLM-Based Multi-Agent Frameworkcited by 0
- 2026ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Modelscited by 0
- 2026Adversarial Review: Structured Disagreement for Grounded Agentic Code Reviewcited by 0
- 2026AgentRoom: Concurrent Multi-Agent Coding in a CRDT-Backed Shared Workspacecited by 0
- 2026AgentRoom: Concurrent Multi-Agent Coding in a CRDT-Backed Shared Workspace24 Aug 2026
- 2026Adversarial Review: Structured Disagreement for Grounded Agentic Code Review16 Aug 2026
- 2026ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Models15 Aug 2026
- 2026Cross-Model LLM Code Review: Should you use Claude to review Codex or vice versa?22 Jul 2026
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning18 Jun 2026
- 2026FASE: Fast Adaptive Semantic Entropy for Code Quality8 Jun 2026
- 2026Self-Refining Topology Optimization via an LLM-Based Multi-Agent Framework22 May 2026
- 2026Code as Agent Harness18 May 2026
- 2026ARIADNE: Agentic Reward-Informed Adaptive Decision Exploration via Blackboard-Driven MCTS for Competitive Program Generation4 May 2026
- 2026You Don't Need Public Tests to Generate Correct Code23 Apr 2026
- 2026Persistent Cross-Attempt State Optimization for Repository-Level Code Generation4 Apr 2026
- 2026AutoB2G: Agentic Simulation and Reinforcement Learning for Spatio-Temporal Grid-Interactive Building Control27 Mar 2026
21 more
- 2026AI-for-Science Low-code Platform with Bayesian Adversarial Multi-Agent Framework3 Mar 2026
- 2026LLM-Based Multi-Agent Systems for Code Generation: A Multi-Vocal Literature Review25 Feb 2026
- 2026Rollout-Training Co-Design for Efficient LLM-Based Multi-Agent Reinforcement Learning10 Feb 2026
- 2026EvoMAS: Evolutionary Generation of Multi-Agent Systems6 Feb 2026
- 2025Designing LLM-based Multi-Agent Systems for Software Engineering Tasks: Quality Attributes, Design Patterns and Rationale11 Nov 2025
- 2025From LLMs to Agents: A Comparative Evaluation of LLMs and LLM-based Agents in Security Patch Detection11 Nov 2025
- 2025Agentic LLMs for REST API Test Amplification: A Comparative Study Across Cloud Applications31 Oct 2025
- 2025The FM Agent30 Oct 2025
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMs28 Oct 2025
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programming26 Oct 2025
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generation22 Oct 2025
- 2025LOCA: Logical Chain Augmentation for Scientific Corpus Cleaning24 Sep 2025
- 2025Beyond Language Barriers: Multi-Agent Coordination for Multi-Language Code Generation24 Sep 2025
- 2025MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLM22 Sep 2025
- 2025MemoCoder: Automated Function Synthesis using LLM-Supported Agents24 Jul 2025
- 2025Position: Foundation Models for Tabular Data within Systemic Contexts Need Grounding26 May 2025
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AI26 May 2025
- 2025NL-Debugging: Exploiting Natural Language as an Intermediate Representation for Code Debugging21 May 2025
- 2025AutoP2C: An LLM-Based Agent Framework for Code Repository Generation from Multimodal Content in Academic Papers28 Apr 2025
- 2025Test Amplification for REST APIs via Single and Multi-Agent LLM Systems10 Apr 2025
- 2025MoT: Modularization-of-Thought Prompting for Effective Code Generation16 Mar 2025
- 2026Code as Agent Harnesscited by 40
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AIcited by 39
- 2025The FM Agentcited by 20
- 2025AutoP2C: An LLM-Based Agent Framework for Code Repository Generation from Multimodal Content in Academic Paperscited by 18
- 2026EvoMAS: Evolutionary Generation of Multi-Agent Systemscited by 4
- 2025MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLMcited by 3
- 2025Designing LLM-based Multi-Agent Systems for Software Engineering Tasks: Quality Attributes, Design Patterns and Rationalecited by 3
- 2026Rollout-Training Co-Design for Efficient LLM-Based Multi-Agent Reinforcement Learningcited by 2
- 2026LLM-Based Multi-Agent Systems for Code Generation: A Multi-Vocal Literature Reviewcited by 2
- 2025Test Amplification for REST APIs via Single and Multi-Agent LLM Systemscited by 1
- 2025MemoCoder: Automated Function Synthesis using LLM-Supported Agentscited by 1
- 2025Beyond Language Barriers: Multi-Agent Coordination for Multi-Language Code Generationcited by 1
12 most cited of 24 All 24 (JSON)
- 2026AgentRoom: Concurrent Multi-Agent Coding in a CRDT-Backed Shared Workspace24 Aug 2026
- 2026Adversarial Review: Structured Disagreement for Grounded Agentic Code Review16 Aug 2026
- 2026ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Models15 Aug 2026
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning18 Jun 2026
- 2026Self-Refining Topology Optimization via an LLM-Based Multi-Agent Framework22 May 2026
- 2026Code as Agent Harness18 May 2026
- 2026ARIADNE: Agentic Reward-Informed Adaptive Decision Exploration via Blackboard-Driven MCTS for Competitive Program Generation4 May 2026
- 2026AutoB2G: Agentic Simulation and Reinforcement Learning for Spatio-Temporal Grid-Interactive Building Control27 Mar 2026
- 2026AI-for-Science Low-code Platform with Bayesian Adversarial Multi-Agent Framework3 Mar 2026
- 2026LLM-Based Multi-Agent Systems for Code Generation: A Multi-Vocal Literature Review25 Feb 2026
- 2026Rollout-Training Co-Design for Efficient LLM-Based Multi-Agent Reinforcement Learning10 Feb 2026
- 2026EvoMAS: Evolutionary Generation of Multi-Agent Systems6 Feb 2026
12 newest of 24 All 24 (JSON)
- 2025Position: Foundation Models for Tabular Data within Systemic Contexts Need Groundingcited by 5
- 2025NL-Debugging: Exploiting Natural Language as an Intermediate Representation for Code Debuggingcited by 4
- 2026Cross-Model LLM Code Review: Should you use Claude to review Codex or vice versa?cited by 2
- 2026Persistent Cross-Attempt State Optimization for Repository-Level Code Generationcited by 1
- 2026FASE: Fast Adaptive Semantic Entropy for Code Qualitycited by 1
- 2025LOCA: Logical Chain Augmentation for Scientific Corpus Cleaningcited by 0
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMscited by 0
- 2026You Don't Need Public Tests to Generate Correct Codecited by 0
- 2026Cross-Model LLM Code Review: Should you use Claude to review Codex or vice versa?22 Jul 2026
- 2026FASE: Fast Adaptive Semantic Entropy for Code Quality8 Jun 2026
- 2026You Don't Need Public Tests to Generate Correct Code23 Apr 2026
- 2026Persistent Cross-Attempt State Optimization for Repository-Level Code Generation4 Apr 2026
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMs28 Oct 2025
- 2025LOCA: Logical Chain Augmentation for Scientific Corpus Cleaning24 Sep 2025
- 2025Position: Foundation Models for Tabular Data within Systemic Contexts Need Grounding26 May 2025
- 2025NL-Debugging: Exploiting Natural Language as an Intermediate Representation for Code Debugging21 May 2025
Similar, not cited
Close in wording, no citation either way
- 2023AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisation
- 2025A Survey on Code Generation with LLM-based Agents
- 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation
- 2025Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Tasks
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latency
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving
- 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generation
- 2024Self-Organized Agents: A LLM Multi-Agent Framework toward Ultra Large-Scale Code Generation and Optimization