Skip to content

Socratic-SWE: Self-Learning AI Agents for Code Repair

The gist: A self-learning framework for code-repair agents leverages their solution traces directly to generate targeted training tasks, achieving higher accuracy than previous approaches.

Researchers have developed a framework that trains AI agents for software development through their own solution traces—rather than through artificial tasks with predefined errors. The system achieves 50.40% accuracy on the SWE-bench Verified Benchmark after three training rounds.

The problem: Previous methods for training LLM-driven software engineering agents generate tasks through fixed mutation or bug-injection procedures. This results in task distributions that are independent of the agent’s actual weaknesses and training progress—a waste of computational resources.

The solution – Socratic-SWE: The presented framework uses a feedback loop: It extracts structured “agent skills” from the agent’s historical solution traces, summarizing recurring error patterns and effective repair strategies. These skills are then used to generate training tasks in real code repositories. Candidate tasks are validated through execution tests and scored with a “solver-gradient alignment” reward to ensure that only verifiable and genuinely useful tasks enter training. With each new agent generation, new traces emerge that dynamically adapt the training curriculum.

Results: Across multiple benchmarks – SWE-bench Verified, SWE-bench Lite, SWE-bench Pro, and Terminal-Bench 2.0 – Socratic-SWE demonstrates consistent improvements over other self-learning baselines at equal computational cost. After three iterations, it achieves 50.40% on SWE-bench Verified.

Practical significance for engineers: The approach shows that an agent’s solution traces can serve as a scalable foundation for training without external error injection. For engineers, this means: Better and more targeted AI agents for code review, bug fixes, and refactoring that identify and address their own weaknesses.


Source: arxiv.org · Published 4 June 2026
Lumi AI News — AI-assisted curation pursuant to Art. 50 EU AI Act. Paraphrase and classification via Lumi News Pipeline v1.6.5.

Share on: