Introduction
Open-weight coding agents hold a theoretical "home-field advantage" over closed-source systems: they can be fine-tuned on a company's private codebase to learn specific patterns, conventions, and domain knowledge. However, the cost and complexity of training have kept this advantage largely theoretical. SERA (Soft-Verified Efficient Repository Agents) introduces a breakthrough in training coding agents by replacing expensive unit-test verification with "soft verification." This method enables the creation of state-of-the-art open-source coding agents at a fraction of the traditional cost, allowing for rapid specialization to private codebases.
The Challenge of Training Coding Agents
While closed-source coding agents currently lead the pack, open-weight models offer the promise of deep integration into proprietary environments. Historically, however, training these agents has been an infrastructure nightmare. Traditional pipelines require either Reinforcement Learning (RL)—which necessitates complex, sandboxed execution environments—or synthetic data generation that relies heavily on "bug injection" and comprehensive unit tests. Because many real-world repositories lack robust test suites, specializing an agent to a new codebase has been practically impossible or prohibitively expensive.
Soft Verified Generation (SVG)
To bypass the need for unit tests and complex RL environments, the authors introduce Soft Verified Generation (SVG). This two-stage process leverages line-level recall as a proxy for code correctness:
- Initial Rollout: A teacher model is given a random function from a codebase and a vague bug prompt. It generates a trajectory and a corresponding code patch.
- Synthetic PR Creation: This first rollout is converted into a synthetic Pull Request (PR) description.
- Second Rollout: The teacher model is provided only the synthetic PR and asked to reproduce the change, creating a second trajectory and patch.
- Soft Verification: Instead of executing the code against a test suite, the system compares the two patches. If the second patch matches the first using line-level recall, the trajectory is considered "verified" for training.
Using this method, the final model, SERA-32B, is trained using simple Supervised Fine-Tuning (SFT) on Qwen 3-32B, completely avoiding the infrastructure overhead of RL.
Datasets and Evaluation
The researchers generated a massive SVG Corpus containing over 200,000 synthetic trajectories across 121 different codebases. To test repository adaptation, they also created targeted specialization datasets for Django, Sympy, and Sphinx. The primary benchmark for evaluation was SWE-bench Verified, a human-curated subset of real-world GitHub issues.
Key Insights
- Verification is Overrated for Training: Surprisingly, "unverified" trajectories—where the model didn't perfectly reproduce the patch—are often just as effective for training as "hard-verified" ones. The primary value lies in teaching the model how to navigate a codebase and translate intent into code, rather than just getting the final answer perfectly right.
- Line-Level Recall as a Proxy: The authors found a high correlation ($r=0.898$) between line-level recall and actual unit test resolution, proving that simple text matching is a viable, cheap proxy for code correctness.
- The Power of Specialization: A smaller "student" model fine-tuned on a specific repository can match or even outperform a much larger "teacher" model that only accesses the code through its context window.
- Ordered Truncation: When trajectories exceed the context window, "ordered truncation" (prioritizing samples that mostly fit) significantly outperforms random slicing.
State-of-the-Art Results and Cost Efficiency
SERA-32B achieves leading results among fully open-source models (open data, method, and code).
- Performance: It reached 49.5% (at 32K context) and 54.2% (at 64K context) on SWE-bench Verified.
- Cost Savings: The SERA pipeline is 26x cheaper than RL-based approaches (like SkyRL) and 57x cheaper than previous synthetic methods (like SWE-smith). The total cost to match top-tier performance is roughly $2,000.
- Rapid Specialization: The pipeline can specialize an agent to a new repository for approximately $1,300, matching teacher performance with only 8,000 samples.
Limitations and Future Work
While SERA represents a significant leap forward, the authors note a few limitations:
- Context Length Mismatch: SERA was trained at a 32K context length. While it performs well at 64K, it underperforms compared to models specifically trained for ultra-long contexts (like Devstral) because it hasn't learned to utilize the extra space as effectively.
- Saturation Point: Soft verification works exceptionally well currently, but there may be a "saturation point" where models have learned all they can from unverified data. At that stage, RL or hard verification might become necessary to unlock higher levels of reasoning.
- Evaluation Variance: The paper highlights the high variance in coding agent evaluations, recommending a minimum of 3 random seeds for any reliable claim—a standard many current papers fail to meet.
Summary updated