T1: Terminal Agent Reinforcement
Learning for Long-Horizon Tasks
T1:面向长程任务的
终端 Agent 强化学习

A 122B MoE terminal agent trained by reinforcement learning — with stable MoE RL training framework and dense verification reward design aiming for Long-Horizon terminal tasks.

Terminal-Bench 2.1
64.0%
resolved · base 43.8% · SFT 49.4%解决率 · 底座 43.8% · SFT 49.4%
Long-Horizon Terminal Bench
27.9%
average reward · base 18.9% · SFT 23.6%平均奖励 · 底座 18.9% · SFT 23.6%
Terminal-Bench Hard
38.0%
resolved · base 20.0% · SFT 28.3%解决率 · 底座 20.0% · SFT 28.3%

01Overview概览

The Linux terminal is the sharpest test of autonomous long-horizon execution: it binds abstract planning to irreversible side effects, and every attempt is adjudicated by the task's own held-out verifier rather than by a preference model.

Linux 终端是对自主长程执行最锋利的检验:它把抽象规划绑定到不可逆的副作用上, 而每一次尝试都由任务自带的留出验证器裁决,而不是由偏好模型裁决。

We introduce T1, obtained by post-training Qwen3.5-122B-A10B with PPO on terminal tasks. Two difficulties dominate this regime, and the recipe is organized around them.

我们提出 T1:以 Qwen3.5-122B-A10B 为底座、在终端任务上用 PPO 后训练得到。 这个场景由两个困难主导,整套配方就是围绕它们组织的。

Train–inference consistency for sparse models稀疏模型的训推一致性

Experts hold most of the parameters, and a discrete router picks a small subset per token. Tiny numeric differences between the two stacks flip those selections, while the harness perturbs the token stream at every turn boundary. We fix the two axes separately: TITO for tokens, R³ for experts.

专家持有绝大部分参数,而离散路由器为每个 token 只挑出其中一小部分。两套栈之间极小的数值差异就会翻转这些选择,而 harness 又在每个轮次边界扰动 token 流。我们把这两条轴分开解决:TITO 管 token,R³ 管专家。

Dense reward from execution来自执行的稠密奖励

A rollout batch costs hundreds of sandbox-hours, yet a binary outcome returns one bit per trajectory, and our first binary-reward campaign never passed its supervised baseline. We score by the number of passing assertions on a fixed global scale, feeding a warm-started critic.

一个 rollout batch 要花掉数百沙箱小时,而二值结果每条轨迹只回报 1 bit;我们第一次二值奖励实验从未超过监督基线。我们改为按通过断言的个数在固定的全局尺度上计分,并喂给一个 warm-start 过的 critic。

Model size versus Terminal-Bench 2.1 resolved rate
Figure 1 | Performance vs. model size under the same agent harness. At 122B, T1 resolves 64.0% of Terminal-Bench 2.1, above GPT-5.4 (54.8%), DeepSeek-V4-Flash (56.9%) and Claude Opus 4.6 (63.8%), close to Claude Opus 4.7 (66.1%), and best in its size band.
图 1|同一 agent harness 下的规模—性能定位。在 122B 这一档,T1 在 Terminal-Bench 2.1 上解决 64.0%,高于 GPT-5.4(54.8%)、DeepSeek-V4-Flash(56.9%)与 Claude Opus 4.6(63.8%), 逼近 Claude Opus 4.7(66.1%),是同规模区间里最好的模型。
What this report contributes本报告的贡献
  • A 122B MoE terminal agent trained purely by RL on executed outcomes, up to 300+ tool-call turns per task.
  • A stabilization stack for large-scale sparse agentic RL: TITO, routing replay, and a warm-started critic.
  • A dense execution reward with its measured behaviour, plus the corpus audit that makes such a reward safe to optimize.
  • 一个 122B MoE 终端 Agent,纯粹用执行结果上的强化学习训练,单任务可达 300+ 次工具调用。
  • 一套面向大规模稀疏 Agent RL 的稳定化栈:TITO、路由回放,以及 warm-start 的 critic。
  • 一个稠密执行奖励及其实测行为,以及让这种奖励可被安全优化的语料审计。

02Approach方法

A training backend and inference replicas run concurrently on disjoint accelerators under slime, pipelining step t training with step t+1 generation. Our terminal-agent integration attaches additively through public extension points rather than by forking the framework.

