ReTerm teaches terminal agents to recover from their own mistakes
The new training-code release pairs a Qwen3.5-9B agent with recovery demonstrations and reinforcement learning from failed execution states.
Training for what happens after an error
ReTerm’s researchers have released training code for a terminal agent designed to recover after its own commands or implementations go wrong. The GitHub repository’s initial-release commit is dated October 14 at 05:52 UTC, following the October 13 submission of the English preprint. The model and dataset repositories already contained uploads from October 6; today’s paper-link edits are not a new checkpoint release.
The approach starts with failed terminal-task trajectories and the environment states they leave behind. A stronger teacher produces recovery continuations, which are filtered into ReTerm-10K’s 9,712 demonstrations. Supervised training uses the failed history as context and learns from the teacher’s recovery responses. ReTerm-GRPO then branches into several recovery attempts from the agent’s own failure states and learns from whether task verification succeeds.
A concrete research option for agent builders
Built on Qwen3.5-9B, ReTerm-9B reaches 34.8% Pass@1 on Terminal-Bench 2.0 in the authors’ evaluation, compared with 20.2% for the base model. Their paper uses the same Bash-based agent harness and configuration for that comparison, including a 256,000-token task budget. Those are research results under the stated setup, rather than a guarantee that every failed coding task can be repaired. The paper’s comparisons with other model families can draw on previously published results using different setups.
The release gives builders a way to study recovery training using downloadable Apache-2.0 weights, an ODC-BY dataset and separate supervised and reinforcement-learning launchers. Training requires an environment that can execute actions, preserve and restore states, and verify task outcomes. Its “self-improving” framing describes the training procedure; the released checkpoint does not establish automatic weight updates during ordinary use.