2607.01916v1 Jul 02, 2026 cs.AI

ContextSniper: AntTrail의 토큰 효율적인 코드 메모리, 레포지토리 수준 프로그램 수정에 적용

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

Wei Yang
Wei Yang
Citations: 122
h-index: 4
C. Luk
C. Luk
Citations: 0
h-index: 0
Zhifeng Jia
Zhifeng Jia
Citations: 16
h-index: 2
Lei Chen
Lei Chen
Citations: 0
h-index: 0
Gao Cong
Gao Cong
Citations: 112
h-index: 5
Jinwei Zhu
Jinwei Zhu
Citations: 65
h-index: 5
Matin Mohammad Najafi
Matin Mohammad Najafi
Citations: 0
h-index: 0
Yang Ren
Yang Ren
Citations: 0
h-index: 0
Xiuchang Li
Xiuchang Li
Citations: 0
h-index: 0

대규모 언어 모델 에이전트는 실제 레포지토리 문제를 해결할 수 있지만, 종종 전체 파일 읽기, 광범위한 검색 및 긴 결과 출력에 많은 컨텍스트 자원을 사용합니다. 이러한 과정에서 유용한 증거가 관련 없는 코드 및 로그와 혼합되는 경우가 많습니다. 본 논문에서는 AntTrail의 토큰 효율적인 코드 메모리 레이어인 ContextSniper를 소개합니다. AntTrail의 광범위한 에이전트 메모리 엔진의 코딩 전문 기능을 수행하는 ContextSniper는 'Sniper' 기능을 구현하여 정확한 증거 선택을 가능하게 합니다. ContextSniper는 후보 코드와 런타임 증거를 검색하고, 하이브리드 검색 신호로 순위를 매기며, 의도 기반 컨텍스트 게이트를 통해 긴 출력을 필터링하고, 프롬프트 외부의 복구 가능한 소스 컨텍스트를 유지하면서 간결한 증거 패킷을 반환합니다. 우리는 OpenClaw 및 Claude Code를 사용하여 SWE-bench Lite에서 ContextSniper를 평가했습니다. 각 호스트-에이전트 조합별로 50개의 작업을 실행했습니다. 실험 결과, ContextSniper는 OpenClaw의 경우 총 토큰 사용량을 51.5% 줄이고 로깅 비용을 36.4% 절감했으며, Claude Code의 경우 총 토큰 사용량을 38.9% 줄이고 추정 비용을 27.3% 절감했습니다. 제안된 해결책이 채택되는 비율은 약간 감소했는데, OpenClaw의 경우 26.0%에서 24.0%로, Claude Code의 경우 32.0%에서 30.0%로 줄었습니다. ContextSniper의 파일럿 테스트 스크립트는 https://github.com/Calluking/ContextSniper 에서 공개적으로 사용할 수 있습니다.

Original 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 code-repair module for precision evidence selection in repository-level program repair, part of AntTrail's broader agent-memory engine. AntTrail is available at https://gitcode.com/datagallery/AntTrail. ContextSniper indexes code and action memory as three abstract levels, 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 a matched 50-task-per-condition comparison on SWE-bench Lite (same tasks, baseline vs.\ ContextSniper), ContextSniper reduces total token use by 51.5% and logged cost by 36.4% for OpenClaw, and by 38.9% and 27.3% for Claude Code, with submitted-resolution rates essentially unchanged in both host-agent settings. In a separate five-task comparison, ContextSniper beats existing memory- and RAG-style integrations on token efficiency. These results suggest ContextSniper can substantially cut token and cost overhead for repository-level repair agents without a measurable loss in repair quality. The evaluation harness for this study is available at https://gitcode.com/lukchiwang/ContextSniper.

0 Citations
0 Influential
22.5 Altmetric
0.0 Score
Original PDF
0

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!