Software workflows · Research feature

SkillForge: Self-Distilling Agents for Project-Specific Issue Resolution

The study evaluates SkillForge, a self-distillation framework designed to address the cold-start problem in software issue resolution.

Adapted from research by Silin Chen, Han Li, Xiaodong Gu and colleagues.

arXiv preprint revision · 2026-08-19 · Attribution & reuse
In this article
Editorial illustration of linked workflow.

Editor’s introduction

The study evaluates SkillForge, a self-distillation framework designed to address the cold-start problem in software issue resolution. It compares performance when agents learn from real issues versus when they first synthesize and resolve synthetic issues derived from re-implementing core repository functionalities. SkillForge creates a repository of entity-grounded skills by resolving these synthetic problems, allowing it to retain project-specific knowledge without waiting for actual issues. The framework outperforms baseline methods in both open-source and closed-source model settings, with consistent gains in Pass@1 metrics on SWE-bench V. The evidence shows that proactive knowledge acquisition through synthetic issue generation improves downstream resolution performance.

Introduction

Large language model (LLM) based agents have demonstrated remarkable capabilities in software issue resolution. By autonomously navigating repositories, invoking tools, and iteratively proposing patches, modern software engineering (SWE) agents—such as SWE-agent and OpenHands —can resolve complex, real-world bugs that previously required expert human intervention. Driven by increasingly powerful foundation models and better scaffolding designs, these agents have achieved impressive results on standard benchmarks such as SWE-bench, demonstrating strong generalization across diverse codebases and issue types.

Despite these advances, a critical bottleneck emerges when agents are deployed on a specific project: they typically must solve issues from scratch, without project-specific knowledge. Real-world projects often exhibit structural regularities: recurring failures may involve the same brittle modules, correct patches may need to preserve repository-specific API contracts, and related APIs are often coupled through implicit execution paths. Agents that lack such project-specific knowledge must repeatedly rediscover these conventions during issue resolution. This limitation creates a cold-start problem: before project-specific knowledge has been acquired, even a highly capable agent is reduced to a generic repository explorer and can repeatedly fall into the same project-specific pitfalls.

To address this knowledge gap, recent works have explored self-evolving SWE agents that acquire project-specific knowledge from prior issue-resolution signals. History-driven methods such as EvoCoder and SWE-Exp distill reusable knowledge from historical issues, commits, or agent trajectories. Online methods instead refine the agent during test-time exploration by generating additional trajectories on the current issue. While effective, both paradigms acquire project-specific knowledge reactively. History-driven methods are bounded by the richness and coverage of past issues: repository behaviors, API combinations, and long-tail components that have not been exercised by historical trajectories provide little learning signal. Online methods reduce this dependence on history, but they pay substantial trajectory, token, and time costs for each target issue, and the acquired guidance becomes available only after the issue has already arrived.

In this paper, we propose SkillForge, a proactive self-distillation framework for addressing the cold-start problem in project-specific issue resolution. Rather than waiting for real issue-resolution history to accumulate, SkillForge synthesizes project-specific issues from the current repository. Given a repository snapshot, SkillForge starts from test-covered core functionalities, follows execution traces to identify the code regions that jointly implement the same functionality, and rewrites these coordinated segments under constrained context. The resulting synthetic issues are executable and behaviorally grounded by the repository tests. A SWE agent then resolves these synthetic issues, producing trajectories from which SkillForge distills project-specific knowledge.

We implement SkillForge with Mini-SWE-Agent and evaluate it on SWE-bench Verified and SWE-bench Pro using both DeepSeek-V3.2 and GPT-5-mini. On SWE-bench Verified, SkillForge achieves 72.2% and 60.6% Pass@1, improving over Mini-SWE-Agent by +5.8 and +5.6 percentage points, respectively. On SWE-bench Pro, SkillForge further improves over Mini-SWE-Agent by +5.8 and +4.1 percentage points. Across both benchmarks, SkillForge outperforms all evaluated history-driven and online project-specific knowledge acquisition baselines available for each benchmark, showing that proactive project-specific knowledge acquisition can improve issue resolution without relying on rich historical issue trajectories or heavy per-issue online exploration.

Methodology

SkillForge is a self-distillation framework for addressing the cold-start problem in project-specific issue resolution. The key idea is to proactively derive project-specific knowledge directly from the repository itself, rather than waiting for real-world issue-resolution trajectories to accumulate. To achieve this, SkillForge synthesize project-specific issues, resolves them with a SWE agent, and distills the resulting project-specific knowledge into reusable skills that can be retrieved during subsequent real-world issue resolution.

Project-Specific Issue Synthesis

To acquire project-specific knowledge without relying on historical issue reports, SkillForge synthesizes project-specific issues by rewriting functionality-critical code segments and treating the resulting test failures as resolution targets. Rather than explicitly injecting handcrafted bugs, the framework asks an LLM to reimplement repository functionality under constrained context, encouraging the rewritten code to naturally exhibit implementation mistakes similar to those introduced during real software development. More importantly, because the model must reconstruct functionality without access to the original implementation, the rewritten code reflects its general coding knowledge rather than the repository’s project-specific knowledge, thereby exposing the project-specific behaviors that the agent needs to learn. Throughout this process, supervision is derived solely from the repository’s codebase and test suite, without relying on historical issue reports or human-written bug descriptions.

Code rewriting. For each selected segment, we ask an LLM to rewrite the corresponding code by re-completing the local functionality. Crucially, the LLM is not provided with the original implementation; instead, it receives only limited contextual information: the lines before and after the segment, the segment’s location and indentation, and a high-level description of the test’s goal. The model is prompted to produce a plausible alternative implementation that preserves the intended API while potentially simplifying logic. Rather than explicitly injecting predefined faults, this “strict-mask” design exposes the gap between an agent’s general coding knowledge and the repository’s project-specific knowledge by inducing realistic implementation mistakes under constrained context.

Instance assembly and problem statement. Once the rewritten segments induce test failures, we construct a buggy repository snapshot and derive both a buggy patch and a reference patch. Following prior synthetic SWE task construction works, we execute the failing tests and use an LLM to convert the resulting failure evidence into a user-facing problem statement without exposing implementation details or repair hints. The resulting synthetic instance consists of a base commit, a buggy patch, a reference patch, a problem statement, and the associated test cases, matching the standard SWE-bench issue-resolution format. These synthetic instances serve as self-supervised tasks for acquiring project-specific knowledge before real issue resolution.

Issue Resolution Attempt For each synthesized instance, SkillForge follows the SWE-bench-style issue resolution protocol: the agent is placed in an isolated repository environment, receives the problem statement and buggy codebase, and attempts to produce a patch that resolves the failing tests. We record the resulting action trajectory (e.g., file edits, shell commands, and test runs) for subsequent skill distillation.

Skill Distillation

The design of each key is specifically tailored to enhance the agent’s autonomous capabilities: (1) The purpose field identifies the role an entity plays during issue resolution, helping the agent determine whether it is a relevant debugging entry point rather than merely summarizing its implementation. (2) The playbook field captures project-specific reasoning patterns distilled from trajectories. Rather than generic debugging advice, it records repository-specific knowledge that has been validated through interaction with the repository. (3) The related_apis field records APIs that are repeatedly co-involved during issue resolution. Unlike static dependency graphs, these relationships reflect repository-specific interaction patterns observed during problem solving, allowing the agent to navigate cross-module behaviors that are not evident from structural dependencies alone.

Skill Adaptation

To utilize the acquired project-specific knowledge during downstream issue resolution, SkillForge retrieves the distilled skills associated with relevant repository entities and injects them into the agent’s reasoning process. This retrieval follows a two-stage, context-aware mechanism consisting of macro-level initialization and micro-level just-in-time (JIT) intervention.

Unlike existing methods that retrieve semantically similar records from a centralized knowledge store, SkillForge grounds project-specific knowledge directly to repository entities. Consequently, retrieval is triggered by the agent’s interaction with the corresponding code entities rather than solely by semantic similarity. This entity-grounded design ensures that diagnostic and intervention knowledge is delivered precisely when the agent reaches the relevant repository context, reducing retrieval ambiguity while maintaining tight alignment between the injected knowledge and the code under inspection.

Datasets

We evaluate SkillForge on SWE-bench Verified, a human-validated benchmark released by OpenAI, which has been widely adopted as the standard for evaluating software engineering agents. The benchmark consists of 500 tasks sourced from popular Python repositories on GitHub.

Implementation Details

For SWE-bench Verified, synthesis is temporally isolated. For each target instance, we first roll back the repository before both the golden patch and golden test patch; on this rolled-back snapshot, an LLM localizes semantically relevant tests because extracting the full test suite from every snapshot is time- and compute-intensive. We synthesize issues only from this filtered subset, yielding 577 synthesized issues. SkillForge itself does not require historical issue-resolution data; in the temporal evaluation protocol, the agent may retrieve only skills distilled from synthesized issues in the same repository whose source commits predate the target instance’s gold commit, ensuring that no current-instance or future information is used.

Transferability of project-specific knowledge across LLM backbones

We further investigate whether the project-specific knowledge distilled by SkillForge is transferable across LLM backbones. Specifically, we use one LLM to synthesize project-specific issues, resolve them, and distill the resulting project-specific knowledge, which is represented as reusable skills. These skills are then injected during issue resolution performed by either the same or a different LLM. Table IV exhibits a clear diagonal pattern: each resolver LLM achieves the best performance when paired with project-specific knowledge distilled from itself. DeepSeek-V3.2 reaches 72.2% when using its own distilled skills but drops to 65.2% when using GPT-5-mini’s. Similarly, GPT-5-mini achieves 60.6% with its own distilled skills but decreases to 55.0% when using those distilled by DeepSeek-V3.2. These results indicate that the distilled project-specific knowledge is not universally transferable across LLMs. Instead, it captures how a particular LLM reasons about and edits a specific repository. Since different LLMs exhibit different coding priors, the repository-specific mismatches exposed during synthetic issue resolution are likewise model dependent, leading to different project-specific knowledge being distilled. Consequently, knowledge distilled from one LLM provides limited guidance for another and may even introduce irrelevant context.

Case Study

To provide a more concrete view of how SkillForge changes the behavior of a repair agent, we present a case study on Django issue #11206. The bug concerns formatting extremely small Decimal values when a fixed number of decimal places is explicitly requested. In the buggy version, calling nformat(Decimal(“1e-200”), ”.”, decimal_pos=2) returns “1.00e-200”, i.e., scientific notation, whereas users expect a fixed-point representation such as “0.00”. Correctly fixing this issue requires reasoning about when a value should be treated as numerically zero at a given precision, without breaking existing formatting behavior for other magnitudes or types.

In contrast, the skill-enhanced agent follows a longer but more structured reasoning process. After accessing the same module, the retrieved project-specific knowledge highlights two repository-specific insights: (i) preserve the existing Decimal formatting pipeline instead of introducing alternative representations, and (ii) reason about numerical equivalence using the repository’s precision semantics rather than a simple exponent heuristic. Guided by these insights, the agent derives a threshold-based solution that integrates naturally with the existing formatting logic. It further validates the implementation using representative boundary, precision-sensitive, and extreme-value test cases before committing the fix, ultimately passing all FAIL_TO_PASS tests (2/2).

This example illustrates how proactively acquired project-specific knowledge reshapes the agent’s reasoning process during issue resolution. With skill injection, the agent (i) adopts a more faithful mathematical model of the bug (value-based thresholding versus exponent-based heuristics), (ii) preserves important design constraints of the existing implementation (e.g., maintaining Decimal-level operations and respecting the original formatting path), and (iii) naturally gravitates toward a test-driven workflow that exercises subtle edge cases. In contrast, the baseline trajectory quickly converges to a plausible but brittle local heuristic that fails under systematic evaluation, underscoring the value of skill-enhanced reasoning for non-trivial software bugs.

Quality of Distilled Skills and LLM-Generated Problem Statements

We manually inspected the quality of the distilled skills and synthesized problem statements. For the distilled skills, we verified that they are grounded in the corresponding repository entities, resolution trajectories, and golden patches, providing correct and actionable project-specific guidance without hallucinated APIs or misleading advice. For the synthesized problem statements, we verified that they faithfully describe the observable failures induced by functionality-level rewriting without leaking implementation details.

We also compared the issue-type distribution of synthesized issues with that of real SWE-bench issues from the same repositories. The two distributions do not overlap, suggesting that the synthesized issues do not merely reproduce the same categories of real issues used for evaluation. Instead, they tend to expose finer-grained model biases in how the current LLM uses project-specific functions, APIs, and cross-function interactions. Thus, the benefit of SkillForge is less about teaching the agent to solve similar issue types and more about surfacing project-specific function-use pitfalls that can transfer across different real issue categories.

External validity

SkillForge relies on repository tests to synthesize issues and distill project-specific knowledge. Consequently, code regions that are rarely exercised by runnable tests contribute fewer learning signals, which may reduce the effectiveness of the learned knowledge in repositories with limited test coverage.

Project-Specific Knowledge for SWE Agents

Recent SWE agents have increasingly moved beyond one-shot issue solving toward self-evolving behavior, where the agent improves by distilling reusable guidance from prior histories, trajectories, and execution feedback. These methods can be broadly grouped by the source of their evolution signal. One line of work evolves from repository history. EvoCoder and SWE-Exp accumulate past interaction trajectories and distill abstract problem-solving patterns to guide future tasks. ExpeRepair organizes previously resolved bugs into structured memories for later patch generation, while MemGovern harvests community debugging traces from GitHub to improve the agent’s decision-making process. Another line of work evolves from online trajectories produced on the current instance. SWE-Debate iteratively strengthens solutions through multi-agent debate, SAGE abstracts high-level guidance from trial-and-error grounding during test-time scaling, and Live-SWE-agent evolves its own runtime scaffold while solving the current task. Unlike these reactive paradigms, SkillForge targets the cold-start problem in project-specific issue resolution. Instead of acquiring project-specific knowledge only after accumulating repository history or online exploration trajectories, it proactively derives such knowledge directly from the repository by synthesizing project-specific issues, and represents this knowledge as entity-grounded skills for future issue resolution.

SWE-Style Instance Synthesis

Recent work has explored synthesizing software issues or executable environments to improve software engineering agents. Existing methods primarily view synthesized instances as scalable training data. SWE-Smith constructs synthetic bug-fixing tasks by independently rewriting individual API-level functions. R2E-Gym generates executable SWE environments through test generation and commit back-translation to support large-scale agent training. BugPilot synthesizes feature-development tasks that unintentionally introduce bugs, producing realistic development scenarios for subsequent model training.

In contrast, SkillForge uses synthetic issues for a fundamentally different purpose: proactive project-specific knowledge acquisition rather than training models. Instead of maximizing the number or diversity of synthesized tasks, SkillForge aims to expose project-specific knowledge that cannot be readily inferred from static repositories alone. Its issue construction also differs in granularity: rather than rewriting isolated API-level functions, randomly selecting several functions for joint rewriting, or generating new features, SkillForge starts from repository-tested functionalities and uses test execution traces to identify the code regions that jointly implement the same functionality. Solving the resulting issues reveals how the agent’s general coding priors diverge from project-specific implementation patterns and API interactions.

Conclusion

We presented SkillForge, a self-distillation framework for addressing the cold-start problem in project-specific issue resolution. Rather than relying on repository history or costly per-issue test-time exploration, SkillForge proactively derives project-specific knowledge directly from the repository by synthesizing project-specific issues and distilling their resolution trajectories. This knowledge is represented as a dual-level, entity-grounded skill repository that supports future issue resolution. Experiments demonstrate that SkillForge consistently improves issue resolution performance, yielding absolute Pass@1 gains of +5.8%/+5.6% on SWE-bench Verified and +5.8%/+4.1% on SWE-bench Pro for DeepSeek-V3.2 and GPT-5-mini, respectively. Overall, our results suggest that proactively acquiring project-specific knowledge before real issue resolution is an effective and scalable alternative to reactive acquisition from repository history or online exploration.