---
title: "Preprint: 9B agent trained to recover from its own errors improves its Terminal-Bench score"
canonical: "https://aiaulis.com/en/juttu/preprint-9b-agent-trained-to-recover-from-its-own-errors-improves-its-d2975c601db9/"
language: "en"
published: "2026-10-15T04:10:00.320176+00:00"
publisher: "AI Aulis"
label: "AI GENERATED"
---

# Preprint: 9B agent trained to recover from its own errors improves its Terminal-Bench score

**AI GENERATED** · Written by AI

arXiv, arxivdaily.com · 2 sources · Sources published: 13–14 October 2026

A research preprint reports that the Qwen3.5-9B model learned to continue from its own failed terminal run, raising its Terminal-Bench 2.0 score from 20.2 per cent to 34.8 per cent. The agent still fails to recover from most errors.

Researchers from Fudan University, the Chinese University of Hong Kong and Shanghai Jiao Tong University describe a method called ReTerm in a preprint posted on arXiv on 13 October. ReTerm trains a terminal agent to carry on from its own failed attempt. A terminal agent is a language model that works on programming tasks by issuing commands at the command line and reading their output. According to the authors, these agents often go off track after an error during long runs.

Agents are usually trained to solve a task from a clean starting point. ReTerm instead starts from the unfinished state the agent left behind. The authors ran tasks with the Qwen3.5-9B model in virtual machines and saved the machine state at the end of each failed run. The stronger DeepSeek-V4-Pro then continued the task from the restored state. It knew only that the previous attempt had failed and could not see the results of the hidden tests. The successful continuations, filtered for quality, formed the ReTerm-10K dataset of roughly 10,000 examples. The authors fine-tuned the 9B model on 6,000 of these examples and used the remaining 4,000 tasks for reinforcement learning.

For the reinforcement learning stage, the authors used ReTerm-GRPO, a method based on GRPO. In GRPO, the model attempts the same task several times, and each attempt is rewarded according to how well it does compared with the other attempts in the same group. The new element is that when one of the model's own attempts fails, its state is kept. The model then makes 16 independent attempts from that state, and the task's checker reports which of them succeeded. Recovery tasks go into a queue that processes the newest ones first, so training focuses on the model's recent mistakes.

In the authors' own measurements, ReTerm-9B solved 34.8 per cent of Terminal-Bench 2.0 tasks on the first attempt, against 20.2 per cent for the base model. Fine-tuning alone reached 25.8 per cent, and standard GRPO 28.0 per cent. On SWE-bench Verified, the score rose from 45.2 per cent to 58.4 per cent. The authors also compare their model with larger agents. However, the figures for the other models come from their own publications and were not run under the same conditions.

The improvement held when the authors swapped the agent harness, the program that drives the agent. It was largest, however, in the harness the authors used for training:

| Agent harness | Qwen3.5-9B | ReTerm-9B |
| --- | --- | --- |
| Authors' own (ReAct) | 20.2 | 34.8 |
| Terminus-2 | 22.5 | 32.6 |
| mini-SWE-agent | 19.1 | 25.8 |
| OpenHands | 15.7 | 28.1 |

Terminal-Bench 2.0, Pass@1 (%), measured by the authors.

Recovery remains difficult. In the authors' error analysis, ReTerm recovered more often than a model trained with standard GRPO across all five error types. Except for command usage errors, though, its recovery rate was at most 32 per cent. The DeepSeek-V4.1-Flash language model judged whether the agent had recovered, and its judgements were checked by hand. The authors say they have released the code, dataset and model on GitHub.

## What this is based on

1. [ReTerm: Recovery Training for Self-Improving Terminal Agents](https://arxiv.org/abs/2610.18484)
   Xie, Wei, Feng, Kaituo, Fu, Shiming, Liu, Yong, Yue, Xiangyu, Zheng, Shuangjia · Publisher: arxiv.org · published 13 October 2026 at 17:44 (UTC+03:00) · Paper version published: 13 October 2026 at 17:44 (UTC+03:00) · retrieved 15 October 2026 at 06:09 (UTC+03:00) · discovery channel: web
2. [ReTerm：面向自改进终端智能体的恢复训练｜arXiv 2610.18484｜arXivDaily](https://www.arxivdaily.com/papers/2610.18484)
   Publisher: www.arxivdaily.com · published 14 October 2026 · retrieved 15 October 2026 at 06:09 (UTC+03:00) · discovery channel: web

Canonical: <https://aiaulis.com/en/juttu/preprint-9b-agent-trained-to-recover-from-its-own-errors-improves-its-d2975c601db9/>

---

AI Aulis is a newspaper written and checked by artificial intelligence. No human reads the stories before publication, and AI can make mistakes: check important facts in the story's original sources. Publisher: Fiquan Holding Oy. Responsible editor: Jukka Haikala.
