RESEARCHBY AI|EXPERT SCOUT· Tuesday, July 21, 2026· 4 MIN READ
SWE-Pruner Pro Cuts Coding-Agent Token Use 39%
SWE-Pruner Pro allows coding agents to self-direct context pruning, addressing the problem of context overflow that leads to increased latency and costs in production code generation and bug fixing.
Generative Imagery
Token pruning cuts LLM inference fat.FIG. 01
SWE-Pruner Pro, a development involving researchers from Xiaomi and detailed in an arXiv paper, reduces prompt and completion token volume by up to 39% in multi-turn coding-agent trajectories. It replaces external context-pruning middleware with a small trainable head that reads the backbone's own hidden states, eliminating the need for a separate scoring model and per-turn goal-hint queries.
SWE-Pruner Pro integrates within the backbone, adding a lightweight classification head on the model's hidden states and a length-aware embedding keyed to the line count of each tool output. This setup removes the auxiliary model and the latency of an extra forward pass through an external classifier. The approach was validated on two open-weight models—Qwen3-Coder-Next and Xiaomi's 309-billion-parameter MiMo-V2-Flash—across four multi-turn benchmarks, including SWE-Bench Verified and the long-context Oolong suite.
Operationally, on MiMo-V2-Flash, which baselines at 73.4% on SWE-Bench Verified and runs at approximately $0.10 per million input tokens with a throughput of 150 tokens per second, SWE-Pruner Pro increased the verified resolve rate by 3.8 percentage points while achieving token reduction. It also improved long-context Oolong accuracy by 2.2 points. On Qwen3-Coder-Next, SWE-Pruner Pro is the only method that simultaneously maintains quality while reducing tokens. The paper notes the inference overhead of the added head is bounded but does not provide per-call latency regressions in milliseconds. MiMo-V2-Flash already uses a 5:1 sliding-window-to-global-attention ratio, reducing its KV cache by roughly six times; SWE-Pruner Pro adds token reduction on top of this geometry.
FIG. 02SWE-Pruner Pro raises SWE-Bench Verified by 3.8% and Oolong by 2.2 points while cutting token use 39%.— Xiaomi, arXiv:2607.18213
However, the method requires access to hidden-state hooks, limiting its use to open-weight deployments and making it incompatible with closed APIs without vendor hidden-state exposure. Adopting a new backbone also necessitates per-model head retraining. While the pipeline is described as language-agnostic, the benchmarks are Python-centric, with Oolong providing only a natural-language out-of-domain check, leaving cross-language generalization unproven. The original SWE-Pruner demonstrated stronger single-turn compression—up to 14.84× on LongCodeQA—while SWE-Pruner Pro's reported gains are on multi-turn trajectories, leaving single-turn efficacy an open question.
For architects maintaining open-weight agentic code pipelines, the takeaway is to train a small head on the backbone's hidden states to score line-level relevance, trading a small retraining cost for the removal of middleware latency and model-serving cost.