Compressing Code Context for LLM-based Issue Resolution

📅 2026-03-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the limitations of large language models in repairing GitHub issues, which often stem from excessive and redundant code context, leading to high computational costs and suboptimal repair performance. To overcome this, the authors propose a two-stage framework: first, an Oracle-guided Code Distillation (OCD) algorithm leverages genetic search combined with incremental debugging to generate minimal yet semantically sufficient context; second, a lightweight model named SWEzze is fine-tuned to enable real-time, efficient context compression. Evaluated on SWE-bench Verified, SWEzze achieves a stable compression ratio of approximately 6×, reduces token consumption by 51.8%–71.3%, and improves repair success rates by 5.0%–9.2%, significantly outperforming existing approaches.
📝 Abstract
Large Language Models (LLMs) are now capable of resolving real-world GitHub issues. However, current approaches overapproximate the code context and suffer from two compounding problems: the prohibitive cost of processing massive inputs, and low effectiveness as noise floods the context window and distracts the model from the bug-fixing signal. Existing compression techniques fail to resolve this tension: generic compressors compromise the semantic integrity of code, while code-specific tools lack awareness of code structure and task context to preserve essential patch ingredients. To address this, we propose a novel framework consisting of two components. First, Oracle-guided Code Distillation (OCD), a context distillation algorithm that combines genetic search and delta debugging to systematically reduce code contexts to their minimal sufficient subsequence - retaining only the ingredients required for a successful fix. We use this distilled data to fine-tune SWEzze, a lightweight model that learns to compress code context at inference time, filtering noise and combating distraction while preserving fix ingredients. Evaluated on SWE-bench Verified across three frontier LLMs, SWEzze maintains a stable compression rate of about 6 times across models, reduces the total token budget by 51.8%-71.3% relative to the uncompressed setting, improves issue resolution rates by 5.0%-9.2%, and delivers the best overall balance among effectiveness, compression ratio, and latency compared with state-of-the-art context compression baselines.
Problem

Research questions and friction points this paper is trying to address.

code context compression
LLM-based issue resolution
noise reduction
semantic integrity
bug-fixing signal
Innovation

Methods, ideas, or system contributions that make the work stand out.

Code Context Compression
Oracle-guided Code Distillation
LLM-based Issue Resolution
SWEzze
Delta Debugging
🔎 Similar Papers
No similar papers found.