cs.SEOct 26, 2026

RepoTrace: Improving Requirement Tracing in Multi-Round Agent Interactions

Authors: Huanyu Liu, Yezheng Cheng, Jinliang You, Tianxiao Huang, Linyu Li, Zheng Fang, Peng Cao, Ge Li

Organizations: Key Laboratory of High Confidence Software Technologies, Ministry of Education; School of Computer Science, Peking University · Xidian University · School of Cyber Science and Engineering, Wuhan University

Abstract

Code agents have become increasingly capable of performing software engineering tasks through interaction with software environments. However, agents tend to degrade as the number of interaction rounds increases, making it difficult to maintain existing software during iterative modification. We analyze 2,656 agent trajectories in EvoCode-Bench and identify requirement focus misalignment as a recurring failure pattern, where agents struggle to distinguish the primary modification targets of a requirement from unrelated code. We propose Repotrace a requirement-driven repository understanding harness that combines repository structure with requirement semantics to construct a requirement-code correspondence and injects it into the agent context. This correspondence enables code agents to follow the repository architecture, trace requirements across multi-round interactions, and identify the core code elements corresponding to the current requirement. Experiments show that Repotrace improves the mean per-round reward (MPR) across different models (e.g., +19.99 on GLM-5.2) and agent harnesses (e.g., +10.22 on Claude Code). Across rounds, Repotrace increases the average per-round reward from 0.163 to 0.371 on Terminus-2 with DeepSeek-V4-Pro, while reducing average regression errors by 56.78%. We release the source code and agents' trajectories to support future research.

Figures & tables

Appendix figures & tables7 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. RepoMirage: Probing Repository Context Reasoning in Code Agents with Perturbations

    May 25, 2026Hanyu Li, Yichi Zhang, Speed Zhu +3AI Coding AgentsSoftware Engineering Benchmarks

  2. CodeTracer: Towards Traceable Agent States

    Apr 13, 2026Han Li, Yifan Yao, Letian Zhu +13AI Coding AgentsAgent Trajectory Analysis

  3. A Unified Issue Resolution Benchmark for Requirement Clarification, Planning, and Code Generation for Coding Agents

    Aug 10, 2026Xin Zhou, Chun Yong Chong, Kisub Kim +11Requirements EngineeringAI Coding Agents