@rohanpaul_ai: The paper proposes using the coding agent’s own internal representations to remove irrelevant tool-output lines without…

X AI KOLs Following Papers

Summary

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.

The paper proposes using the coding agent’s own internal representations to remove irrelevant tool-output lines without a separate pruning model. SWE-Pruner Pro reads the model’s last-layer hidden states and labels every tool-output line as keep or remove. Coding agents repeatedly read files, logs, and search results, then carry large amounts of unused text into later turns. SWE-Pruner Pro adds a small classifier that reads hidden states, the model’s internal summaries, and labels each line keep or prune. A length-aware signal makes it gentler with short outputs, while a balanced training loss protects rare but important lines. The team trained only this added head on 22,609 labeled tool responses, leaving the coding LLM itself unchanged. Across 2 open models and 4 multi-turn benchmarks, it cut token use by up to 39% while mostly preserving quality. On MiMo-V2-Flash, it also improved one coding benchmark by 3.8% and one long-context test by 2.2 points. The result suggests coding agents already contain enough relevance information to manage context without a separate pruning model. – arxiv. org/abs/2607.18213 Title: "SWE-Pruner Pro: The Coder LLM Already Knows What to Prune"
Original Article
View Cached Full Text

Cached at: 07/22/26, 08:26 AM

The paper proposes using the coding agent’s own internal representations to remove irrelevant tool-output lines without a separate pruning model.

SWE-Pruner Pro reads the model’s last-layer hidden states and labels every tool-output line as keep or remove.

Coding agents repeatedly read files, logs, and search results, then carry large amounts of unused text into later turns.

SWE-Pruner Pro adds a small classifier that reads hidden states, the model’s internal summaries, and labels each line keep or prune.

A length-aware signal makes it gentler with short outputs, while a balanced training loss protects rare but important lines.

The team trained only this added head on 22,609 labeled tool responses, leaving the coding LLM itself unchanged.

Across 2 open models and 4 multi-turn benchmarks, it cut token use by up to 39% while mostly preserving quality.

On MiMo-V2-Flash, it also improved one coding benchmark by 3.8% and one long-context test by 2.2 points.

The result suggests coding agents already contain enough relevance information to manage context without a separate pruning model.

– arxiv. org/abs/2607.18213

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

Similar Articles

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

Hugging Face Daily Papers

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.

Context Pruning for Coding Agents via Multi-Rubric Latent Reasoning

arXiv cs.AI

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.