mlsanityData to 7 Oct 2026

ContextSniper: AntTrail's Token-Efficient Code Memory for Repository-Level Program Repair

arXiv 2607.01916 ↗First posted 2 Jul 2026cs.AIcited by 1

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Large language model agents can repair real repository issues, but they often spend large context budgets on whole-file reads, broad searches, and long terminal outputs where useful evidence is mixed with irrelevant code and logs. This paper presents ContextSniper, AntTrail's code-repair module for precision evidence selection in repository-level program repair, as part of AntTrail's broader agent-memory engine. AntTrail is available at https://gitcode.com/datagallery/AntTrail. ContextSniper indexes code and action memory at three levels of abstraction, retrieves candidates with a hybrid ranker, filters long tool output through an intention-aware context gate, and returns compact evidence packets while keeping full source recoverable on demand. In matched 50-task-per-condition comparisons, ContextSniper reduces total token use by 51.5% and logged cost by 36.4% for OpenClaw on SWE-bench Lite, and reduces total token use by 40.0% and average interaction rounds by 28.1% for OpenCode on SWE-bench Pro. Submitted-resolution rates differ by one task out of 50 in each host-agent setting. In a separate five-task comparison, ContextSniper outperforms existing memory- and retrieval-augmented generation (RAG)-style integrations in token efficiency. These results suggest that ContextSniper can substantially reduce token and interaction overhead for repository-level repair agents without a measurable loss in repair quality. The evaluation harness is available at https://gitcode.com/lukchiwang/ContextSniper.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 20 of its 39 references that are in the map. First posted on arXiv 2 Jul 2026.

Builds on

20 of 39 references.

Closest ancestors · 5

Same direction, newest first

  1. 2026Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP28 Mar
  2. 2026Learning to Commit: Generating Organic Pull Requests via Online Repository Memory27 Mar
  3. 2026Structurally Aligned Subtask-Level Memory for Software Engineering Agents25 Feb
  4. 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
  5. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May

Other references · 15

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  2. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  3. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  4. 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
  5. 2024AutoCodeRover: Autonomous Program Improvementcited by 272
  6. 2023RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentationcited by 253
  7. 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 185
  8. 2025ACON: Optimizing Context Compression for Long-horizon LLM Agentscited by 126
  9. 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 88
  10. 2024CompAct: Compressing Retrieved Documents Actively for Question Answeringcited by 64
  11. 2025SWE-Exp: Experience-Driven Software Issue Resolutioncited by 64
  12. 2025EXPEREPAIR: Dual-Memory Enhanced LLM-based Repository-Level Program Repaircited by 34
3 more
  1. 2025Enhancing repository-level software repair via repository-aware knowledge graphscited by 26
  2. 2025Improving Code Localization with Repository Memorycited by 19
  3. 2026MemGovern: Enhancing Code Agents through Learning from Governed Human Experiencescited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026AgenticRepair: Multi-Faceted Program Context Engineering for Agentic Vulnerability Repair
  2. 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinement
  3. 2026MemRepair: Hierarchical Memory for Agentic Repository-Level Vulnerability Repair
  4. 2026EviACT: An Evidence-to-Action Framework for Agentic Program Repair
  5. 2025HAFixAgent: History-Aware Program Repair Agent
  6. 2026ARISE: A Repository-level Graph Representation and Toolset for Agentic Program Repair and Fault Localization
  7. 2026MemTrace: State-Consistent Memory for Long-Horizon Coding Agents
  8. 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation