Paper Overview
Field: NLP Authors: Yuhang Wang, Yuling Shi, Shaoqiu Zhang, Jialiang Liang, Shilin He, et al. (9 authors total) Published: 2026-07-20 arXiv: 2607.18213 Categories: cs.CL, cs.SE
Abstract (Translated)
Pruning long contexts for coding agents has long been a key technique for efficient context management. While existing context-pruning methods such as SWE-Pruner achieve this by attaching a separate code classifier, we find that the agent itself encodes internal representations indicating code context relevance when reading tool outputs. Based on this finding, we propose SWE-Pruner Pro, which prunes tool outputs directly inside the agent.
Specifically, a small head network converts the agent's own internal representations into per-line keep-or-prune labels, using length-aware embeddings based on the number of lines in each tool output.
Results
- Evaluated on two open-source backbones across four multi-turn benchmarks
- Saves up to 39% of prompt and completion tokens while maintaining task quality
- Inference overhead is bounded
- On MiMo-V2-Flash:
- +3.8% on SWE-Bench Verified resolve rate
- +2.2 percentage points on long-context Oolong accuracy
Original Abstract (Condensed)
> We find coding agents encode internal representations indicating code context relevance. SWE-Pruner Pro prunes tool outputs inside the agent, saving up to 39% tokens while raising SWE-Bench Verified resolve rate by +3.8% on MiMo-V2-Flash.
--- *Auto-collected on 2026-07-22*