SWE-Pruner Pro: The Coder Model Already Knows What to Throw Away
Every long-running coding agent drowns in its own tool output. You grep a file, you get 400 lines, maybe 12 of them matter, and all 400 sit in context for the rest of the run. The standard fix is to train an external classifier that reads the output and decides what to keep. ByteDance's new paper says you do not need one, because the coder model already knows.
SWE-Pruner Pro, arXiv 2607.18213, submitted July 20, argues that the internal representations a coding LLM builds while processing tool output already encode which lines matter. So instead of a separate model, they attach a small head that converts those existing representations into keep-or-prune decisions per line of code, with embeddings tuned to each tool output's line count. The overhead at inference time is bounded, which is the whole point of not running a second model.
The savings are up to 39% fewer tokens across both prompt and completion, tested on two open-weight backbones across four multi-turn benchmarks. That alone would be a good result. The part that makes it interesting is that quality did not merely hold. On MiMo-V2-Flash, SWE-Bench Verified resolve rate went up 3.8 points and Oolong accuracy up 2.2 points.
That direction matters. Context compression is normally a tradeoff you accept because you have to, trading a bit of accuracy for a lot of budget. Here cutting the junk made the model better at the task, which is direct evidence that the junk was actively hurting, not just sitting there. Context rot is a real failure mode and it is measurable in resolve rate.
The strategic read is that context management is quietly becoming a model feature rather than a harness feature. Every agent framework today has hand-tuned truncation heuristics bolted on the outside, written by people guessing at what matters. This paper says the model's own activations are a better signal than anything you will guess from the outside, and the head that reads them is small enough to be free. Code is on GitHub, paper at arxiv.org/abs/2607.18213
← Back to all articles
SWE-Pruner Pro, arXiv 2607.18213, submitted July 20, argues that the internal representations a coding LLM builds while processing tool output already encode which lines matter. So instead of a separate model, they attach a small head that converts those existing representations into keep-or-prune decisions per line of code, with embeddings tuned to each tool output's line count. The overhead at inference time is bounded, which is the whole point of not running a second model.
The savings are up to 39% fewer tokens across both prompt and completion, tested on two open-weight backbones across four multi-turn benchmarks. That alone would be a good result. The part that makes it interesting is that quality did not merely hold. On MiMo-V2-Flash, SWE-Bench Verified resolve rate went up 3.8 points and Oolong accuracy up 2.2 points.
That direction matters. Context compression is normally a tradeoff you accept because you have to, trading a bit of accuracy for a lot of budget. Here cutting the junk made the model better at the task, which is direct evidence that the junk was actively hurting, not just sitting there. Context rot is a real failure mode and it is measurable in resolve rate.
The strategic read is that context management is quietly becoming a model feature rather than a harness feature. Every agent framework today has hand-tuned truncation heuristics bolted on the outside, written by people guessing at what matters. This paper says the model's own activations are a better signal than anything you will guess from the outside, and the head that reads them is small enough to be free. Code is on GitHub, paper at arxiv.org/abs/2607.18213
Comments