Prunes tool outputs in coding agents using internal representations for efficient context management without external classifiers.</p>\n","updatedAt":"2026-07-21T03:15:12.533Z","author":{"_id":"6039478ab3ecf716b1a5fd4d","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/6039478ab3ecf716b1a5fd4d/_Thy4E7taiSYBLKxEKJbT.jpeg","fullname":"taesiri","name":"taesiri","type":"user","isPro":true,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":339,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.6396944522857666},"editors":["taesiri"],"editorAvatarUrls":["https://cdn-avatars.huggingface.co/v1/production/uploads/6039478ab3ecf716b1a5fd4d/_Thy4E7taiSYBLKxEKJbT.jpeg"],"reactions":[],"isReport":false}},{"id":"6a5f182c197d7fe699af5008","author":{"_id":"679cbc024ee3403814ca0e74","avatarUrl":"/avatars/0fc11476c642121eb264a891b072bb0e.svg","fullname":"Yuhang Wang","name":"ayanami-kitasan","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":3,"isUserFollowing":false},"createdAt":"2026-07-21T06:56:44.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"See the code in https://github.com/Ayanami1314/swe-pruner-pro!","html":"<p>See the code in <a href=\"https://github.com/Ayanami1314/swe-pruner-pro\" rel=\"nofollow\">https://github.com/Ayanami1314/swe-pruner-pro</a>!</p>\n","updatedAt":"2026-07-21T06:56:44.067Z","author":{"_id":"679cbc024ee3403814ca0e74","avatarUrl":"/avatars/0fc11476c642121eb264a891b072bb0e.svg","fullname":"Yuhang Wang","name":"ayanami-kitasan","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":3,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.6347616910934448},"editors":["ayanami-kitasan"],"editorAvatarUrls":["/avatars/0fc11476c642121eb264a891b072bb0e.svg"],"reactions":[],"isReport":false}}],"primaryEmailConfirmed":false,"paper":{"id":"2607.18213","authors":[{"_id":"6a5ee42d4fe5d1d13e84ab85","name":"Yuhang Wang","hidden":false},{"_id":"6a5ee42d4fe5d1d13e84ab86","name":"Yuling Shi","hidden":false},{"_id":"6a5ee42d4fe5d1d13e84ab87","name":"Shaoqiu Zhang","hidden":false},{"_id":"6a5ee42d4fe5d1d13e84ab88","name":"Jialiang Liang","hidden":false},{"_id":"6a5ee42d4fe5d1d13e84ab89","name":"Shilin He","hidden":false},{"_id":"6a5ee42d4fe5d1d13e84ab8a","name":"Siyu Ye","hidden":false},{"_id":"6a5ee42d4fe5d1d13e84ab8b","name":"Yuting Chen","hidden":false},{"_id":"6a5ee42d4fe5d1d13e84ab8c","name":"Kai Cai","hidden":false},{"_id":"6a5ee42d4fe5d1d13e84ab8d","name":"Xiaodong Gu","hidden":false}],"publishedAt":"2026-07-20T00:00:00.000Z","submittedOnDailyAt":"2026-07-21T00:00:00.000Z","title":"SWE-Pruner Pro: The Coder LLM Already Knows What to Prune","submittedOnDailyBy":{"_id":"6039478ab3ecf716b1a5fd4d","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/6039478ab3ecf716b1a5fd4d/_Thy4E7taiSYBLKxEKJbT.jpeg","isPro":true,"fullname":"taesiri","user":"taesiri","type":"user","name":"taesiri"},"summary":"Pruning long context for coding agents has been a vital technology for efficient context management. While existing context pruning methods such as SWE-Pruner realize this by attaching a separate code classifier, we find the agent itself encodes internal representations indicating the relevance of code context when reading tool output. Based on this finding, we propose SWE-Pruner Pro, which prunes tool outputs directly inside the agent. Concretely, a small head turns the agent's own internal representations into a keep-or-prune label for each line, with a length-aware embedding keyed to each tool output's line count. Across two open-weight backbones and four multi-turn benchmarks, SWE-Pruner Pro saves up to 39% of prompt and completion tokens while preserving task quality, with bounded inference overhead. Notably, on MiMo-V2-Flash SWE-Pruner Pro additionally raises the SWE-Bench Verified resolve rate by +3.8% and the long-context Oolong accuracy by +2.2 points.","upvotes":41,"discussionId":"6a5ee42e4fe5d1d13e84ab8e","organization":{"_id":"653b817d32c97d0655575872","name":"ByteDance","fullname":"ByteDance","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/6535c9e88bde2fae19b6fb25/0clr54wj5Ly-RkYU9OXPp.png"}},"canReadDatabase":false,"canManagePapers":false,"canSubmit":false,"hasHfLevelAccess":false,"upvoted":false,"upvoters":[{"_id":"6a2da6c8ca070ee12c6e396c","avatarUrl":"/avatars/0355287dcabaa67dbc7f0b10b87451f9.svg","isPro":false,"fullname":"Joe Mama","user":"JoeMama123123123","type":"user"},{"_id":"63ac5701c21e60a3e9b58aa7","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/63ac5701c21e60a3e9b58aa7/g6EX7diOpuA94R2ab-rZC.png","isPro":true,"fullname":"Dipankar Sarkar","user":"dipankarsarkar","type":"user"},{"_id":"645b0c3ec35da9c7afd95421","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/645b0c3ec35da9c7afd95421/vYBrCDagHsXAo6J2p-uG0.jpeg","isPro":false,"fullname":"Yuling","user":"YerbaPage","type":"user"},{"_id":"68831681240aa3d8ce43e1bf","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/iSjQ3OIkIvqm_0Wxv4Qib.png","isPro":false,"fullname":"Azzz","user":"azzzacs","type":"user"},{"_id":"68e2570e6ecc8f79ab4577ec","avatarUrl":"/avatars/408e8683b6947b1315c9eb41da5b4a34.svg","isPro":false,"fullname":"aa","user":"Disaaad","type":"user"},{"_id":"679cbc024ee3403814ca0e74","avatarUrl":"/avatars/0fc11476c642121eb264a891b072bb0e.svg","isPro":false,"fullname":"Yuhang Wang","user":"ayanami-kitasan","type":"user"},{"_id":"688c72c011ef3399b561dee7","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/688c72c011ef3399b561dee7/puhgnTOAfZYetsC46hqGm.jpeg","isPro":false,"fullname":"BoxueYang","user":"Boxue","type":"user"},{"_id":"68a137c3846db9d4bad0995f","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/cFRgODYfk8IGxv8jjYgBL.png","isPro":false,"fullname":"黄雨辰","user":"zhaohai","type":"user"},{"_id":"6715b493d54796e4b99d90e8","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/6715b493d54796e4b99d90e8/X-VqGsRrjPlfb94GRn13x.jpeg","isPro":false,"fullname":"黄炜锴","user":"tsrigo","type":"user"},{"_id":"68f2120d45cc9162fb3ec64c","avatarUrl":"/avatars/cb5b211a06a8f48d397419d4bccd1766.svg","isPro":false,"fullname":"caixintong","user":"Stella3029","type":"user"},{"_id":"697c50df4362f3a23b63444b","avatarUrl":"/avatars/d0a959fa4cc1c8361e318451a1b4bd45.svg","isPro":false,"fullname":"Cody Tang","user":"AMCody","type":"user"},{"_id":"67990449a5da36c49b9cf4ae","avatarUrl":"/avatars/85fd1dbd65a07175528f808ee3c927b1.svg","isPro":false,"fullname":"YM","user":"Yuanmoo","type":"user"}],"acceptLanguages":["en"],"dailyPaperRank":1,"organization":{"_id":"653b817d32c97d0655575872","name":"ByteDance","fullname":"ByteDance","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/6535c9e88bde2fae19b6fb25/0clr54wj5Ly-RkYU9OXPp.png"},"markdownContentUrl":"https://huggingface.co/buckets/huggingchat/papers-content/resolve/2607/2607.18213.md","query":{}}">
SWE-Pruner Pro: The Coder LLM Already Knows What to Prune
Abstract
Pruning long context for coding agents has been a vital technology for efficient context management. While existing context pruning methods such as SWE-Pruner realize this by attaching a separate code classifier, we find the agent itself encodes internal representations indicating the relevance of code context when reading tool output. Based on this finding, we propose SWE-Pruner Pro, which prunes tool outputs directly inside the agent. Concretely, a small head turns the agent's own internal representations into a keep-or-prune label for each line, with a length-aware embedding keyed to each tool output's line count. Across two open-weight backbones and four multi-turn benchmarks, SWE-Pruner Pro saves up to 39% of prompt and completion tokens while preserving task quality, with bounded inference overhead. Notably, on MiMo-V2-Flash SWE-Pruner Pro additionally raises the SWE-Bench Verified resolve rate by +3.8% and the long-context Oolong accuracy by +2.2 points.
Community
Prunes tool outputs in coding agents using internal representations for efficient context management without external classifiers.
Upload images, audio, and videos by dragging in the text input, pasting, or clicking here.
Tap or paste here to upload images
Cite arxiv.org/abs/2607.18213 in a model README.md to link it from this page.
Cite arxiv.org/abs/2607.18213 in a dataset README.md to link it from this page.
Cite arxiv.org/abs/2607.18213 in a Space README.md to link it from this page.
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.