SWE-Pruner Pro: The Coder LLM Already Knows What to Prune
Summary
SWE-Pruner Pro leverages the coding agent's own internal representations to prune long code context, saving up to 39% of tokens while maintaining or improving task performance on multi-turn benchmarks.
View Cached Full Text
Cached at: 07/21/26, 06:35 AM
Paper page - SWE-Pruner Pro: The Coder LLM Already Knows What to Prune
Source: https://huggingface.co/papers/2607.18213
Abstract
Pruninglongcontextforcodingagentshasbeenavitaltechnologyforefficientcontextmanagement.WhileexistingcontextpruningmethodssuchasSWE-Prunerrealizethisbyattachingaseparatecodeclassifier,wefindtheagentitselfencodesinternalrepresentationsindicatingtherelevanceofcodecontextwhenreadingtooloutput.Basedonthisfinding,weproposeSWE-PrunerPro,whichprunestooloutputsdirectlyinsidetheagent.Concretely,asmallheadturnstheagent’sowninternalrepresentationsintoakeep-or-prunelabelforeachline,withalength-awareembeddingkeyedtoeachtooloutput’slinecount.Acrosstwoopen-weightbackbonesandfourmulti-turnbenchmarks,SWE-PrunerProsavesupto39%ofpromptandcompletiontokenswhilepreservingtaskquality,withboundedinferenceoverhead.Notably,onMiMo-V2-FlashSWE-PrunerProadditionallyraisestheSWE-BenchVerifiedresolverateby+3.8%andthelong-contextOolongaccuracyby+2.2points.
View arXiv pageView PDFAdd to collection
Get this paper in your agent:
hf papers read 2607\.18213
Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash
Models citing this paper0
No model linking this paper
Cite arxiv.org/abs/2607.18213 in a model README.md to link it from this page.
Datasets citing this paper0
No dataset linking this paper
Cite arxiv.org/abs/2607.18213 in a dataset README.md to link it from this page.
Spaces citing this paper0
No Space linking this paper
Cite arxiv.org/abs/2607.18213 in a Space README.md to link it from this page.
Collections including this paper0
No Collection including this paper
Add this paper to acollectionto link it from this page.
Similar Articles
@rohanpaul_ai: The paper proposes using the coding agent’s own internal representations to remove irrelevant tool-output lines without…
The paper proposes SWE-Pruner Pro, which uses the coding agent's own internal representations to prune irrelevant tool-output lines, reducing token use by up to 39% without a separate pruning model.
tool-prune: prune 50+ tool schemas down to candidates in 0.4ms (-92% prompt tokens, zero deps)
tool-prune is a tool that prunes tool schemas before calling local LLM models, reducing prompt tokens by 92% and avoiding hallucinations with no extra LLM round-trips.
Context Pruning for Coding Agents via Multi-Rubric Latent Reasoning
LaMR introduces a structured pruning framework for coding agents that decomposes code relevance into semantic evidence and dependency support dimensions, using dedicated CRFs and a mixture-of-experts gate to reduce token usage by up to 31% while maintaining or improving task performance.
Cut Your Losses! Learning to Prune Paths Early for Efficient Parallel Reasoning
This paper introduces STOP (Super Token for Pruning), a lightweight method that learns to prune unpromising reasoning paths early during parallel decoding by appending learnable tokens and reading KV cache states, achieving 70% token reduction while improving performance on AIME and GPQA benchmarks.
New Compiler based agent cuts costs by 2x and improves code intelligence (78.2% SWE-bench Verified @ 0.1¢)
Benzi is a compiler-backed coding agent that first compiles a codebase into a queryable map of calls, data flow, and class hierarchies, reportedly hitting 78.2% on SWE-bench Verified with DeepSeek V4 flash at under 10 cents per fix. It claims 2x less source code read than Claude Code while being 40% faster and 2x cheaper, and ships as a VS Code extension, headless runtime, and MCP tools.