Scaling Agentic Data for Long-Horizon Terminal Intelligence: TerminalHorizon Fine-Tunes a 27B Model on About 3K Long Trajectories and Improves on All 12 Benchmarks

Published · AI Daily — AI-assisted deep research, methodology & disclosure

This paper from an intern team at Alibaba's AMAP presents TerminalHorizon, a fully automated data-synthesis engine for long-horizon terminal agents. Independent execution first finds the key work that environment construction already did for the agent, and tasks are then expanded under the same goal. With 1,535 task environments and 2,852 trajectories, Qwen3.5-27B reaches 55.0%, 55.8% and 60.67% on Terminal-Bench 1.0, 2.0 and 2.1 after supervised fine-tuning. The results are the authors' own, with no independent replication.

A terminal agent is an agent that works in a command-line environment by itself: it reads files, runs commands, edits code, looks at the output and decides what to do next. As such agents move from local operations to real professional tasks, the quality of training data becomes the bottleneck. Paper 2610.13166, from an intern team at Alibaba's AMAP, is titled "Scaling Agentic Data for Long-Horizon Terminal Intelligence". Its core view is that short trajectories can teach an agent to type commands and call tools, but not how, within one full problem-solving process, to gather evidence, make judgments, keep adjusting strategy on feedback and turn interim results into a final deliverable. High-quality long-horizon trajectories keep these behavior patterns and their links inside a single process, which gives the agent richer experience.

Building such data has a hidden trap. The paper points out that when environments are synthesized, the key work the agent was meant to do is often completed or simplified in advance. For example, if a task asks the agent to implement a core function that the environment already provides, the remaining work may reduce to changing one constant, and the exploration, implementation and verification disappear, so the trajectory teaches nothing. Longer tasks or more interaction turns do not automatically extend these patterns or strengthen their links either. The challenge is to find and add new requirements that go beyond the original solution while keeping the same goal, and to make the added work build on earlier judgments, actions and results, so the patterns continue to develop as the task goes on.

TerminalHorizon works in two stages, fully automated. In the first stage, it builds executable terminal task environments from real professional work. It then uses independent execution to identify key work omitted during construction and uses the resulting evidence to guide reconstruction, so that the work that belongs to the agent returns to the task. In the second stage, it progressively expands accepted tasks under the same goal and adds requirements that depend on the previous stage's results, which calls for further exploration and improvement, so behavior patterns extend across stages. An appendix example is a photo-library sync task, where one parent task splits into two three-generation branches and the new requirements move from a one-way import to a second synchronization with independent edits, and then to handling retirement and restoration. With this engine the authors built TerminalHorizon-3K, with 1,535 task environments and 2,852 training trajectories. Each trajectory has 8.6 core patterns on average, spanning exploration, construction, error correction and verification.

On results, supervised fine-tuning of Qwen3.5-27B gives TerminalHorizon-27B, which the paper says beats the base model on all 12 benchmarks covering terminal tasks, real production tasks and general reasoning. On Terminal-Bench 1.0 (80 tasks), 2.0 and 2.1 (89 tasks each) it scores 55.0%, 55.8% and 60.67%, and the paper reports gains over the base of 8.7, 14.2 and 13.85 in percent. Each task is run three times independently and the mean pass@1 is reported, with three hours per task and Daytona or E2B sandboxes. On real productivity tasks, AutomationBench pass rate rises 11.7% and partial score 23.3%, and VitaBench rises 11.3%. It also beats Terminal-Universe-27B, which uses the same base and harness, by 3.0% with fewer than one-tenth as many training trajectories. The training setup is fused AdamW with a 1e-5 learning rate, 0.1 weight decay, a cosine schedule and 5% warmup.

The paper also runs several recursive self-improvement cases, each with a 12-hour research budget, to show that the model can keep experimenting after a first solution, improve its method on feedback and keep the useful improvements in its final deliverable. A few cautions when you read it. First, every number comes from the authors' own evaluation. We saw no independent replication, and we did not check whether the training details and evaluation settings are fully comparable across the systems. Second, the self-improvement cases are qualitative, not a statistical success rate. Third, the claim of higher scores from under one-tenth of the trajectories needs testing on other base models and harnesses. For teams that train agents, the most useful part may be the method: first check whether a synthesized environment has work that was done for the agent, then let the task grow under the same goal.

Sources

FAQ

What problem does the paper address?

Terminal agents are moving from local operations to real professional tasks. Short trajectories show commands and tool calls, but not how an agent gathers evidence through exploration, uses it to judge, keeps adjusting its strategy on feedback and turns interim results into a final deliverable. Worse, environment synthesis may complete or simplify in advance the key work the agent was meant to do. If a task asks for a core function that the environment already provides, the remaining work may reduce to changing a single constant, and the exploration, implementation and verification are gone.

What is the TerminalHorizon method?

It has two stages. The first builds executable terminal task environments from real professional work, then uses independent execution to find key work omitted during construction and uses that evidence to guide a rebuild. The second expands accepted tasks under the same goal, adding requirements that build on earlier results and call for further exploration and improvement, so behavior patterns connect across stages. The result is TerminalHorizon-3K: 1,535 task environments and 2,852 training trajectories, with 8.6 core patterns per trajectory on average.

How well does it work, and what are the reservations?

Supervised fine-tuning of Qwen3.5-27B gives TerminalHorizon-27B, which the paper says beats the base model on all 12 benchmarks. On Terminal-Bench 1.0, 2.0 and 2.1 it scores 55.0%, 55.8% and 60.67%, up 8.7, 14.2 and 13.85 over the base as the paper reports in percent. On AutomationBench pass rate rises 11.7% and partial score 23.3%, and VitaBench rises 11.3%. It also beats Terminal-Universe-27B, with the same base and harness, by 3.0% using fewer than one-tenth as many trajectories. These are the authors' evaluations. We saw no independent replication, and the 12-hour self-improvement cases are qualitative.