Crimson AI NewsA CrimsonLingua Network service
EN ع
← Back to news
Research paper Hugging Face

SWE-Pruner Pro: Pruning Code Context Using the Agent’s Own Internal Signals

AI By Crimson AI Hugging Face Papers 21 July 2026 · 00:00 13 views
Share: X Telegram

Hugging Face researchers introduce SWE-Pruner Pro, a method that prunes tool outputs in coding agents by leveraging the agent’s internal representations, eliminating the need for a separate classifier. It saves up to 39% of tokens while maintaining or improving task performance.

SWE-Pruner Pro: Pruning Code Context Using the Agent’s Own Internal Signals

Key points

Researchers from Hugging Face have proposed SWE-Pruner Pro, a novel approach to context pruning for coding agents. Unlike existing methods such as SWE-Pruner, which rely on a separate code classifier to prune long contexts, SWE-Pruner Pro uses the agent’s own internal representations to decide which lines of tool output to keep or discard.

The key insight is that the coding agent already encodes relevance information internally when reading tool outputs. A small head is attached to the agent to convert these internal representations into keep-or-prune labels for each line, using a length-aware embedding that accounts for the line count of each tool output.

Evaluated across two open-weight backbone models and four multi-turn benchmarks, SWE-Pruner Pro achieves up to 39% savings in prompt and completion tokens while preserving task quality, with only bounded inference overhead. Notably, on the MiMo-V2-Flash benchmark, the method improves the SWE-Bench Verified resolve rate by +3.8% and the long-context Oolong accuracy by +2.2 points.

The code is available on GitHub at https://github.com/Ayanami1314/swe-pruner-pro.

Source
Hugging Face · Hugging Face Papers
Related news
Research paper
Hugging Face 31 Aug 2026

Hugging Face Unveils StepGuard: Step-Level Guardrails for Safer AI Agents

StepGuard, a new step-level guard model from Hugging Face, audits agent actions before execution, reducing attack success rates by...

1
Research paper
Hugging Face 31 Aug 2026

Hugging Face Researchers Unveil ABot-Recon for Stable Long-Horizon 3D Reconstruction

ABot-Recon, a new streaming 3D reconstruction model from Hugging Face, achieves stable long-horizon performance using only local t...

1
Research paper
Hugging Face 31 Aug 2026

ContextPilot: Teaching Agents Proactive Context Management via Fine-Grained RL

Hugging Face researchers introduce ContextPilot, a framework that enhances long-horizon agent reasoning by expanding context-editi...

1