TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Code
Jiangping Huang, Wenguang Ye, Weisong Sun, Jian Zhang, Mingyue Zhang, Yang Liu

TL;DR
TraceCoder is a multi-agent framework that enhances automated debugging of LLM-generated code by using runtime traces, causal analysis, and learning from past failures to improve repair accuracy and efficiency.
Contribution
It introduces a novel observe-analyze-repair framework with trace instrumentation, causal analysis, and historical learning to improve automated code repair for LLM outputs.
Findings
Achieves up to 34.43% improvement in Pass@1 accuracy.
Iterative repair process yields 65.61% relative gain.
Outperforms existing methods in accuracy and cost-efficiency.
Abstract
Large Language Models (LLMs) often generate code with subtle but critical bugs, especially for complex tasks. Existing automated repair methods typically rely on superficial pass/fail signals, offering limited visibility into program behavior and hindering precise error localization. In addition, without a way to learn from prior failures, repair processes often fall into repetitive and inefficient cycles. To overcome these challenges, we present TraceCoder, a collaborative multi-agent framework that emulates the observe-analyze-repair process of human experts. The framework first instruments the code with diagnostic probes to capture fine-grained runtime traces, enabling deep insight into its internal execution. It then conducts causal analysis on these traces to accurately identify the root cause of the failure. This process is further enhanced by a novel Historical Lesson Learning…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Machine Learning in Materials Science
