T1: Terminal Agent Reinforcement Learning for Long-Horizon Tasks

Junyao Yang, Yucheng Shi and colleagues at Tencent's Hy Foundation Model Frontier team (with NUS, Georgia, Indiana and Maryland) train T1, a 122B-total MoE model, with RL in a real cloud shell for up to 300+ tool-call turns per task, and raise Terminal-Bench 2.1 from 43.8% to 64.0%.
Ask this paper
Setup: The agent operates a real shell in a cloud sandbox, and each task's own verifier supplies the reward.
Stable actor-critic training: An aggressive warm start plus a dense process reward that counts how many verifiers pass along the trajectory.
Train-inference alignment: TITO trains on the exact sampled token ids with drift repair at turn boundaries, and rollout routing replay records the sampler's expert choice at every MoE layer and replays it in training. Together they cut the train-inference log-probability gap from 0.021 to 0.013 with zero token drift in the loss region.
Out-of-distribution data: Training seeds and synthesized tasks are disjoint from Terminal-Bench 2.1, so benchmark gains reflect transfer rather than overfitting.
Results: Terminal-Bench 2.1 rises from 43.8% for the base model to 64.0%, and T1 reaches 27.9% on Long-Horizon Terminal Bench, ahead of GPT-5.4 and GLM-5.1.
Abstract
Agent usage is shifting toward long-horizon tasks such as coding and scientific discovery, among which terminal tasks are especially important. We introduce T1, a Mixture-of-Experts model of 122B total trained with reinforcement learning, operating a real shell in a cloud sandbox for up to 300+ tool-call turns per task, rewarded by executing each task's own verifier. We provide a comprehensive recipe: First, an aggressively warm-started to stabilize actor-critic training, with a dense process reward scoring trajectories by the absolute number of passing verifiers. Second, stable optimization through TITO construction, training on the exact sampled token identifiers with drift repair at turn boundaries, and rollout routing replay, recording the sampler's per-token expert choices at every MoE layer and replaying them during training. Third, fully out-of-distribution training corpus: isolated seeds and synthesized tasks disjoint from Terminal-Bench 2.1 ensures gains reflect genuine capability transfer over benchmark overfitting. Together, TITO and R3 cut the training-to-inference log-probability difference from 0.021 to 0.013, with exactly aligned zero token drift in the loss region. On Terminal-Bench 2.1, our post-train pipeline raises initial base model from 43.8% to T1 with 64.0% resolved. On Long-Horizon Terminal Bench, T1 reaches 27.9% and surpasses GPT-5.4 and GLM-5.1.