Research map / Multi-agent systems and games / LLM agents
Improving Code Localization with Repository Memory
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Augments the LocAgent code-localization agent with two commit-history-derived memories (episodic commit search and LLM-generated semantic summaries of frequently edited files), improving file-level localization on SWE-bench-verified and SWE-bench-live.
Problem
Code localization agents treat each repository issue from scratch, ignoring accumulated repository knowledge that human developers build over time; the paper asks how to give agents long-term repository memory for localizing bugs to files.
Approach
Build a non-parametric repository memory from commit history: a BM25-searchable store of past commits and linked issues (episodic), plus LLM-written functionality summaries of the most frequently edited files (semantic), exposed to the LocAgent ReAct loop as extra tools.
Key results
- RepoMem achieves Acc@5 of 76.5% on SWE-bench-verified versus 71.6% for LocAgent (+4.9 points).
- On SWE-bench-live (130-example subset), RepoMem reaches Acc@1 60.8% vs 59.2% for LocAgent, and Acc@5 66.2% vs 63.1%.
- End-to-end resolve rate with the Agentless patch pipeline rises from 37.0% (LocAgent) to 40.4% (RepoMem) on SWE-bench-verified.
Surprising findings
- Sparse BM25 retrieval over commit messages outperforms a strong dense retriever (GritLM-7B) on the django repository.
- Repositories with sparse commit history (the 'others' group) degrade in performance (Acc@5 54.3 vs 67.4 for LocAgent).
Limitations
- Gains depend on rich commit history; repositories with limited or irrelevant history can be hurt by distracting memory.
- Episodic memory relies on explicit issue-commit links, which can be noisy or missing.
- Average API cost per example rises over LocAgent, with high per-instance variance.
Experimental setup
Datasets: SWE-bench-verified SWE-bench-live repository commit history (7,000 commits prior to each issue)
Benchmarks: SWE-bench-verified SWE-bench-live
Metrics: Accuracy@1 Accuracy@3 Accuracy@5 resolve rate API cost
Baselines: CodeRankEmbed Agentless LocAgent
Builds on: LocAgent ReAct Agentless
Closest papers by meaning
- RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing (ICML 2025 · similarity 0.87)
- Nemotron-CORTEXA: Enhancing LLM Agents for Software Engineering Tasks via Improved Localization and Solution Diversity (ICML 2025 · similarity 0.86)
- RepoMirage: Probing Repository Context Reasoning in Code Agents with Perturbations (NeurIPS 2026 · similarity 0.86)
- Build-and-Find: An Effort-Aware Protocol for Evaluating Agent-Managed Codebases (NeurIPS 2026 · similarity 0.86)
- NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents (ICML 2026 · similarity 0.86)
- SWE-fficiency: Can Language Models Optimize Real-World Repositories on Real Workloads? (ICML 2026 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
