TerminalHorizon: 27 Behavioral Patterns Power 12-Hour Autonomous Agents
Researchers from USTC and Alibaba DreamX introduce TerminalHorizon, an automated data synthesis engine that generates 2,852 long-horizon training trajectories across 25 domains and 27 behavioral patterns, enabling Qwen3.5-27B to achieve 60.67% on Terminal-Bench 2.1 and sustain 12-hour autonomous research in RSI exams.
Introduction
Researchers from the University of Science and Technology of China (USTC) and Alibaba DreamX have open-sourced TerminalHorizon , a fully automatic data synthesis engine for long-horizon terminal agents. The core idea is that high-quality long-horizon experience must capture how behavioral patterns — exploration, judgment, strategy adjustment, and verification — intertwine across phases around a single goal.
To realize this, the team constructed 1,535 executable task environments covering 25 professional domains (software engineering, chip electronics, physics/astronomy, educational assessment, etc.) and collected 2,852 filtered training trajectories (TerminalHorizon-3K). Fine-tuning Qwen3.5-27B on this dataset yields TerminalHorizon-27B , which improves on all 12 evaluation benchmarks. On Terminal-Bench 2.1 the score rises from 46.82% to 60.67% .
Agentic Behavioral Patterns: 27 Patterns Across 5 Categories
The paper defines agentic behavioral patterns as the ways an agent organizes its problem-solving process. These are grouped into five categories (27 patterns total):
Information exploration & judgment
Diagnosis & correction
Construction & work advancement
Verification & result establishment
Strategy & execution coordination
These patterns are not a fixed sequence; task progress and emerging evidence determine when the agent re-diagnoses, changes implementation, or adds verification. A TLS gateway repair case illustrates this: the agent first compares direct vs. retry paths to fix routing; then discovers missing client identity and adds configuration; gateway logs showing 84 bytes of data redirect diagnosis to request reading and connection handling. Implementation, checking, and correction interweave repeatedly, ending with regression tests that verify both response delivery and invalid-client rejection.
Figure 2: Behavioral connections in TLS gateway repair trajectory. Upper part shows solving fragment, lower part shows how different patterns span multiple steps and interlock. From paper appendix case figure (a).
Two-Phase Data Synthesis
Phase 1: Challenge-Guided Long-Horizon Synthesis
The system starts from real work requirements, then constructs instructions, environment, reference solution, and verifier. An independent agent (not involved in construction) executes the task using only public instructions and environment. The system compares the actual trajectory with the expected work, identifies where exploration, implementation, or verification were prematurely simplified by the initial materials, rebuilds the environment, and re-runs verification.
Figure 3: TerminalHorizon overall pipeline.
Phase 2: Progressive Scope Extension
Along the same goal, new requirements are introduced so that new work depends on prior judgments, actions, and results. For example, a hotel event scheduling task gradually adds personnel transition, venue closure, and equipment transport constraints. A venue change ripples to other activities; equipment may appear free but be unavailable due to disassembly, transport, and installation time. The agent must adjust earlier arrangements based on this feedback. Early decisions affect later execution, and later verification may require revisiting earlier steps.
Dataset Statistics
Using DeepSeek-V4-Pro-0813 as the teacher model and Terminus2 as the execution framework, two trajectories were collected per environment and filtered to 2,852. A benchmark decontamination check was performed before training.
Figure 4: Comprehensive analysis of environments and trajectories, including domain coverage, initial materials, interaction span, and behavioral pattern diversity.
Under the same teacher protocol, 300 tasks per method were re-run. Other methods averaged 3.87–15.60 interaction turns ; TerminalHorizon averaged 52.82 turns (median 40, 90th percentile 98). Trajectories contain an average of 8.6 core behavioral patterns , and the longest continuous action chain linked by terminal feedback has a median length of 25 turns , demonstrating sustained use of feedback to drive work forward.
Figure 5: Comparison of interaction turns under unified teacher protocol; longer processes contain sustained actions and environment feedback.
Training Results: <3K Trajectories Boost 12 Benchmarks
Supervised fine-tuning of Qwen3.5-27B on TerminalHorizon-3K produces TerminalHorizon-27B, which outperforms the base model across three categories (terminal tasks, real-world productivity, general reasoning) and 12 benchmarks.
Original paper Table 1: Terminal-Bench 1.0 and 2.0 results and comparison with existing methods. † marks base model scores from official model cards.
Original paper Table 2: Terminal tasks, real-world productivity, and general reasoning results, retaining AutomationBench Pass Rate and Partial metrics. Parentheses show percentage point improvements.
With the same base model (Qwen3.5-27B) and framework (Terminus2), Terminal-Universe-27B uses ~32K trajectories and scores 52.8% on Terminal-Bench 2.0; TerminalHorizon-27B uses only 2,852 trajectories and scores 55.8% — 3.0 percentage points higher with less than one-tenth the data .
Scaling Across Model Sizes
On Terminal-Bench 2.1, three model sizes all show double-digit gains:
Qwen3.5-27B: 46.82% → 60.67% ( +13.85 pp )
Qwen3.5-35B-A3B: 39.70% → 52.81% ( +13.11 pp )
Qwen3.5-122B-A10B: 49.06% → 64.04% ( +14.98 pp )
Figure 6: Results under different model sizes and training data amounts. Left: improvements for three model sizes; Right: performance as training trajectory count increases.
Scaling with Data Quantity
Performance continues to rise with more trajectories (no saturation observed in the tested range):
1,000 trajectories → 57.30%
2,000 trajectories → 58.43%
2,852 trajectories → 60.67%
12-Hour RSI Exam: Sustained Autonomous Research
Beyond standard benchmarks, the team evaluated on RSI-Exam with four tasks (point cloud fusion, warehouse robot path optimization, tidal seabed friction field inversion, 2048 strategy optimization). Each task provides a 12-hour research budget ; agents can stop early but cannot see hidden test results.
In all four runs, the base model stopped early (three within ~1.3 hours: point cloud fusion ~12.1 min, tidal inversion 1.12 h, 2048 optimization 1.28 h). TerminalHorizon-27B ran the full 12 hours in every case , demonstrating acquired persistent exploration capability.
Point Cloud Fusion Case Study
The base model aligned other views to a reference view, kept points near the reference, achieved a proxy F-score of 0.8994, and concluded the result was good, stopping at ~12.1 minutes. However, proximity to one reference view does not guarantee full scene reconstruction — surfaces unique to other views may be missed.
TerminalHorizon-27B also reached a high proxy score (~0.989) but continued: it checked which views the selected points came from, questioned whether the metric merely rewarded copying the reference, and introduced a leave-one-view diagnosis that exposed coverage gaps. This drove improved cross-view alignment, global refinement, and confidence-based point selection. The process simultaneously revised the solving method and the validation experiments. Final hidden-test average F-score rose from 48.04 to 77.68 ; normalized reward from 21.93 to 48.96 .
Figure 7: Point cloud fusion research process in RSI case.
Original paper Table 5: Final hidden set scores and actual research durations for four RSI cases. Scores are native normalized reward ×100; research duration excludes environment preparation and final verification.
Conclusion & Open Resources
TerminalHorizon focuses long-horizon data design on behavioral patterns and their cross-phase dependencies: evidence from exploration supports later judgments; verification findings guide strategy adjustments; intermediate results become the basis for continued work. The environments preserve the substantive work behind these behaviors.
The project has open-sourced task environments, training trajectories, and models to facilitate further research on how long-horizon experience affects agents' autonomous work capabilities.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
SmartApe AI
SmartApe's AI technology content account, focusing on cutting-edge AI developments and open-source frontlines.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
