# Recursive Synthesis for Long-Horizon Terminal Tasks

DevFeed: [Recursive Synthesis for Long-Horizon Terminal Tasks](<https://devfeed.tech/articles/recursive-synthesis-for-long-horizon-terminal-tasks-123194.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2608.05466>)

Author: Zhongzhi Li, Yucheng Shi, Zongxia Li, Ruhan Wang, Anhao Li, Jiaxi Li, Junyao Yang, Lei Ke, Zixun Huang, Yu Wang, Jingyuan Huang, Ninghao Liu, Haitao Mi, Leowei Liang

Published: 2026-11-09T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>), [Fine-tuning](<https://devfeed.tech/topics/fine-tuning.md>), [post-training](<https://devfeed.tech/topics/post-training.md>), [rlvr](<https://devfeed.tech/topics/rlvr.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agentic](<https://devfeed.tech/tags/agentic.md>), [authoring](<https://devfeed.tech/tags/authoring.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [commands](<https://devfeed.tech/tags/commands.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [deepseek](<https://devfeed.tech/tags/deepseek.md>), [environments](<https://devfeed.tech/tags/environments.md>), [fine-tuning](<https://devfeed.tech/tags/fine-tuning.md>), [framework](<https://devfeed.tech/tags/framework.md>), [generation](<https://devfeed.tech/tags/generation.md>), [horizon](<https://devfeed.tech/tags/horizon.md>), [instructions](<https://devfeed.tech/tags/instructions.md>), [llm](<https://devfeed.tech/tags/llm.md>), [model](<https://devfeed.tech/tags/model.md>), [process](<https://devfeed.tech/tags/process.md>), [qwen3](<https://devfeed.tech/tags/qwen3.md>), [qwen3-5](<https://devfeed.tech/tags/qwen3-5.md>), [synthesis](<https://devfeed.tech/tags/synthesis.md>), [tasks](<https://devfeed.tech/tags/tasks.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

## AI overview

Recursive Synthetic Terminal Tasks (RST) builds long-horizon terminal-agent training tasks by extending verified seed solutions, updating instructions and verifiers to match each workflow, validating tasks in fresh sandboxes, and reusing accepted tasks in later rounds. Across 15 rounds it produced 37,484 tasks at about $0.05 each; median solution length rose from 67 to 374 lines and median executed commands from 40 to 244, while DeepSeek-V4-Pro pass@4 fell from 90% to 2.5%. Rejection-sampled Qwen3.5 trajectories from these tasks improved supervised fine-tuning results by up to 10 points across three named benchmarks. Agentic PPO raised Qwen3.5-27B scores to 49.44%, 32.00%, and 22.07%, with reported relative gains of 20.0%, 41.2%, and 21.9%. The abstract reports stable synthesis yield and validation after 15 rounds, but provides no detail on the synthesis procedure or benchmark setup.

## Source excerpt

arXiv:2608.05466v4 Announce Type: replace-cross Abstract: High-quality long-horizon training data for terminal agents is costly and difficult to scale, as manual authoring is expensive and direct LLM generation often produces inconsistent instructions, environments, solutions, and verifiers. 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.