👀 About ReTerm
We introduce ReTerm, a self-improving terminal agent trained to recover from errors produced during its own execution.
We construct ReTerm-10K, a high-quality recovery trajectory dataset generated through a dedicated data pipeline for SFT cold start. Moreover, we propose ReTerm-GRPO, an online RL algorithm that branches into multiple independent self-recovery attempts from the agent's own failure states. Their verifier outcomes provide group-relative learning signals, enabling the agent to self-improve through its own recovery experience.
Built on Qwen3.5-9B, ReTerm-9B demonstrates strong performance on challenging terminal and software engineering tasks, with generalization across out-of-domain benchmarks and different agent harnesses.
ReTerm-9B achieves strong results on terminal and software engineering benchmarks:
Table with columns: Benchmark, Pass@1| Benchmark | Pass@1 |
|---|
| OpenThoughts-TBLite | 60.6% |
| Terminal-Bench 2.0 | 34.8% |
| SWE-bench Verified | 58.4% |
| AIME 2024 | 86.7% |
| AIME 2025 | 93.3% |
| Aider Polyglot | 20.4% |
| SpreadsheetBench Verified | 48.8% |
Beyond these core evaluations, ReTerm also generalizes to out-of-domain tasks, including mathematical reasoning and spreadsheet processing. The improvement trend persists across different agent harnesses, suggesting transferable capabilities across interaction setups.
🎥 Recovery Example
🔧 Using the model
ReTerm-9B can be loaded with Qwen3.5-compatible inference frameworks. For terminal-agent use, apply the Qwen3.5 chat template and tool-call protocol with an agent harness that executes commands and returns environment observations. Training code and configurations are available in the ReTerm repository.