← Back to Paper Radar

Recursive Synthesis for Long-Horizon Terminal Tasks

Zhongzhi Li, Yucheng Shi, Zongxia Li, Ruhan Wang, Anhao Li, Zixun Huang, Junyao Yang, Lei Ke, Ninghao Liu, Haitao Mi, Leowei Liang
2026

Reading guide · Based on sections of the original paper

The authors present RST, a pipeline that repeatedly lengthens a verified terminal task's reference solution, realigns its verifier and instruction, and re-validates it in a sandbox. Over fifteen rounds it produced 37,484 tasks at about $0.05 each, and the tasks grew steadily harder.

Why read this

Practitioners building SFT or RL data for terminal agents get a cheap, solution-first recipe for scaling long-horizon tasks, plus a matched-budget comparison against public datasets.

What the authors found

  • The authors matched supervision at 36,363,275 assistant-loss tokens across six SFT datasets, tokenized for Qwen3.5. RST-only trajectories scored 46.82/27.67/21.90 on TB2, TB Hard and LHTB. LiteCoder-Terminal-SFT scored 42.70/24.33/20.00 and SETA-SFT scored 40.45/22.67/18.80. Smaller public datasets were looped to reach the budget. 5.6 Comparison Against Public Terminal-Agent SFT Datasets Under Matched Supervision Budget
  • SFT on rejection-sampled Qwen3.5 trajectories drawn from successive rounds improved both models relative to their base checkpoints. After three stages, Qwen3.5-122B-A10B rose from 20.0% to 30.0% on TB Hard, and Qwen3.5-27B rose from 18.1% to 22.4% on LHTB partial credit. Early-stage gains fall within the reported standard deviations; for example, Round 1 on TB2 is 42.32±4.68. 5.5 Supervised Fine-Tuning Results
  • PPO training on all 37,484 tasks, with a critic warm-loaded from a prior terminal-agent checkpoint, raised Qwen3.5-27B above its base scores of 41.20/22.67/18.10. Results are averaged over three evaluation runs. DeepSeek-V4-Pro remains stronger. The conclusion states a 11.82% TB2 gain, but the table gives 20.00%. 5.7 Terminal Agentic Reinforcement Learning Results

Main limitation

Diversity erodes as rounds accumulate. Median within-round nearest-neighbor similarity roughly doubles from R1 to R15, and the 95th-percentile similarity reaches 0.703. Bootstrap-seed coverage falls to 60.1%, and the RL pool keeps rewrite variants without deduplication. These measurements weaken the authors' claim of 'no ceiling'. 5.4 Data Diversity and Duplication Analysis

Where to start

5.6 Comparison Against Public Terminal-Agent SFT Datasets Under Matched Supervision Budget · Check the full matched-token table and preprocessing to judge whether the gains over the public SFT datasets are fair and robust.

Abstract

High-quality long-horizon training data for terminal agents is expensive to produce, often costing hundreds to thousands of dollars per task, because each task must keep the instruction, environment, reference solution, and verifier mutually consistent. Human authoring does not scale, and direct generation with large language models (LLMs) often breaks these dependencies. We present Recursive Synthetic Terminal Tasks (RST), a recursive verified synthesis framework for constructing long-horizon terminal-agent tasks at scale. Starting from verified seed tasks, RST extends the reference solution, realigns the verifier and instruction to the new workflow, validates the result in a fresh sandbox, and reuses accepted tasks as seeds for subsequent rounds. Across fifteen recursive rounds, RST produces 37,484 synthesized terminal-agent tasks at roughly $0.05 per task. Task difficulty increases substantially over rounds: the median reference solution grows from 67 to 374 lines, the median number of executed commands grows from 40 to 244, and DeepSeek-V4-Pro pass@4 drops from 90% at R1 to 2.5% at R15. To demonstrate training utility, we collect rejection-sampled Qwen3.5 trajectories on the synthesized tasks and use them for supervised fine-tuning. Fine-tuning on these trajectories improves Qwen3.5-27B and Qwen3.5-122B-A10B by up to 10 points on Terminal-Bench 2, Terminal-Bench Hard, and Long-Horizon Terminal Bench, while agentic PPO lifts Qwen3.5-27B to 49.44%, 32.00%, and 22.07% on the three benchmarks, corresponding to relative gains of 20.0%, 41.2%, and 21.9% over the base model. Moreover, after 15 rounds, the recursion shows no ceiling: synthesis yield and validation rates remain stable as difficulty keeps climbing, indicating that the process can continue well beyond the scale reported here.

Generated automatically from paper sections on 2026-11-28.