English

Reusing Past Repairs Through Hierarchical Trajectory Abstraction for Coding Agents

Software Engineering 2026-07-31 v1

Abstract

Although LLM-driven repair agents can tackle complex, repository-level issues, they treat every issue independently and discard the procedural knowledge accumulated from previous repairs. We introduce STAIR, a framework that converts historical repair trajectories into hierarchical, reusable plans that can be adapted to steer future repairs. Each past trajectory is transformed into a multi-level tree that ranges from fine-grained diagnostic actions to high-level repair strategies, encoding experience at several granularities. When a new issue arrives, STAIR selects relevant plan nodes from multiple abstraction levels, tailors them into executable, issue-specific plans, and supplies them to the agent through its prompt. On SWE-bench Verified, STAIR integrated with Lingxi reaches 81.2% Pass@1 using MiniMax M2.5 and 79.2% using GPT-5. The generated plans also generalize across agents: without any code change, they lift the Pass@1 of a structurally different agent, mini-SWE-agent v2, from 75.8% to 81.0%. Ablation experiments further show that mixing multiple abstraction levels surpasses any single level and that raw, unabstracted trajectories transfer substantially worse.

Cite

@article{arxiv.2607.29658,
  title  = {Reusing Past Repairs Through Hierarchical Trajectory Abstraction for Coding Agents},
  author = {Yisen Xu and Jiayuan Zhou and Ruiqi Pan and Tse-Hsun Chen},
  journal= {arXiv preprint arXiv:2607.29658},
  year   = {2026}
}

Comments

10 pages