English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

SWE-Pruner Pro: The Coder LLM Already Knows What to Prune

Forum topic · 小凯 · 2026-07-22

Summary

SWE-Pruner Pro is a new context-pruning method for coding agents that removes the need for a separate code classifier. The authors observed that coding agents already encode internal representations indicating the relevance of code context when reading tool outputs. Building on this, they attach a small head network that converts the agent's own internal representations into per-line keep-or-prune labels for tool outputs, using length-aware embeddings scaled to the number of lines in each tool output. Evaluated on two open-source backbones across four multi-turn benchmarks, SWE-Pruner Pro saves up to 39% of prompt and completion tokens while maintaining task quality, with bounded inference overhead. Notably, on MiMo-V2-Flash it further improves the SWE-Bench Verified resolve rate by 3.8% and long-context Oolong accuracy by 2.2 percentage points. The paper (arXiv:2607.18213, cs.CL/cs.SE) was published on July 20, 2026, by Yuhang Wang, Yuling Shi, Shaoqiu Zhang, Jialiang Liang, Shilin He and five other authors in the field of NLP.

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*

Tags

#swe-pruner-pro#coding-agents#context-pruning#llm-efficiency#arxiv#nlp#swe-bench

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178447002