Skip to content

ReTerm: Recovery Training for Self-Improving Terminal AgentsReTerm: Recovery Training for Self-Improving Terminal Agents

Hugging Face Daily Papers· arXiv:2610.18484· Wei Xie, Kaituo Feng, Shiming Fu, Yong Liu, Xiangyu Yue, Shuangjia ZhengFudan University; MMLab, The Chinese University of Hong Kong; Shanghai Jiao Tong UniversityIndexed by this site · 2026-10-14· Originally publishedAI updates

Translation in progress — untranslated text is omitted.

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

AI summaryReTerm is a self-improving terminal agent trained by learning to recover from its own failed tasks. Its 9B version achieves 34.8% Pass@1 on Terminal-Bench 2.0, a 14.6 percentage point improvement over the base model Qwen3.5-9B. To address the problem that terminal agents struggle to recover from errors such as command mistakes and implementation defects during long executions, ultimately leading to task failure, the authors build a custom data pipeline and produce the ReTerm-10K dataset, providing recovery demonstrations for SFT cold start. Their proposed ReTerm-GRPO online reinforcement learning algorithm branches multiple independent self-recovery attempts from the agent's own failed states and learns based on whether these attempts complete the task. Compared with standard GRPO training, this method achieves higher recovery rates across multiple error categories. Code, data, and models have been released on GitHub.

Questions
Terminal agents doing long-horizon programming often encounter command errors or incorrect implementations, yet struggle to recover from the environment state they have left behind, causing tasks to fail. The authors believe that manually injected errors may not match the distribution of the agent's own errors, and existing recovery training only performs SFT.
Methods
ReTerm first uses the base model to collect failure snapshots, has DeepSeek-V4-Pro continue them, applies a four-step filter to obtain ReTerm-10K, and performs SFT. ReTerm-GRPO then splits multiple recovery attempts from the current policy's failure states and performs group-relative updates based on task verifier results.
Experiments and results
ReTerm-9B achieves a Pass@1 of 34.8% on Terminal-Bench 2.0 and 58.4% on SWE-bench Verified; the authors state this is 14.6 and 13.2 points higher than the base model under the same harness. Except for tool use errors, recovery rates are 32% or below.
Limitations and future work
The paper does not specifically discuss limitations. The experiments cover self-run Qwen3.5-9B and ReTerm-9B, three main benchmarks and four out-of-domain benchmarks, four harnesses, and four training ablations on Terminal-Bench 2.0. The queue capacity K and the number of evaluation repetitions are not reported.

Related events and news

1 events · 1 news mentions

News that mentions this paper

ReTerm用自身失败驱动Code Agent自我改进

Read originalhuggingface.co