Recursive Synthesis for Long-Horizon Terminal Tasks
Abstract
High-quality long-horizon training data for terminal agents are costly to produce because the instruction, environment, reference solution, and verifier must remain aligned. Existing synthesis pipelines typically generate each task independently. We study how accepted executable tasks can be reused across rounds while checking for execution and specification errors. Recursive Synthetic Terminal Tasks (RST) applies this process to complete executable task bundles. In each round, RST extends the executable workflow of an accepted seed task, realigns the environment, verifier, and public instruction, validates the resulting candidate in a fresh sandbox, and reuses accepted candidates as seeds for the next round. Across 15 rounds, RST produces 37,484 accepted tasks while maintaining stable validation rates and broad domain and rewrite-operator coverage. Meanwhile, the median reference solution grows from 67 to 374 lines, the static command count grows from 40 to 245, and DeepSeek-V4-Pro pass@4 falls from 90% in R1 (round 1) to 2.5% in R15 (round 15). Supervised fine-tuning (SFT) on successful rollouts improves Qwen3.5-27B and Qwen3.5-122B-A10B across Terminal-Bench 2, Terminal-Bench Hard, and Long-Horizon Terminal Bench, with gains of up to 10 percentage points. Each updated checkpoint generates rollouts for the next SFT stage. Verifier-based proximal policy optimization (PPO) further raises Qwen3.5-27B to 49.81%, 32.00%, and 22.07% on the three benchmarks, corresponding to relative gains of 20.9%, 41.2%, and 21.9% over the base model. These results show that accepted executable tasks can serve both as training data and as seeds for generating progressively harder tasks. Code and the complete Terminal-Bench Hard evaluation subset are available at https://anonymous.4open.science/r/recursive-synthesis-terminal-tasks-005F. Synthesized tasks, trajectories, and checkpoints will be released upon publication.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.