TrajAudit:智能体编码系统的自动化故障诊断
TrajAudit: Automated Failure Diagnosis for Agentic Coding Systems
AI总结:
针对仓库级编码轨迹中噪声多、上下文长的问题,提出TrajAudit框架,通过模式匹配过滤和测试报告先验知识辅助,实现高效故障诊断,在RootSE基准上定位准确率提升24.4个百分点,令牌消耗降低18%。
摘要:
智能体系统已被广泛研究以自动化软件工程任务,如错误修复。随着这些系统日益处理复杂任务,理解它们失败的位置和原因对于迭代改进和操作可靠性至关重要。现有的自动化故障诊断方法利用任务执行轨迹,但其有效性随着轨迹长度和复杂性的增加而显著下降。特别是对于仓库级编码任务,轨迹中充满了噪声,例如冗余的程序结构和冗长的代码上下文。此外,这些轨迹非常长,而长上下文推理仍然是LLM的已知弱点。为了解决这两个挑战,我们提出了TrajAudit,这是首个针对仓库级编码轨迹的故障诊断框架。TrajAudit采用了一个调查智能体,由两个模块支持:一个通过模式匹配和关键词检测过滤与失败无关的信息,另一个从测试失败报告中生成初步诊断作为先验知识,帮助智能体处理嘈杂的长上下文。调查智能体还可以按需调用工具检索过滤后的内容,确保关键信息得以保留,同时最小化噪声。我们还引入了RootSE,一个包含93个来自软件维护任务的真实智能体故障实例的基准,代表了迄今为止最复杂的轨迹诊断基准。在RootSE上的实验表明,TrajAudit在定位准确率上超过所有现有基线24.4个百分点以上,同时令牌消耗至少减少18%,证明了其实用有效性。我们希望这项工作能够引起社区对智能体软件工程中失败管理的关注,并为未来研究提供基础资源。
英文摘要:
Agentic systems have been widely studied to automate coding tasks such as bug fixing and feature implementation. As these systems increasingly operate on complex codebases, understanding where and why they fail becomes essential for iterative refinement and operational reliability. Existing automated failure diagnosis approaches leverage \textit{task execution trajectories}, yet they struggle with trajectories produced by repository-level coding agents due to two key properties. First, these trajectories are often long, spanning many execution steps, making it difficult for LLMs to track the causal chain of failure over the execution history. Second, these trajectories are laden with noise, containing substantial low-signal observations such as redundant program structures and verbose code context, which can interfere with LLM reasoning. To address these challenges, we propose \textit{TrajAudit}, an automated failure diagnosis framework specifically for trajectories produced by repository-level coding agents. TrajAudit employs an investigator agent supported by two modules: one reduces failure-irrelevant noisy context through semantic saliency folding, and the other derives preliminary diagnostic guidance from test failure reports as prior knowledge to help LLMs focus on likely failure regions. The investigator agent can further invoke tools to inspect folded content on demand, enabling a focused investigation without losing access to the full trajectory context. We also introduce \textit{RootSE}, a benchmark of 102 real-world instances from repository-level coding tasks, each annotated with the earliest decisive error step and a justification. Experiments on RootSE show that TrajAudit outperforms the strongest baselines by 10.8\% and 21.6\% in exact failure localization accuracy in the with- and without-reference settings, respectively, demonstrating its effectiveness.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。