训练后端与推理副本在互不相交的加速器上并发运行(框架为 slime), 把第 t 步的训练与第 t+1 步的生成流水化。 我们的终端 Agent 集成通过公开扩展点加法式接入,而不是 fork 框架。

The T1 training pipeline
Figure 2 | The T1 training pipeline. Left: each task is self-contained, and its verifier reports every assertion individually, which makes the reward executable rather than modelled. Middle: inference replicas serve the behaviour policy under oversampling; the assembler turns interaction logs into TITO-stitched samples carrying routing records and the dense reward; the trainer updates critic then actor before publishing weights. Right: sandboxes are created, driven turn by turn, verified and reclaimed.
图 2|T1 训练流水线。左:每个任务都是自包含的,其验证器逐条报告每一个断言, 这让奖励是被执行出来的而非被建模的。中:推理副本在过采样下提供行为策略; 装配器把交互日志变成 TITO 拼接的训练样本,并携带路由记录与稠密奖励; 训练器先更新 critic 再更新 actor,然后发布权重。右:沙箱被创建、逐轮驱动、验证并回收。

Three ingredients. Select one to open it.

三个要素。点击其中一个展开。

Recursive synthesis of terminal training tasks

No reinforcement signal can be richer than what its verifier can measure, which makes task construction a design decision rather than a preprocessing step. Based on RST, each task is self-contained: resource limits, a long-horizon instruction, an environment specification, a held-out verifier, and a reference solution the agent never sees.

The verifier is the load-bearing part, because it reports every assertion separately instead of one pass or fail. T1 trains on a selected high-quality 15K subset of RST, chosen along verifier, solution, instruction and task-value dimensions.

没有任何强化信号能比它的验证器所能测量的更丰富,这让任务构造成为一个设计决策,而不是预处理步骤。 基于 RST,每个任务都是自包含的:资源上限、一条长程指令、一份环境规格、一个留出验证器, 以及 Agent 永远看不到的参考解。

验证器是承重结构,因为它分别报告每一条断言,而不是给一个总的通过或失败。 T1 在从 RST 中挑出的高质量 15K 子集上训练, 挑选依据是验证器、解法、指令与任务价值四个维度。

  • TMax-15k — tasks converted from a public corpus. Its verifiers emit only a binary outcome, so only binary rewards are possible here.
  • RST-38k — synthesized tasks: RST iteratively extends seed solutions, realigns verifiers and instructions, and sandboxes each task before recursive seeding.
  • T1-15k — the audited pool whose verifiers report per-assertion outcomes. It is materialized in quality-rank order, so per-epoch shuffling is mandatory.
  • TMax-15k:由公开语料转换而来的任务。它的验证器只发出二值结果,所以这里只能做二值奖励。
  • RST-38k:合成任务。RST 迭代地扩展种子解法、重新对齐验证器与指令、把每个任务沙箱化,然后递归再播种。
  • T1-15k:经过审计的数据池,其验证器逐条报告断言结果。它按质量排名顺序物化,因此逐 epoch 打乱是必须的。
Category composition of T1-15k
Figure 3 | Category composition of T1-15k. Angle encodes share exactly, while radius is a rank-based scale that keeps small slices visible. The pool is concentrated in command-line engineering work, with the top five categories accounting for 67.9% of all tasks.
图 3|T1-15k 的类别构成。角度精确编码占比,而半径是基于排名的刻度,用来让小切片仍然可见。 数据池明显集中在命令行工程工作,前五类占全部任务的 67.9%。

Dataset construction and audit数据集构造与审计

The eight audit dimensions and their weights
Figure 4 | The eight audit dimensions and their weights. Aggregated by facet: Verifier 45%, Solution 25%, Instruction 20%, Task Value 10%.
图 4|八个审计维度及其权重。按面归并:验证器 45%、解法 25%、 指令 20%、任务价值 10%。

Both synthesized pools come from recursive task synthesis, which grows a curriculum rather than sampling tasks independently. Each round takes accepted tasks as seeds, picks a feasible rewrite operator, extends the reference solution with additional executable steps, then aligns the environment, verifier and public instruction to that longer workflow. Because difficulty is added to the executable path before the instruction is rewritten, horizons lengthen without the task degenerating into a longer prompt over the same behaviour.

