Small and mid-scale language models frequently fail to revise an incorrect first attempt. Prompting-based self-correction presupposes a latent self-critique ability that these models often do not possess, while reinforcement learning applied directly at small scale tends to be unstable.
We present Loop-Driven Agentic Behavior Distillation (LABD), a two-stage post-training procedure that treats self-correction as a behavior to be taught rather than an ability to be elicited. In the first stage, each student model operates inside a closed execution loop and generates complete agent trajectories consisting of reasoning, execution, feedback, and, when necessary, recovery. Some trajectories succeed immediately, while others require one or more repair steps. A stronger teacher, conditioned as the author of the trajectory, intervenes only when recovery is needed and produces corrected actions under sandbox feedback. The resulting execution-grounded trajectories are then distilled back into the same model through supervised fine-tuning. In the second stage, Group Relative Policy Optimization (GRPO) grounds the learned behavior using execution-based rewards.
Evaluating four Qwen3 sizes (0.6Bโ8B) on MBPP and HumanEval under an iterative execution-feedback protocol, we find that the agentic loop produces a net improvement over single-pass generation at every scale, with third-iteration gains over the base model of approximately +10 to +20 percentage points (pp) on MBPP and +5 to +25 pp on HumanEval. Recovery from failure tends to increase with model capacity rather than appearing only beyond a fixed size, and the additional inference cost of the loop is modest (ร1.08โร1.38 in generated tokens). All training was performed on a single mid-range GPU using a few hundred distilled trajectories per model. These results indicate that self-correction in small models is best obtained by teaching the behavior directly from a model's own failures, rather than by prompting for it or discovering it through reinforcement learning alone.