{"ID":5675251,"CreatedAt":"2026-07-03T01:40:09.565152011Z","UpdatedAt":"2026-07-07T01:06:03.009715918Z","DeletedAt":null,"paper_url":"https://arxiv.org/abs/2607.01916","arxiv_id":"2607.01916","title":"ContextSniper: AntTrail's Token-Efficient Code Memory for Repository-Level Program Repair","abstract":"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 token-efficient code memory layer for repository-level program repair. As the coding specialization of AntTrail's broader agent memory engine, ContextSniper implements the Sniper feature for precision evidence selection: it retrieves candidate code and runtime evidence, ranks it with hybrid retrieval signals, filters long outputs through an intention-aware context gate, and returns compact evidence packets while preserving recoverable source context outside the prompt. We evaluate ContextSniper on SWE-bench Lite with OpenClaw and Claude Code, using 50 task runs per host-agent condition. ContextSniper reduces total token use by 51.5% and logged cost by 36.4% for OpenClaw, and reduces total token use by 38.9% and estimated cost by 27.3% for Claude Code. Submitted-resolution rates decrease slightly, from 26.0% to 24.0% for OpenClaw and from 32.0% to 30.0% for Claude Code. ContextSniper's pilot testing scripts are open-sourced at https://github.com/Calluking/ContextSniper","short_abstract":"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 token-efficient code memory layer for repos...","url_abs":"https://arxiv.org/abs/2607.01916","url_pdf":"https://arxiv.org/pdf/2607.01916v1","authors":"[\"Chiwang Luk\",\"Matin Mohammad Najafi\",\"Zhifeng Jia\",\"Wei Yang\",\"Xiuchang Li\",\"Jinwei Zhu\",\"Yang Ren\",\"Lei Chen\",\"Gao Cong\"]","published":"2026-07-02T09:15:28Z","proceeding":"cs.AI","tasks":"[\"cs.AI\"]","methods":"[\"Language Model\"]","has_code":false,"code_links":[{"ID":613890,"CreatedAt":"2026-07-03T01:40:09.565152011Z","UpdatedAt":"2026-07-03T01:40:09.565152011Z","DeletedAt":null,"paper_id":5675251,"paper_url":"https://arxiv.org/abs/2607.01916","paper_title":"ContextSniper: AntTrail's Token-Efficient Code Memory for Repository-Level Program Repair","repo_url":"https://github.com/Calluking/ContextSniper","is_official":false,"mentioned_in_paper":false,"mentioned_in_github":true,"github_stars":0}]}