Synthesis yield alone does not make a pool a usable RL signal, so T1-15k is the subset surviving an LLM audit. Instruction–verifier alignment carries the largest single weight: a mismatch between the public instruction and what the held-out verifier enforces is a hidden requirement, and it makes the task unusable because the agent is punished for failing a criterion it was never shown. The rest of the weight splits between verifier quality and solution quality, and tasks are hard-rejected for hidden requirements, test leakage, solution shortcuts, or verifiers too weak to validate the goal.

两个合成池都来自递归任务合成:它培育课程,而不是独立采样任务。 每一轮把已被接受的任务作为种子,选择一个可行的改写算子,用额外的可执行步骤扩展参考解, 再把环境、验证器与公开指令对齐到这条更长的工作流。 因为难度是先加在可执行路径上、然后才重写指令,horizon 会变长, 而任务不会退化成「同样行为的更长 prompt」。

合成产量本身不足以让一个池成为可用的 RL 信号,所以 T1-15k 是通过 LLM 审计后留下的子集。 指令与验证器的一致性是单项权重最高的维度: 公开指令与留出验证器所强制内容之间的不匹配就是「隐藏需求」,它会让任务彻底不可用 ——因为 Agent 会因为一条它从未被展示的判据而受罚。 其余权重分给验证器质量与解法质量;任务在四类问题上被硬性拒绝: 隐藏需求、测试泄漏、解法投机,以及验证器弱到无法验证任务目标。

Selection: five stages over 15 rewrite rounds筛选:跨 15 轮改写的五个阶段

Aggregation with lineage; static pre-check with executable validation; a semantic pass that accepts, flags or rejects each task; an instruction-only repair that leaves the tests untouched; and a re-audit.

带血统信息的聚合;静态预检加可执行校验;对每个任务做通过、边界或拒绝判定的语义审查; 只改指令、不动测试的修复;以及一次复审。

03Results结果

Three held-out suites, none contributing tasks to any training pool: Terminal-Bench 2.1 (89 tasks, fraction resolved), Long-Horizon Terminal Bench (46 hard tasks paying continuous partial credit, reported as average reward), and Terminal-Bench Hard (100 tasks from an independently constructed, harder distribution).

三个留出套件,都没有向任何训练池贡献任务:Terminal-Bench 2.1(89 个任务,报告解决率)、 Long-Horizon Terminal Bench(46 个困难任务,给连续部分分,报告平均奖励)、 以及 Terminal-Bench Hard(100 个任务,来自独立构造且更难的分布)。

All suites run one configuration: Terminus-2 hosted by Harbor, thinking disabled, proactive context compaction on, a fresh cloud sandbox per trial, and 3 attempts per task averaged. Two starting checkpoints appear: the base model and an SFT checkpoint denoted RST.

三个套件跑同一套配置:由 Harbor 承载的 Terminus-2,关闭显式 thinking,开启主动上下文压缩, 每个试验一个新建的云沙箱,每任务 3 次尝试取平均。 实验中出现两个起点 checkpoint:base 模型与记作 RST 的 SFT checkpoint。

Performance comparison across Terminal-Bench 2.1 and Long-Horizon Terminal Bench
Figure 9 | Performance comparison. Upper block: evaluated under the same harness as ours. Lower block: public leaderboard rows under other harnesses, shown for context only, since harness choice materially changes scores — Claude Opus 4.6 scores 70.1% under Claude Code against 63.8% under Terminus-2. A solidus denotes a size not recorded.
图 9|性能对比。上半区在与我们相同的 harness 下评测; 下半区是其他 harness 下的公开榜单行,仅作参照——因为 harness 选择会实质性地改变分数: Claude Opus 4.6 在 Claude Code 下为 70.1%,在 Terminus-2 下为 63.8%。斜杠表示规模未记录。
Terminal-Bench 2.1 standing of T1 against frontier models
Figure 10 | Terminal-Bench 2.1 standing. Blue bars trace our own pipeline: base 43.8%, the SFT checkpoint we initialize from 49.4%, and T1 after RL 64.0%. SFT contributes 5.6 points and RL a further 14.6 points, so roughly three-quarters of the distance from base to final is earned by reinforcement learning on terminal tasks rather than by imitating demonstrations.
图 10|Terminal-Bench 2.1 上的定位。蓝色条描出我们自己的流水线:底座 43.8%、 我们初始化所用的 SFT checkpoint 49.4%、以及 RL 之后的 T1 64.0%。 SFT 贡献 5.6 个点,RL 再贡献 14.6 个点, 也就是说从底座到最终的距离里大约四分之三是由终端任务上的强化学习挣到的,而不是由模仿示范。
Performance on Long-Horizon Terminal Bench
Figure 11a | Long-Horizon Terminal Bench. Base 18.9%, SFT 23.6%, T1 27.9%: RL adds 4.3 points and the full pipeline 9.0. T1 matches Gemini 3.1 Pro and exceeds GPT-5.4 (27.2%) and GLM-5.1 (26.7%).
图 11a|Long-Horizon Terminal Bench。底座 18.9%、SFT 23.6%、T1 27.9%: RL 增加 4.3 个点,整条流水线增加 9.0 个点。T1 与 Gemini 3.1 Pro 持平, 并超过 GPT-5.4(27.2%)与 GLM-5.1(26.7%)。
Terminal-Bench Hard resolved rate
Figure 11b | Terminal-Bench Hard. T1 resolves 38.0% against 28.3% for SFT and 20.0% for base, exceeding DeepSeek V4 Pro at 36.0%.
图 11b|Terminal-Bench Hard。T1 解决 38.0%, 而 SFT 为 28.3%、底座为 20.0%,并超过 DeepSeek V4 Pro 的 36.0%。

