Steer, Don't Solve: Training Small Critic Models for Large Code Agents

Shubham Gandhi, Yiqing Xie, Atharva Naik, Ruichen Zhu, Carolyn RosearXiv 2026

TL;DR

Instead of forcing a single large language model to handle both high-level strategy and low-level code execution, this paper introduces a method to train small, specialized "critic" models (4B and 8B parameters) that provide high-level guidance to frozen coding agents. This separation of concerns significantly boosts the problem-solving success of large coding agents on software engineering benchmarks while simultaneously slashing inference costs by reducing wasted steps.

What Problem Does This Paper Address?

AI coding agents often struggle with long-horizon tasks, such as resolving real-world GitHub issues. Current architectures typically rely on a single model to handle everything from high-level reasoning (troubleshooting, searching, planning) to low-level implementation (writing code, executing bash commands).

The authors argue that optimizing a single model for both capabilities creates a bottleneck. Empirically, around 65% of coding agent failures stem from flawed reasoning—like getting stuck in repetitive loops or drifting away from the main goal—rather than an inability to write the code itself. By forcing one model to learn both abstract planning and concrete tool execution, the training patterns become overly complex, limiting the agent's ability to generalize.

Methods

To solve this, the authors decouple planning from execution by training a separate, lightweight critic model ($C_\theta$) to steer a frozen coding agent ($\pi_A$) during inference.

Figure 1: Inference setup. A trained critic model C provides guidance to a frozen coding agent πA for every k steps. The agent is responsible for all concrete actions and the critic model inspects the current trajectory and generates high-level feedback for its next steps.

The training pipeline consists of two main stages:

  1. Supervised Fine-Tuning (SFT): Trajectories are collected from coding agents, and a powerful teacher model (Claude-Opus-4.6) acts as a critic every $k$ steps. The teacher is strictly prompted to identify errors based on a 12-category taxonomy (e.g., Step Repetition, Tool Selection Errors) and provide only high-level strategic feedback—never concrete code or commands. A student model (Qwen3-4B or 8B) is then trained on these trajectory-feedback pairs.
  2. Direct Preference Optimization (DPO): To bridge the performance gap between the student and the teacher, the authors use the SFT model to generate multiple candidate critiques. An LLM judge scores them based on correctness (fixing the agent's actual error) and clarity (unambiguous instructions). The critic is then optimized using DPO on these preference pairs.

Additionally, the critic is trained to be budget-aware, prompting the agent to wrap up and submit its patch when it nears its step limit.

Datasets

  • Training: Trajectories were collected from 500 instances randomly sampled from R2E-Gym tasks within SWE-Bench repositories (ensuring no overlap with the evaluation set).
  • Evaluation:
  • SWE-Bench Verified: 500 human-verified GitHub issues from 12 open-source Python repositories.
  • Multi-SWE-Bench: A multilingual benchmark spanning 300 instances across 9 non-Python languages, used to evaluate how well the critic generalizes across programming languages.

Key Insights and Ideas

  • The Danger of "Backseat Driving": The authors discovered that if a powerful teacher critic provides detailed, code-level prescriptions, the coding agent simply copies them blindly. While this works well for a strong proprietary critic, smaller open-source student critics lack the capacity to reliably generate both flawless code and flawless plans. Restricting the critic to high-level feedback only prevents it from "backseat driving" and forces a cleaner, more effective division of labor that a smaller model can actually master.
  • Cross-Agent and Cross-Lingual Transfer: Remarkably, a critic trained purely on Python trajectories from specific models successfully guides entirely different coding agents working in completely different programming languages (e.g., Java, C++). This implies that high-level debugging and planning strategies are largely language-agnostic.
  • Fewer Steps = Lower Cost: Intuitively, adding a second model to an inference loop should increase costs. However, because the critic stops the agent from wandering down unproductive paths or getting stuck in loops, the agent resolves tasks in significantly fewer steps. This optimization frequently makes the combined system cheaper than running the agent alone.

Key Results

The small 4B and 8B critic models achieved substantial performance gains across six different large coding agents on SWE-Bench Verified:

  • Absolute Performance Gains: The critic improved the task resolution rate of all evaluated agents by 5.6% to 16.0%. For instance, GLM-4.7-Flash-30B-A3B saw a 16.0% absolute improvement, and GPT-OSS-120B improved by 14.4%.
  • Cost Efficiency: On Qwen3-Next-80B-A3B, pairing the agent with the 8B SFT critic actually reduced the total per-instance cost from \$0.08 to \$0.03 while beating the baseline agent's success rate. Compared to using Claude-Opus as a critic, the trained open-source critics achieved a 5.2–6.0× reduction in total cost.
  • Multilingual Generalization: On Multi-SWE-Bench, the 8B critic (trained exclusively on Python data) improved the resolution rate of Qwen3-Next and Qwen3-32B by 2.0% absolute across 7 unseen languages.

Limitations and Future Work

  • Fixed Intervention Intervals: Currently, the critic intervenes at a rigid frequency (every $k=5$ or $10$ steps). The authors note that a more optimal approach would involve training the critic to dynamically decide when an intervention is necessary.
  • Scaffold and Benchmark Constraints: The method was evaluated strictly within the mini-SWE-agent scaffold on SWE-Bench variants. Its efficacy on other agent frameworks or different types of software engineering tasks remains to be validated.
  • Taxonomy Specificity: The 12-category error taxonomy was custom-built for issue-solving tasks and might need to be re-engineered for other domains like code generation from scratch or code refactoring.

Summary updated

BibTeX
@misc{gandhi2026steer,
  author = {Shubham Gandhi and Yiqing Xie and Atharva Naik and Ruichen Zhu and Carolyn Rose},
  title = {{Steer, Don't Solve: Training Small Critic Models for Large Code Agents}},
  year = {2026},
  eprint = {2606.21811},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.21811},
}
Figure