Longer horizons and harder distributions therefore move in the same direction as Terminal-Bench 2.1. The comparison is not uniform across benchmarks, though: Claude Sonnet 4.6 scores below T1 on Terminal-Bench 2.1 yet records 37.3% on LHTB, so long-horizon performance warrants its own evaluation rather than being inferred from one ordering.

更长的 horizon 与更难的分布因此与 Terminal-Bench 2.1 同向移动。 但跨基准的比较并不一致:Claude Sonnet 4.6 在 Terminal-Bench 2.1 上低于 T1, 却在 LHTB 上记录 37.3%,所以长 horizon 的表现值得单独评测,而不能只从一个排序去推断。

Held-out Terminal-Bench 2.1 resolved rate over training
Figure 12a | Held-out score over training. The first evaluated checkpoint already clears SFT by 6.8 points; two late increases reach 61.8% and 64.0%, both in the region where explained variance is highest.
图 12a|留出分数随训练步的变化。第一个被评测的 checkpoint 就已超过 SFT 6.8 个点; 两次后期上升分别达到 61.8% 与 64.0%,两者都落在解释方差最高的区域。
Average turns and total sequence length over training
Figure 12b | Behavioral dynamics. Turns and sequence length roughly double over training and then flatten, whereas the additive length penalty we tried produced unbounded growth.
图 12b|行为动态。轮数与序列长度在训练中大致翻倍,随后趋平; 而我们试过的加性长度惩罚则产生了无界增长。

Where the gain lands增益落在哪里

Terminal-Bench 2.1 by domain, turns and difficulty
Figure 13a | Domain, interaction length, difficulty. Average turns are 94.4 for T1 against 31.5 for SFT and 41.1 for base. All checkpoints reach 100% on Easy; Medium is 78/58/56% and Hard 33/30/20%.
图 13a|领域、交互长度与难度。平均轮数 T1 为 94.4,SFT 为 31.5,底座为 41.1。 三个 checkpoint 在 Easy 上都达到 100%;Medium 为 78/58/56%,Hard 为 33/30/20%。
Stage progression and per-domain comparison
Figure 13b | Stages and domains. RL accounts for 72.3% of the total gain from base to final; against GPT-5.6 Sol, T1 reaches 100.0% on debugging and 88.9% on system administration.
图 13b|阶段与领域。RL 占了从底座到最终总增益的 72.3%; 对 GPT-5.6 Sol,T1 在调试上达到 100.0%,在系统管理上达到 88.9%。

04Cite this work引用

If T1 is useful in your research, please cite the technical report.

如果 T1 对你的研究有帮助,请引用这份技术报告。

BibTeX
@misc{yang2026t1terminalagentreinforcement,
      title={T1: Terminal Agent Reinforcement Learning for Long-Horizon Tasks}, 
      author={Junyao Yang and Yucheng Shi and Zhongzhi Li and Ruhan Wang and Zongxia Li and Haitao Mi and Leowei Liang},
      year={2026},
      eprint={2609.11042},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2609.11042}, 
}

Also available on arXiv as arXiv:2609.11042 [cs.LG].

也可在 arXiv 上获取:arXiv:2609.11042[cs.LG]。