Manuscript Offprint
arXiv:2610.05831Selecting Long-Horizon Trajectories for Reliable and Efficient Terminal-Agent Training
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
Terminal agents are commonly trained by imitating long teacher trajectories, yet how much of each trajectory to supervise remains unexplored. We study the supervision horizon, the number of trajectory tokens retained for training, and show that it is a key design axis for reliability and cost. Reliability improves with longer horizons but saturates: on Terminal-Bench, a 12K-token horizon solves more tasks than 16K (29 ± 0.7 vs. 26 ± 0.8) while requiring 30% less training time. The horizon also shapes agent behavior: short horizons cause premature termination, intermediate horizons yield productive error recovery, and long horizons induce over-persistence. We analyze this saturation through a bias–complexity bound, in which longer supervision reduces temporal supervision bias but increases finite-sample estimation error from more heterogeneous late-stage histories. Guided by this analysis, we propose selective long-horizon refinement, which first trains on short prefixes and then refines only on continuations that are most likely under the warm-start model. It consistently outperforms full long-horizon training. At 16K, it raises successful attempts from 110 ± 2.7 to 126 ± 2.1 and tasks solved in at least six of eight attempts from 9 ± 0.7 to 14 ± 0.6; with half of the long-horizon data, it still reaches 122 ± 2.4 while cutting training time by 23%. The gains transfer across benchmarks, from 64 ± 2.6 to 73 ± 2.1 on Terminal-Bench v2.0 and from 137 ± 2.7 to 155 ± 2.2 on OpenThoughts-TBLite. For long-horizon supervision, selecting the right trajectories matters more than training on all of them.
1 INTRODUCTION
Terminal-based coding agents such as OpenAI Codex (OpenAI, 2025) and Anthropic Claude Code (Anthropic, 2026) are becoming a common interface for software development, operating directly over terminals and repositories to execute commands, modify code, and iteratively solve tasks. Recent works have therefore begun to study how to train smaller, capable terminal agents efficiently (Pi et al., 2026; Cheng et al., 2026; Gandhi et al., 2026; Wu et al., 2026).
A common way to train terminal agents is imitation learning from teacher-generated trajectories, where the student is supervised to reproduce the teacher's actions conditioned on the preceding interaction history. These long-horizon terminal trajectories involve extended sequences of interdependent decisions in which later actions depend on earlier observations, modifications, errors, and intermediate outcomes. As trajectories unfold, the agent may need to recover from failed commands, revise hypotheses, verify in-
Table 1: Training time and accuracy across supervision horizons.
| Cutoff | 4K | 8K | 12K | 16K |
|---|---|---|---|---|
| Time (h) ↓ | 10.17 | 21.65 | 35.44 | 50.81 |
| Accuracy (%) ↑ | 24 | 25 | 29 | 26 |
intermediate results, or switch strategies based on accumulated interaction history. Training with a short horizon can therefore omit these later-stage behaviors and provide insufficient supervision for recovery, correction, verification, and strategy switching. In contrast, longer horizons expose the student to richer temporal dependencies and may improve persistence and long-range reasoning, but they also incur substantially higher training cost and introduce increasingly heterogeneous histories

B. Horizon controls Behaviors
12K (Balanced)
4K (Under-persistent)

16K (Over-persistent)
Too little
(premature termination)
Productive persistence
Excessive
(post-solution overreach)
Persistence

Supervision Horizon
Figure 1: Overview of our three main findings on effective training horizons for terminal agents. (A) Reliability Improves with Diminishing Returns: increasing the training horizon substantially improves reliability, but the marginal gains diminish beyond an intermediate sweet spot, where 12K provides a favorable balance between successful attempts, training compute, and inference length. (B) Horizon Controls Behaviors: increasing the training horizon shifts agents from under-persistence at 4K, to productive persistence at 12K, and over-persistence at 16K; theoretically, this reflects a trade-off between decreasing temporal supervision bias and increasing estimation difficulty. (C) Less is More: Quality over Quantity in Long-Horizon Training: simply training on more long-horizon trajectories is not necessarily beneficial; training on a smaller set of appropriately selected long-horizon trajectories can achieve higher reliability than using the full long-horizon data, showing that data quality matters more than data quantity for exploiting long-horizon supervision.
and more complex decision situations. As shown in Table 1, increasing the cutoff from 8K to 16K more than doubles training time, from 21.65 to 50.81 hours, while Terminal-Bench accuracy improves only marginally from 25 to 26. Moreover, the 12K model achieves the highest accuracy of 29 with 35.44 hours of training, suggesting that simply extending the supervision horizon does not yield proportional performance gains and may even exhibit diminishing returns. This motivates two important design questions that remains largely unresolved:
Q1: Is supervising the longer teacher trajectory always better?
Q2: Can selectively chosen long-horizon trajectories provide better and more efficient supervision than using all long-horizon data?
To answer these questions, we study the effective training horizon for terminal agents: a horizon that is sufficiently long to capture useful temporal dependencies, yet not so long that additional supervision becomes inefficient or counterproductive. As summarized in Figure 1, our study reveals three main findings. ① First, increasing the training horizon substantially improves reliability, but the gains diminish beyond an intermediate sweet spot, indicating that full-horizon supervision is not necessarily optimal. ② Second, the training horizon systematically shapes the agent's behavioral regime: short horizons induce under-persistence, intermediate horizons encourage productive persistence, while excessively long horizons lead to over-persistence, causing agents to continue acting unnecessarily and resulting in longer test-time inference trajectories. We further explain this intermediate optimum theoretically by decomposing the total error into two competing quantities: temporal supervision bias, which decreases as longer horizons expose the model to richer later-stage behaviors, and finite-sample estimation error, which increases as the learner must model a more complex set of long-horizon histories. The effective training horizon therefore emerges at an intermediate point that balances the decreasing temporal supervision bias against the increasing estimation error. These findings lead to a declarative answer to Q1: No, supervising a longer teacher trajectory is not always better; the effective training horizon lies in the middle. ③ Third, we show that more long-horizon data is not always better. A two-stage strategy that first trains on the full short-horizon data and then refines the model using only half of the long-horizon trajectories achieves higher reliability than full long-horizon training while reducing both training and inference costs. This leads to a declarative answer to Q2: Yes, selectively chosen long-horizon trajectories can provide more effective and efficient supervision than using the full long-horizon dataset.
Our contributions are fourfold and organized as follows. ① First, we characterize the relationship between training horizon and agent reliability, showing that reliability improves with longer supervision but exhibits diminishing returns (Section 4). ② Second, we explain this scaling behavior empirically through the notion of persistence, revealing a transition from under-persistence to productive persistence and eventually over-persistence (Section 5.1). ③ Third, we theoretically explain why longer supervision eventually exhibits diminishing returns, characterizing the effective training horizon through a trade-off between temporal supervision bias and finite-sample estimation error (Section 5.2). ④ Fourth, we propose a simple, efficient two-stage training strategy that combines full short-horizon training with selective long-horizon refinement to further improve reliability (Section 6).
Likelihood-based data selection for SFT. Data quality often matters more than quantity: LIMA (Zhou et al., 2023) shows that a small, well-chosen dataset can rival much larger ones. One line of work selects data by how well it fits the model being trained. Ren et al. (2024) show that LLM-generated responses outperform human-written ones largely because their lower perplexity makes them easier to learn, and Zhang et al. (2025) select, among candidate responses, those with the highest likelihood under the target model. Other criteria instead favor harder examples, e.g., instruction-following difficulty (Li et al., 2024), and perplexity-based pruning in pretraining finds that the best subset depends on the reference model and the retained fraction (Marion et al., 2023; Ankner et al., 2024). Reconciling these views, Cuong et al. (2026) show that the preference for high-likelihood data is not universal: in mathematical reasoning, it yields faster early gains, especially for small students, whereas low-likelihood data becomes more beneficial for larger students under longer training. These methods score whole examples, typically in single-turn settings. In contrast, we score only the newly exposed continuation ( ) of each long-horizon trajectory, using a warm-start model trained on shorter prefixes, and treat likelihood as compatibility with the learned short-horizon policy rather than as intrinsic quality.
3 BACKGROUND
3.1 TERMINAL AGENTS AS SEQUENTIAL DECISION MAKING
In this work, we formulate the interaction following the Terminus-2 scaffold (Merrill et al., 2026), which provides the model with a single headless terminal interface and requires it to complete tasks through Bash commands. This lightweight setup minimizes additional scaffold-specific mechanisms, allowing the learned sequential behavior to be more directly attributed to the underlying language model. At each interaction step , the agent observes the current terminal output and selects an action , such as executing a command, inspecting or modifying a file, installing a dependency, or running a test. The action is sampled from a policy conditioned on the complete interaction history , i.e., . A complete interaction forms a trajectory , where denotes the number of environment-level actions.
3.2 TERMINAL AGENT TRAINING AS IMITATION LEARNING
A common paradigm for training terminal agents is to learn from trajectories generated by a stronger teacher model, which can be viewed as offline imitation learning. Let denote the teacher policy and the student policy. At each step , the teacher selects an action according to , where denotes the interaction history. Rolling out the teacher policy produces a trajectory . A dataset of teacher trajectories is denoted by , where .
Given these offline demonstrations, behavior cloning trains the student to imitate the teacher action at each visited history. The student assigns probability to the teacher action observed at step , with the standard log-loss objective
3.3 FROM DECISION HORIZON TO TOKEN-LEVEL SUPERVISION
In practice, LLM-based agents are trained with supervised fine-tuning (SFT) over tokenized interaction sequences. In SFT, each action is generated autoregressively at the token level. Let denote the next-token distribution. Then,
A common cutoff at a particular decision step does not correspond to a common sequence length across trajectories. Instead, the supervision horizon is implemented as a token budget K, retaining only the prefix of the serialized trajectory within the first K tokens. Letting denote the cumulative number of tokens through action , a token budget K induces the decision horizon , which is non-decreasing in K. Throughout the empirical analysis, we therefore use the token supervision horizon K as the controllable training variable, while the theoretical analysis is expressed in terms of the induced decision horizon H.
4 EMERGENCE AND SATURATION OF RELIABILITY
We first investigate how the amount of trajectory supervision affects the reliability of terminal agents. We vary only the token-level supervision horizon while keeping the base model, underlying training trajectories, and evaluation protocol fixed. The resulting trend is clear: extending the supervision horizon initially improves both the breadth and repeatability of task solving, but the gains diminish beyond an intermediate regime. In particular, substantially longer supervision incurs considerably higher training cost without a corresponding improvement in aggregate reliability.
4.1 EXPERIMENTAL SETTING
Model and Training Data. Following prior work on terminal-agent training (Pi et al., 2026; Gandhi et al., 2026; Cheng et al., 2026; Shrivastava et al., 2026), we use Qwen/Qwen3-8B as the base model throughout our experiments. We train on trajectories from nvidia/Nemotron-Terminal-Corpus, which contains terminal-interaction trajectories generated by DeepSeek-V3.2 (Liu et al., 2025). Following Pi et al. (2026), we restrict training to completed trajectories, allowing us to isolate the effect of supervision horizon from confounding effects introduced by incomplete or imperfect trajectories. All training variants are constructed from the same underlying trajectory set, with supervision truncated at 4096, 8192, 12288, or 16384 response tokens. We refer to these settings as 4K, 8K, 12K, and 16K, respectively.
Evaluation Protocol. We evaluate the resulting models on Terminal-Bench v1.0 (Merrill et al., 2026), using the Terminus-2 agent scaffold throughout. Each task is evaluated with eight independent attempts. Repeated evaluation allows us to distinguish between coverage — whether a model can solve a task at all — and repeatability — whether it can solve the same task consistently across independent runs.
Reliability Metrics. Let be the number of successes for task . We define
where counts tasks solved in at least of eight attempts, and is the mean success count among solved tasks. We also report fragile tasks, defined by .
4.2 EXPERIMENTAL RESULTS
Reliability emerges with longer supervision. As shown in Table 2, increasing the supervision horizon from 4K to 12K substantially improves reliability. Successful attempts increase from to , while task coverage rises from to . The improvement also extends to repeated success: increases from to , and from to . In every case, the gain far exceeds the variation across evaluations. Thus, longer supervision improves both the breadth and consistency of task solving.
Table 2: Reliability across supervision horizons. Values are mean variation over four evaluations.
| Metric | 4K | 8K | 12K | 16K |
|---|---|---|---|---|
| Aggregate | ||||
| Succ. | ||||
| Repeatability | ||||
| Fragile | ||||
Reliability saturates beyond an intermediate horizon. As shown in Table 2, extending supervision from 12K to 16K yields little additional aggregate benefit. Successful attempts remain nearly unchanged ( vs. , within variation), while task coverage decreases from to and from to . However, the reliability profile shifts: the number of fragile tasks decreases from to , while increases slightly from to . Together with the higher mean success count ( vs. ), this suggests that after the reliability peak, additional supervision primarily redistributes success toward more consistent performance on already-solvable tasks rather than expanding overall coverage.
We defer task-level reliability and further analyses in Appendix B.
Takeaway 1 (Emergence-and-Saturation of Reliability). Reliability improves markedly up to an intermediate horizon, after which additional supervision mainly redistributes success from fragile to more repeatable task solving rather than increasing aggregate reliability.
5 HORIZON CONTROLS BEHAVIORS
5.1 EMPIRICAL ANALYSIS
Longer horizons strengthen reactive problem solving. We classify a successful trajectory as proactive if the target failure never manifests, and as reactive if the failure manifests but the agent subsequently diagnoses and recovers from it to solve the task; details in Section A.4. As shown in Table 3, increasing the supervision horizon consistently increases the number of successful reactive trajectories, from 61 at 4K to 83 at 16K. This suggests that longer-horizon
Table 3: Proactive vs. reactive successful trajectories across four context lengths. Proactive share peaks at 12K and declines at 16K.
| Context length | 4K | 8K | 12K | 16K |
|---|---|---|---|---|
| Proactive | 17 | 25 | 29 | 27 |
| Reactive | 61 | 72 | 82 | 83 |
| Proactive share | 21.79% | 25.77% | 26.13% | 24.55% |
Figure 2: Episodes per run for successful trials, all and reactive only across training horizons.

supervision supports successful diagnosis and recovery after errors occur. Proactive successes also increase from 17 at 4K to 29 at 12K before slightly decreasing to 27 at 16K, with the proactive share peaking at 26.13% at 12K. Overall, longer horizons are associated with more successful recovery trajectories while preserving strong proactive solving.
Longer horizons can induce over-persistence. Together, Table 3 and Figure 2 suggest that 12K provides a favorable balance between proactive and reactive behavior. At 12K, proactive successes peak at 29 (26.13% of successful trajectories), while reactive successes reach 82. It also produces the shortest successful trajectories, averaging 10.8 episodes overall and 12.6 episodes among reactive runs. Scaling to 16K yields only a marginal increase in reactive successes (82→83), while proactive successes decrease (29→27) and successful trajectories become longer on average, both overall (10.8→12.7 episodes) and among reactive runs (12.6→15.1 episodes). These results suggest that the additional persistence induced by longer supervision becomes less efficient beyond 12K and is consistent with over-persistence at 16K. We leave detailed task-specific analyses in Appendix C.
Takeaway 2 (Persistence Emerges and Eventually Overshoots). Increasing the supervision horizon is associated with more successful recovery trajectories, with the most favorable balance around 12K. Further scaling provides little additional reactive success while producing longer trajectories, suggesting over-persistence at 16K.
5.2 WHY DOES RELIABILITY SATURATE?
Longer supervision exposes later-stage behavior absent under short-horizon training, but these stages involve increasingly diverse histories. We formalize this tension as a trade-off between temporal supervision bias and finite-sample estimation difficulty. Let be the expected imitation loss over the first teacher decisions, and the empirical risk minimizer at horizon .
Definition 5.1 (Temporal supervision bias). Let be the set of prefix-optimal policies and a full-horizon optimal policy. The temporal supervision bias at horizon is
(4)
is the worst-case full-horizon risk left undetermined by supervising only the first decisions. We assume it is non-increasing in , while the horizon-induced policy complexity is non-decreasing (Lemma E.3).
Theorem 5.2 (Bias–Complexity Bound). Assume independent teacher trajectories and a bounded loss . Let , and assume the prefix-to-full-horizon transfer coefficient is bounded:
Then, with probability at least ,
The proof, assumptions, and scope are in Appendix E. The result bounds imitation risk rather than task success, so we use it as a lens on the trade-off and test it empirically.
Empirical diagnostics. The two terms in Theorem 5.2 are not directly observable, so we measure one diagnostic for each on training trajectories longer than 16K tokens. For each horizon-H model , we compute
(7)
where and we use a local window of tokens throughout. The bias proxy targets the first term, measuring how much worse a model supervised up to fits the full 16K trajectory than one supervised on all of it, thereby mirroring the truncation-induced excess risk in . The local difficulty targets the second term: tracking a short window’s likelihood as increases reveals how difficult each position becomes to model, reflecting the growing heterogeneity of late-stage histories that drives estimation burden. These quantities are diagnostics, not direct estimates of the theoretical terms (Section A.3).
Figure 3: Supervision Bias and Temporal Difficulty for the 8K, 12K and 16K models.

Cutoff / Horizon (response tokens)
As shown in Figure 3, drops substantially as the trajectory progresses, even within supervised regions (red oval regions), so later-stage behavior is harder to model. Meanwhile, : longer supervision narrows the gap to the 16K reference, consistent with the assumption that temporal supervision bias is non-increasing in . Together with Theorem 5.2, this suggests that longer supervision reduces truncation bias but adds behavior that is harder to estimate from finite data.
Interpretation. Theorem 5.2 and Figure 3 point to the same tension: longer supervision reduces the deficit caused by truncating later-stage behavior, but the newly introduced behavior is harder to estimate from finite data. This is consistent with the saturation observed in Section 4, and it motivates the selective refinement strategy in Section 6. The bound does not explain the behavioral shift toward over-persistence, which we regard as an empirical finding.
Takeaway 3 (Estimation Burden). Longer supervision reduces temporal bias but increases estimation burden by exposing the model to more heterogeneous late-stage behaviors. Empirically, supervision beyond the effective horizon coincides with over-persistence (Section 5.1).
6 SELECTIVE LONG-HORIZON REFINEMENT
Motivation & Method Overview. Longer supervision exposes useful later-stage behaviors, but training on all long-horizon continuations does not consistently improve reliability. Motivated by the bias–complexity trade-off in Theorem 5.2 and increasing temporal difficulty in Figure 3, we propose a two-stage selective refinement strategy. We first train on all trajectories up to a shorter horizon , then extend supervision to using continuations with high likelihood under the warm-start model. We interpret likelihood as compatibility with behavior learned at , rather than as a universal measure of trajectory quality. This provides a conservative way to introduce long-horizon behavior and improve the reliability–efficiency trade-off without uniformly training on difficult continuations.

Figure 4: Overview of the proposed two-stage selective long-horizon training method.
Stage I: Data Preparation. Following Section 3, let denote the offline teacher dataset, where each trajectory contains supervised response tokens. We consider two supervision horizons, , where is used for short-horizon warm-start training and for subsequent long-horizon refinement. Since scoring requires observing the complete continuation from to , we restrict the selection pool to trajectories of length at least , . For each candidate trajectory, the interval is used for likelihood-based scoring and selection.
Stage II: Short-Horizon Warm Start. We train on the full dataset with supervision truncated at :
The resulting model provides both the initialization for long-horizon training and the reference model for selecting learnable continuations.
Stage III: Continuation Scoring and Selection. For each , we score the continuation between and using the warm-start model:
Given a selection ratio , we retain the highest-scoring trajectories to form .
Stage IV: Selective Long-Horizon Refinement. Starting from the warm-start checkpoint , we continue training on with the supervision horizon extended to . Since all selected trajectories satisfy , the refinement objective is
7 EXPERIMENTS
We compare selective long-horizon refinement with one-stage training at 4K, 8K, 12K, and 16K. For 12K and 16K refinement, we warm-start from the 8K checkpoint, rank candidate continuations by likelihood under the warm-start model, and retain the top or bottom 25%, 50%, or 75% for training. All models are trained for two epochs, with each stage of two-stage training run for two epochs.
Table 5: Reliability of one-stage and selective two-stage training on Terminal-Bench v1.0. Two-stage models warm-start from 8K and refine at 12K or 16K on the highest- (Top) or lowest-likelihood (Bot.) of continuations. Values are reported with estimated run-to-run variation. Shaded: improves over one-stage training at the same horizon; green: best in row.
| Metric | One-stage | 12K refinement (from 8K) | 16K refinement (from 8K) | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| training horizon | ||||||||||||||||
| 4K | 8K | 12K | 16K | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | |
| Aggregate reliability | ||||||||||||||||
| Succ. attempts | ||||||||||||||||
| Rel | ||||||||||||||||
| Repeatability | ||||||||||||||||
| Rel | ||||||||||||||||
| Rel | ||||||||||||||||
| Rel | ||||||||||||||||
| Fragile () | ||||||||||||||||
Following Section 4, we report successful attempts, , , , , , and fragile tasks. For each checkpoint, we evaluate eight attempts per task, reporting the mean and run-to-run variation across four evaluations. Our main results use Terminal-Bench v1.0, while results on Terminal-Bench v2.0 and OpenThoughts-TBLite (Merrill et al., 2026) are deferred to Appendix D.4.
7.1 MAIN RESULTS
Selective refinement improves long-horizon training. With , Top- refinement improves over one-stage training at the same horizon (Table 5). At 12K, Top-50 increases successful attempts from to , raises from to , and reduces fragile tasks from to . At 16K, Top-75 performs best, increasing successful attempts from to , from to , and from to . These gains exceed run-to-run variation, showing that selective long-horizon supervision is more effective than uniform training.
Table 4: Training cost of one-stage and selective two-stage training. Top-50% models are warm-started from 8K; Total includes the warm-start stage. Parentheses give the change vs. one-stage training at the same horizon.
| Hor. | Strategy | #Samples | Time (h) | Total (h)↓ |
|---|---|---|---|---|
| 8K | Full | 59,408 | 21.65 | 21.65 |
| 12K | Full | 59,408 | 35.44 | 35.44 |
| 12K | Top-50% | 19,568 | 11.83 | 33.48 (-5.5%) |
| 16K | Full | 59,408 | 50.81 | 50.81 |
| 16K | Top-50% | 19,600 | 17.48 | 39.13 (-23.0%) |
Selective refinement also reduces training cost. The refinement stage uses only a third of the samples of one-stage training (19,568 vs. 59,408; Table 4). Including the 8K warm start, 8K→12K Top-50% takes 33.48 h in total, less than one-stage 12K (35.44 h) and 16K (50.81 h) training, while solving more attempts (121 vs. 111 and 110). At 16K, selective refinement cuts total training time by 23.0% (39.13 vs. 50.81 h).
7.2 ABLATION STUDY
Does high-likelihood selection improve long-horizon learnability? Figure 5 provides direct evidence that high-likelihood selection improves long-horizon learnability. At the same selection ratio, Top-likelihood models consistently achieve higher local likelihood than their Bottom-likelihood counterparts (Top-25% > Bottom-25%, Top-50% > Bottom-50%, and Top-75% > Bottom-75%). Notably, Top-25% even surpasses full 12K training around the target horizon. These results suggest that warm-start likelihood identifies continuations that are more compatible with the learned short-horizon policy and therefore easier to model during long-horizon refinement.
How much long-horizon data should be retained? Table 5 and Figure 5 show a horizon-dependent quality–quantity trade-off. At 12K, Top-25 gives the most successes ( ), while Top-50 yields slightly stronger (11 vs. 10); at 16K, Top-75 is best ( successes, ). This matches Theorem 5.2: smaller improves continuation compatibility but reduces , increasing the estimation burden . Since also grows with horizon, longer horizons require retaining more data to control estimation error.
Does likelihood-based selection matter? Likelihood-based selection matters, but its effect depends on the selection ratio and target horizon (Table 5). At 12K with , Top-50 clearly outperforms Bottom-50, with vs. successful attempts, vs. , and vs. . These gaps exceed the estimated run-to-run variation, whereas at other settings the differences narrow or reverse. Thus, likelihood is a useful compatibility signal, but should be considered jointly with the retained data and target horizon.
Figure 5: Temporal Supervision Difficulty of the base, selective 12K-refined, and full 12K models.

Cutoff / Horizon (response tokens)
Is a longer refinement horizon always beneficial? No. At , 12K-Top and 16K-Top are statistically comparable ( vs. successes; both ). At , however, extending to 16K improves successes and from to . Thus, longer refinement helps only when enough continuation data are retained.
Additional ablations. We provide other ablations, covering task-level and selection analyses, schedule/data-quantity controls, and cross-benchmark results on Terminal-Bench v2.0 and OpenThoughts-TBLite in Appendix D.
8 CONCLUSION
We study the supervision horizon in terminal-agent training and identify an emergence-and-saturation pattern: reliability improves with longer supervision but plateaus beyond an intermediate horizon. Based on this, we propose selective long-horizon refinement, using continuation likelihood to retain more learnable long-horizon trajectories while reducing unnecessary training burden.
AI Use STATEMENT
Generative AI tools were used to assist with language polishing, LaTeX formatting, and code debugging. All research ideas, experimental design, analyses, results, and conclusions were developed and verified by the authors.
ETHICS STATEMENT
This work studies the training and evaluation of terminal agents using existing datasets and benchmarks. It does not involve human subjects or personally identifiable information. While more capable terminal agents could potentially be misused for harmful automation, our work focuses on improving training reliability and efficiency rather than expanding access to harmful capabilities.
REFERENCES
Zachary Ankner, Cody Blakeney, Kartik Sreenivasan, Max Marion, Matthew L Leavitt, and Mansheej Paul. Perplexed by perplexity: Perplexity-based pruning with small reference models. In ICLR 2024 Workshop on Navigating and Addressing Data Problems for Foundation Models, 2024. URL https://openreview.net/forum?id=wNseMYxwpq.
Anthropic. Introducing claude opus 4.8. https://www.anthropic.com/news/claude-opus-4-8, May 2026. Accessed: 2026-09-20.
Zihao Cheng, Hongru Wang, Zeming Liu, Xinyi Wang, Xiangrong Zhu, Yuhang Guo, Wei Lin, Jeff Z Pan, and Yunhong Wang. Terminal-world: Scaling terminal-agent environments via agent skills. arXiv preprint arXiv:2605.20876, 2026.
Dang Cao Cuong, Hoang Anh Just, and Ruoxi Jia. Capacity-dependent effects of data selection for mathematical reasoning. In Third Conference on Language Modeling, 2026. URL https://openreview.net/forum?id=2QZkhzstnL.
Kanishk Gandhi, Shivam Garg, Noah D Goodman, and Dimitris Papailiopoulos. Endless terminals: Scaling rl environments for terminal agents. arXiv preprint arXiv:2601.16443, 2026.
Ming Li, Yong Zhang, Zhitao Li, Jihai Chen, Lichang Chen, Ning Cheng, Jianzong Wang, Tianyi Zhou, and Jing Xiao. From quantity to quality: Boosting LLM performance with self-guided data selection for instruction tuning. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 7602–7635, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.naacl-long.421. URL https://aclanthology.org/2024.naacl-long.421/.
Aixin Liu, Aoxue Mei, Bangcai Lin, Bing Xue, Bingxuan Wang, Bingzheng Xu, Bochao Wu, Bowei Zhang, Chaofan Lin, Chen Dong, et al. Deepseek-v3. 2: Pushing the frontier of open large language models. arXiv preprint arXiv:2512.02556, 2025.
Max Marion, Ahmet Üstün, Luiza Pozzobon, Alex Wang, Marzieh Fadaee, and Sara Hooker. When less is more: Investigating data pruning for pretraining llms at scale. arXiv preprint arXiv:2309.04564, 2023.
Mike A Merrill, Alexander Glenn Shaw, Nicholas Carlini, Boxuan Li, Harsh Raj, Ivan Bercovich, Lin Shi, Jeong Yeon Shin, Thomas Walshe, E. Kelly Buchanan, Junhong Shen, Guanghao Ye, Haowei Lin, Jason Poulos, Maoyu Wang, Marianna Nezhurina, Di Lu, Orfeas Menis Mastromichalakis, Zhiwei Xu, Zizhao Chen, Yue Liu, Robert Zhang, Leon Liangyu Chen, Anurag Kashyap, Jan-Lucas Uslu, Jeffrey Li, Jianbo Wu, Minghao Yan, Song Bian, Vedang Sharma, Ke Sun, Steven Dillmann, Akshay Anand, Andrew Lanpouthakoun, Bardia Koopah, Changran Hu, Etash Kumar Guha, Gabriel H. S. Dreiman, Jiacheng Zhu, Karl Krauth, Li Zhong, Niklas Muennighoff, Robert Kwesi Amanfu, Shangyin Tan, Shreyas Pimpalgaonkar, Tushar Aggarwal, Xiangning Lin, Xin Lan, Xuandong Zhao, Yiqing Liang, Yuanli Wang, Zilong Wang, Changzhi Zhou, David Heineman, Hange Liu, Harsh Trivedi, John Yang, Junhong Lin, Manish Shetty, Michael Yang, Nabil Omi, Negin Raoof, Shanda Li, Terry Yue Zhuo, Wuwei Lin, Yiwei Dai, Yuxin Wang, Wenhao Chai, Shang Zhou, Dariush Wahdany, Ziyu She, Jiaming Hu, Zhikang Dong, Yuxuan Zhu, Sasha Cui, Ahson Saiyed, Arinbjörn Kolbeinsson, Christopher Michael Rytting, Ryan Marten, Yixin Wang, Jenia Jitsev, Alex Dimakis, Andy Konwinski, and Ludwig Schmidt. Terminal-bench: Benchmarking agents on hard, realistic tasks in command line interfaces. In The Fourteenth International Conference on Learning Representations, 2026. URL https://openreview.net/forum?id=a7Qa4CcHak.
OpenAI. Introducing codex. https://openai.com/index/introducing-codex/, May 2025. Accessed: 2026-09-20.
Renjie Pi, Grace Lam, Mohammad Shoeybi, Pooya Jannaty, Bryan Catanzaro, and Wei Ping. On data engineering for scaling LLM terminal capabilities. In Deep Learning for Code: Towards Human-Centered Coding Agents, 2026. URL https://openreview.net/forum?id=BykU9KPyQ1.
Xuan Ren, Biao Wu, and Lingqiao Liu. I learn better if you speak my language: Understanding the superior performance of fine-tuning large language models with LLM-generated responses. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen (eds.), Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 10225–10245, Miami, Florida, USA, November 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.emnlp-main.571. URL https://aclanthology.org/2024.emnlp-main.571/.
Vaishnavi Shrivastava, Piero Kauffmann, Ahmed Awadallah, and Dimitris Papailiopoulos. Echo: Terminal agents learn world models for free. arXiv preprint arXiv:2605.24517, 2026.
Siwei Wu, Yizhi LI, Yuyang Song, Wei Zhang, Yang Wang, Riza Batista-Navarro, Xian Yang, Mingjie Tang, Bryan Dai, Jian Yang, and Chenghua Lin. Large-scale terminal agentic trajectory generation from dockerized environments. In Forty-third International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=PeFSCRulgy.
Dylan Zhang, Qirun Dai, and Hao Peng. The best instruction-tuning data are those that fit. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025. URL https://openreview.net/forum?id=4jFSekBaDT.
Chunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, LILI YU, Susan Zhang, Gargi Ghosh, Mike Lewis, Luke Zettlemoyer, and Omer Levy. LIMA: Less is more for alignment. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=KBMOKmX2he.
APPENDIX CONTENTS
A Setting ..... 14
A.1 Training Setting ..... 14
A.2 Evaluation Protocol and Metrics ..... 15
A.3 Empirical Measures of the Bias–Complexity Trade-off ..... 15
A.4 Proactive vs. Reactive Classification ..... 15
B Task-Level Emergence and Saturation of Reliability ..... 15
B.1 From Fragile to Repeatable Success ..... 15
B.2 Saturation as Cancellation, Not a Plateau ..... 16
C Horizon and Agent Behavior ..... 17
C.1 Longer Supervision Enables Recovery ..... 18
C.2 Beyond the Effective Horizon: Over-Persistence ..... 18
D Additional Results for Selective Refinement ..... 19
D.1 Task-Level Results ..... 19
D.2 Top- vs. Bottom-Likelihood Selection ..... 19
D.3 How do training schedule, data quantity, and likelihood selection interact? ..... 19
D.4 Results on Other Benchmarks ..... 20
E Missing Proofs ..... 22
A SETTING
This section provides the detailed setup used throughout our paper, including the training configuration, evaluation protocol, reliability metrics, and auxiliary analyses underlying the main results.
A.1 TRAINING SETTING
For the experiments in Section 4, Section 5 and Section 6, we train all models with full-parameter supervised fine-tuning using LLaMA-Factory on the Nemotron terminal-agent corpus, which contains 59,407 ShareGPT-format trajectories. The base model for one-stage training is Qwen/Qwen3-8B. Unless otherwise specified, all runs use the same hyperparameters: two training epochs, BF16 precision, DeepSpeed ZeRO-3 on four NVIDIA H100 GPUs, per-device batch size 1 with no gradient accumulation (global batch size 4), AdamW with learning rate , cosine decay without warmup, gradient clipping at 1.0, and no sequence packing. We train complete-data models with supervision cutoffs of 4,096, 8,192, 12,288, and 16,384 tokens, respectively, while keeping the underlying 59,407 trajectories fixed so that these runs isolate the effect of supervision horizon. For selective refinement, we warm-start from the complete 8K checkpoint and continue training for two additional epochs at either 12K or 16K on likelihood-filtered subsets of long trajectories. Candidate trajectories are those extending beyond 8,192 tokens and are ranked by the average teacher-forced log-probability assigned by the 8K model to assistant tokens in the newly exposed continuation, i.e., 8K–12K or 8K–16K. We retain either the highest- or lowest-likelihood 25%, 50%, or 75% of the scored trajectories, yielding approximately 9.8K, 19.6K, and 29.4K training examples, respectively. Trajectories not extending beyond 8K are excluded from the selective-refinement stage. As shown in Table 4, the 12K Top-50% setting contains slightly fewer samples than the 16K Top-50% setting because some candidate trajectories do not contain enough tokens in the required 8K–12K continuation and are therefore skipped during scoring and selection.
A.2 EVALUATION PROTOCOL AND METRICS
We evaluate all models on Terminal-Bench v1.0 using the Terminus-2 scaffold, with eight independent attempts per task. For each task , denotes the number of successful attempts; the reliability metrics , , and fragile tasks ( ) are defined in Section 4. Because each task has only eight attempts, per-task differences of one or two successes are within sampling noise; in task-level analyses we therefore interpret only large or consistent shifts.
A.3 EMPIRICAL MEASURES OF THE BIAS–COMPLEXITY TRADE-OFF
The metrics in Equation 7 are empirical diagnostics rather than estimates of the quantities in Theorem 5.2. The bias is defined through population risks over the unknown prefix-optimal set and the full-horizon optimum , while the complexity term depends on the policy class. In particular, measures the gap to the trained 16K model, itself a finite-sample estimate, rather than to , and corresponds to a single element of rather than the supremum in . We therefore construct observable metrics that capture the same intuition. Specifically, measures the full-horizon modeling gap between the empirically trained horizon-H policy and the 16K reference policy, mirroring the population risk gap in . Meanwhile, measures the average log-likelihood of a local token window on the training trajectories. Tracking this quantity as increases reveals how the empirical learnability of behavior changes deeper into the trajectory: decreasing local likelihood indicates that later-stage behavior is increasingly difficult for the learned policy to model. Thus, these metrics do not numerically instantiate the theoretical terms, but provide empirical diagnostics for the same bias–difficulty trade-off.
A.4 PROACTIVE VS. REACTIVE CLASSIFICATION
For the experiment in Section 5.1, we classify each trial according to whether the agent encounters an execution error during interaction. A trial is proactive if no genuine command error appears in any terminal observation returned to the agent, and reactive if at least one such error occurs and the agent must respond to it. We inspect the terminal observation after every interaction step, excluding the initial task prompt, and match lines against common error signatures, including Python tracebacks and *Error/*Exception, command not found, No such file or directory, permission and access failures, fatal/error, segmentation faults, missing modules, syntax errors, linker failures, FAILED, Killed, connection failures, and apt E: messages. To avoid false positives, we ignore lines that merely echo the agent's own commands or code, harness/parser messages about response formatting, and warnings. This classification is independent of task outcome: a resolved trial may therefore be either proactive, meaning it succeeds without encountering an error, or reactive, meaning it succeeds after encountering and recovering from an error. The procedure is intentionally mechanical and identifies whether an error occurred, rather than inferring how the agent reasoned about it.
B TASK-LEVEL EMERGENCE AND SATURATION OF RELIABILITY
Aggregate metrics in Section 4 summarize how reliability changes with the supervision horizon but not which tasks drive the change. Table 6 reports per-task successes for all twelve configurations; this section uses the four one-stage columns, and Appendix D discusses the selective ones. With eight attempts per task, differences of one or two successes are within sampling noise (Appendix A.2), so we focus on large or consistent shifts.
B.1 FROM FRAGILE TO REPEATABLE SUCCESS
At 4K, success is sparse and fragile: 15 of the 24 solved tasks succeed in only one or two of eight attempts. Extending the horizon to 12K mostly moves tasks up the reliability distribution rather than adding isolated successes. For example,
Table 6: Task-level reliability across one-stage and selective training. Each cell reports the number of successful attempts out of eight; shading scales with success count (1 3 5 8), and · denotes zero. T/B denote selection of the highest-/lowest-likelihood continuations during refinement. #Runs counts the configurations (out of 12) that solve each task at least once; green marks the best value in each summary row.
| Task | One-stage | 12K refinement | 16K refinement | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4K | 8K | 12K | 16K | T50 | B50 | T75 | B75 | T50 | B50 | T75 | B75 | #Runs | |
| Solved by all 12 configurations | |||||||||||||
| crack-7z-hash.easy | 4 | 1 | 6 | 4 | 3 | 6 | 6 | 5 | 4 | 8 | 6 | 7 | 12 |
| create-bucket | 1 | 3 | 2 | 3 | 2 | 3 | 4 | 2 | 3 | 3 | 1 | 6 | 12 |
| csv-to-parquet | 8 | 8 | 8 | 7 | 8 | 7 | 8 | 8 | 8 | 8 | 8 | 8 | 12 |
| extract-safely | 5 | 7 | 8 | 8 | 7 | 7 | 8 | 6 | 8 | 8 | 8 | 7 | 12 |
| fibonacci-server | 2 | 2 | 3 | 4 | 8 | 5 | 5 | 5 | 7 | 6 | 7 | 6 | 12 |
| fix-pandas-version | 7 | 7 | 8 | 8 | 8 | 8 | 8 | 7 | 8 | 8 | 8 | 8 | 12 |
| fix-permissions | 7 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 7 | 8 | 8 | 8 | 12 |
| git-workflow-hack | 2 | 3 | 7 | 3 | 5 | 4 | 3 | 3 | 3 | 5 | 7 | 6 | 12 |
| grid-pattern-transform | 1 | 2 | 1 | 2 | 5 | 1 | 1 | 3 | 2 | 2 | 1 | 1 | 12 |
| hello-world | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 12 |
| heterogeneous-dates | 5 | 8 | 4 | 6 | 8 | 5 | 3 | 4 | 6 | 6 | 6 | 6 | 12 |
| incompatible-python-fasttext | 2 | 3 | 2 | 2 | 1 | 3 | 2 | 6 | 3 | 5 | 3 | 3 | 12 |
| incompatible-python-fasttext.base_with_hint | 2 | 4 | 8 | 6 | 6 | 3 | 6 | 8 | 8 | 7 | 8 | 5 | 12 |
| modernize-fortran-build | 2 | 3 | 3 | 7 | 5 | 5 | 5 | 2 | 4 | 6 | 7 | 1 | 12 |
| new-encrypt-command | 2 | 2 | 5 | 4 | 5 | 6 | 6 | 6 | 6 | 6 | 7 | 5 | 12 |
| simple-web-scraper | 2 | 8 | 3 | 5 | 6 | 5 | 5 | 8 | 7 | 4 | 7 | 7 | 12 |
| sqlite-with-gcov | 1 | 2 | 4 | 2 | 6 | 4 | 5 | 4 | 5 | 5 | 3 | 4 | 12 |
| swe-bench-langcodes | 5 | 6 | 7 | 6 | 7 | 7 | 8 | 5 | 8 | 7 | 8 | 4 | 12 |
| Solved by a subset of configurations | |||||||||||||
| configure-git-webserver | . | 1 | 1 | 2 | 2 | 1 | 1 | 2 | 2 | . | 2 | 1 | 10 |
| crack-7z-hash | . | . | 4 | 5 | 3 | 4 | 4 | 3 | 3 | 1 | 4 | 3 | 10 |
| vim-terminal-task | 4 | 5 | 1 | 3 | 1 | 1 | 4 | 1 | . | . | 1 | 1 | 10 |
| conda-env-conflict-resolution | . | . | 1 | 1 | 1 | 1 | 2 | 1 | 1 | . | 2 | 1 | 9 |
| blind-maze-explorer-algorithm | . | 1 | . | . | 1 | 2 | . | 2 | 1 | 1 | . | 1 | 7 |
| processing-pipeline | . | 1 | 1 | . | 2 | 3 | 3 | 2 | 1 | . | . | . | 7 |
| blind-maze-explorer-algorithm.hard | 1 | 2 | . | 1 | . | . | . | 1 | 2 | . | . | 1 | 6 |
| get-bitcoin-nodes | 2 | . | 1 | 1 | . | 1 | 1 | 1 | . | . | . | . | 6 |
| tmux-advanced-workflow | 2 | . | 1 | . | . | . | 1 | 1 | . | 1 | 2 | . | 6 |
| blind-maze-explorer-5x5 | . | . | . | 2 | 3 | 1 | . | 1 | . | . | . | 1 | 5 |
| oom | 2 | . | 1 | . | . | 2 | . | 2 | . | . | 1 | . | 5 |
| simple-sheets-put | . | . | . | . | . | . | 1 | 1 | 1 | 2 | 2 | . | 5 |
| git-multibranch | 1 | 1 | . | . | . | . | . | . | 1 | . | 1 | . | 4 |
| openssl-selfsigned-cert | . | . | 3 | 2 | . | . | . | 1 | 4 | . | . | . | 4 |
| fix-git | . | . | 1 | . | . | 1 | . | . | . | . | . | 1 | 3 |
| password-recovery | . | 1 | . | . | . | . | . | . | . | 2 | . | 1 | 3 |
| blind-maze-explorer-algorithm.easy | . | . | 1 | . | 1 | . | . | . | . | . | . | . | 2 |
| prove-plus-comm | . | . | . | . | . | . | 1 | . | 1 | . | . | . | 2 |
| crack-7z-hash.hard | . | . | . | . | . | . | . | . | . | 1 | . | . | 1 |
| decommissioning-service-with-sensitive-data | . | . | . | . | . | . | . | . | . | . | . | 1 | 1 |
| eval-mteb | . | . | . | . | . | . | . | . | . | . | . | 1 | 1 |
| eval-mteb.hard | . | . | . | . | . | . | . | . | . | . | . | 1 | 1 |
| organization-json-generator | . | . | . | . | . | . | 1 | . | . | . | . | . | 1 |
| path-tracing | . | . | . | . | . | . | . | . | . | 2 | . | . | 1 |
| path-tracing-reverse | . | . | . | . | 1 | . | . | . | . | . | . | . | 1 |
| swe-bench-fsspec | . | . | . | . | . | . | 1 | . | . | . | . | . | 1 |
| Correct tasks (Rel) | 24 | 25 | 29 | 26 | 27 | 28 | 29 | 31 | 28 | 25 | 26 | 30 | |
| Successful attempts | 78 | 97 | 111 | 110 | 121 | 112 | 119 | 117 | 122 | 120 | 126 | 114 | |
incompatible-python-fasttext.base_with_hint improves from 2/8 to 8/8, git-workflow-hack from 2/8 to 7/8, new-encrypt-command from 2/8 to 5/8, and sqlite-with-gcov from 1/8 to 4/8.
Some tasks become solvable only once the horizon is long enough. crack-7z-hash is never solved at 4K or 8K but reaches 4/8 at 12K and 5/8 at 16K; conda-env-conflict-resolution is first solved at 12K; and blind-maze-explorer-5x5 is solved only at 16K. Successful runs on these tasks take 20–33 episodes of sustained trial and adjustment (Table 8), so short-horizon training rarely observes the teacher behavior they require. Consistently, the 16K model produces 21 successful trials lasting at least 20 episodes, spread across 12 tasks, whereas the 8K model produces 11 across 6 tasks.
B.2 SATURATION AS CANCELLATION, NOT A PLATEAU
From 12K to 16K, the aggregate success count barely moves (111 → 110), but this hides substantial task-level movement. Of the 34 tasks solved by at least one one-stage model, 11 improve, 13 worsen,
Table 7: Recovery persistence across supervision horizons. Taxonomy: successful trajectories over the 36 manually analyzed tasks, classified as proactive (pitfall anticipated) or reactive (error observed, then repaired). Reactive tasks: successes out of eight on tasks that require recovery; every modernize-fortran-build success is reactive. Pass rate: over the five tasks whose eight trials are all classified. Green: best in row.
| Metric | 4K | 8K | 12K | 16K |
|---|---|---|---|---|
| Taxonomy (36 tasks) | ||||
| Proactive successes | 42 | 53 | 56 | 54 |
| Reactive successes | 27 | 38 | 41 | 42 |
| Reactive share | 39% | 42% | 42% | 44% |
| Reactive tasks | ||||
| modernize-fortran-build | 2/8 | 3/8 | 3/8 | 7/8 |
| fibonacci-server | 2/8 | 2/8 | 3/8 | 4/8 |
| simple-web-scraper (reactive only) | 0/8 | 2/8 | 0/8 | 4/8 |
| Pass rate (5 fully classified tasks) | 50% | 70% | 63% | 80% |
Table 8: Task-level behavior across supervision horizons. Successes out of eight, with mean episodes per run in parentheses (shown for solved settings). Counts are a subset of Table 6; green: best in row.
| Task | 4K | 8K | 12K | 16K |
|---|---|---|---|---|
| Long-horizon emergence | ||||
| crack-7z-hash | 0 | 0 | 4 (27.1) | 5 (32.6) |
| conda-env-conflict-resolution | 0 | 0 | 1 (32.5) | 1 (25.1) |
| blind-maze-explorer-5x5 | 0 | 0 | 0 | 2 (20.6) |
| Efficient recovery | ||||
| modernize-fortran-build | 2 (10.5) | 3 (15.5) | 3 (11.6) | 7 (12.9) |
| Over-persistence | ||||
| simple-web-scraper | 2 (6.9) | 8 (7.4) | 3 (7.3) | 5 (9.3) |
| vim-terminal-task | 4 (28.3) | 5 (13.0) | 1 (18.8) | 3 (23.1) |
and 10 are unchanged. The improving tasks gain 18 successes and the degrading tasks lose 19:
The gains concentrate on tasks that require long recovery, such as modernize-fortran-build (3/8 → 7/8) and blind-maze-explorer-5x5 (0 → 2/8). The losses fall mainly on tasks that peak at 12K: git-workflow-hack (7/8 → 3/8), incompatible-python-fasttext.base_with_hint (8/8 → 6/8), sqlite-with-gcov (4/8 → 2/8), and openssl-selfsigned-cert (3/8 → 2/8). In addition, five tasks solved once at 12K become unsolved at 16K.
This cancellation explains the mixed aggregate profile in Table 2. Coverage (Rel) and perfect repeatability (Rel) fall because marginal and 12K-peak tasks lose ground. Meanwhile, Rel, , and the number of fragile tasks improve because other tasks become more consistent. Saturation is therefore not a uniform plateau: beyond 12K, additional supervision redistributes reliability across tasks rather than increasing it.
Caveat. A few tasks are solved most often at the shortest horizon; for example, oom and tmux-advanced-workflow succeed in 2/8 attempts at 4K and in at most 1/8 at longer horizons. These differences are within sampling noise, and we do not interpret them as horizon effects.
C HORIZON AND AGENT BEHAVIOR
This section complements Section 5.1 with task-level evidence on how the horizon shapes persistence: the agent's tendency to keep acting after an error, diagnose it, and recover rather than terminate. Table 3 in the main text uses the automatic error-signature classifier of Appendix A.4 over all runs. Here we additionally use a finer manual taxonomy over 36 tasks, which labels a successful trajectory
Table 9: Recovery persistence across supervision horizons. Successful trajectories over the 36 manually analyzed tasks, classified as proactive (pitfall anticipated) or reactive (error observed, then repaired). Pass rate is computed over the five tasks whose eight trials are all classified. green: best in row.
| 4K | 8K | 12K | 16K | |
|---|---|---|---|---|
| Proactive successes | 42 | 53 | 56 | 54 |
| Reactive successes | 27 | 38 | 41 | 42 |
| Reactive share | 39% | 42% | 42% | 44% |
| Pass rate (5 tasks) | 50% | 70% | 63% | 80% |
proactive if the relevant pitfall is anticipated before it manifests and reactive if the error first occurs and is then diagnosed and repaired (Table 9).
C.1 LONGER SUPERVISION ENABLES RECOVERY
Reactive successes grow steadily with the horizon, from 27 at 4K to 42 at 16K, and their share of successful trajectories rises from 39% to 44% (Table 9). Because some tasks are structurally proactive or reactive, this ratio alone is not evidence of persistence; the more informative comparison is across checkpoints on the same task.
modernize-fortran-build is structurally reactive: the build must fail before it can be repaired, so every success is a recovery. Successes rise from 2/8 at 4K to 3/8 at 8K and 12K, and then to 7/8 at 16K. Mean episodes at 16K (12.9) remain below those at 8K (15.5), so the gain reflects better-targeted recovery rather than more attempts (Table 8). fibonacci-server shows a similar trend, rising from 2/8 to 4/8.
The contrast is sharpest on simple-web-scraper. The 4K model never recovers after observing the target bug: it dismisses the observed behavior as acceptable, edits the downstream report instead of the corrupted CSV, or spends its remaining budget on an unrelated error. At 16K, four of the five successful trajectories recover reactively, one after 22 episodes of revisiting its diagnosis. Across the five tasks whose eight trials are all classified, the pass rate rises from 50% at 4K to 80% at 16K. Longer supervision therefore exposes the learner to later trajectory stages in which an initial action has already failed, shifting behavior from Act → Observe Failure → Terminate toward Act → Observe Failure → Diagnose → Retry → Recover.
C.2 BEYOND THE EFFECTIVE HORIZON: OVER-PERSISTENCE
The same tendency to continue becomes costly on tasks that shorter horizons already solve. On simple-web-scraper and vim-terminal-task, the 8K model is best, and longer horizons both lower success and lengthen runs. For example, 8K solves vim-terminal-task in 5/8 attempts with 13.0 episodes per run, whereas 16K solves it in 3/8 with 23.1 (Table 8).
Failed 16K trajectories on simple-web-scraper reveal the mechanism. The agent often produces a working script, notices a minor formatting issue, and then either enters repetitive correction or introduces a new error that breaks the solution; one failure repeats the same incorrect diagnosis over several episodes. In other runs, the agent verifies only coarse properties and terminates while semantic defects remain. The same tendency appears in aggregate: 89% of successful 8K runs finish within 20 episodes, compared with 81% at 16K, and mean episodes of successful runs rise from 10.8 at 12K to 12.7 at 16K (Figure 2).
Together, these results reconcile the two faces of 16K. It shows the strongest recovery persistence on structurally reactive tasks, but this persistence is not selective: the same drive to continue helps tasks that require recovery and hurts tasks that were already solved. Behavior therefore moves from under-persistence at 4K, through productive persistence around 12K, to over-persistence at 16K, consistent with Section 5.1.
D ADDITIONAL RESULTS FOR SELECTIVE REFINEMENT
This section provides additional analyses supporting the selective long-horizon refinement results in Section 6 and Section 7 of the main paper. We further examine the effect of selection ratio, likelihood-based filtering, refinement horizon, and evaluation benchmark, complementing the main results and ablations on when and why selective refinement improves long-horizon agent training.
D.1 TASK-LEVEL RESULTS
Selective refinement consistently improves aggregate success. The advantage of selective refinement is not confined to a single configuration. All eight filtered models in Table 6 achieve 112–126 successful attempts, exceeding the best one-stage result of 111. Uniformly supervising all long-horizon continuations is therefore unnecessary for obtaining the benefits of long-horizon training.
Selection trades coverage against repeatability. Successful attempts and task coverage need not move together. 16K-T75 obtains the most successful attempts (126) but solves 26 tasks, whereas 16K-B75 obtains fewer (114) while solving 30. Likelihood-based selection thus redistributes reliability: high-likelihood subsets favor repeated success on solvable tasks, whereas low-likelihood subsets expand the set of tasks solved.
D.2 TOP- VS. BOTTOM-LIKELIHOOD SELECTION
Top-likelihood refinement repairs regressions and shortens runs. Top-likelihood selection recovers several tasks that regress under full 16K training, usually with shorter runs (16K columns of Table 6). fibonacci-server improves from 4/8 under full 16K training to 7/8 under both T50 and T75, while mean episodes per run nearly halve (14.0 → 7.9 under T50). incompatible-python-fasttext.base_with_hint returns to 8/8, matching its 12K peak, and swe-bench-langcodes rises from 6/8 to 8/8. fix-pandas-version isolates the efficiency effect: every 16K variant solves it 8/8, but T50 needs 9.9 episodes per run versus 17.5 for full 16K training. In aggregate, T75 yields more completed runs than B75 (209 vs. 197), with shorter completed trajectories (10.7 vs. 12.2 mean episodes).
Selection is not uniformly beneficial, however. vim-terminal-task, already an over-persistence case, degrades further under Top selection (3/8 under full 16K training vs. 1/8 under T75 and 0/8 under T50). modernize-fortran-build is highly sensitive to which continuations are retained: it keeps 7/8 under T75 but collapses to 1/8 under B75, suggesting that the recovery segments it depends on can be filtered out entirely.
Bottom-likelihood refinement trades repeatability for breadth. B75 solves the most tasks of any 16K model (Rel≥1 = 30), including eval-mteb, eval-mteb.hard, and decommissioning-service-with-sensitive-data, which no one-stage or Top-selected model solves. B50 similarly adds crack-7z-hash.hard and path-tracing. These new successes are mostly isolated (1–2/8): relative to T75, B75 has fewer consistently solved tasks (Rel≥6: 11 vs. 14) and more fragile ones (13 vs. 9; Table 5). Low-likelihood continuations thus appear to carry rare, diverse behaviors that expand coverage, whereas high-likelihood continuations consolidate repeatable solving, consistent with the capacity- and budget-dependent effects of likelihood-based selection reported by Cuong et al. (2026).
D.3 HOW DO TRAINING SCHEDULE, DATA QUANTITY, AND LIKELIHOOD SELECTION INTERACT?
To disentangle the effects of the two-stage schedule, data quantity, and likelihood-based selection, we add two controls. First, we refine the 8K warm-start model at 12K and 16K using all eligible trajectories, isolating the effect of the two-stage schedule from filtering. Second, for each retention ratio , we uniformly sample the same number of eligible trajectories as the corresponding Top/Bottom- setting, so comparisons among Top, Random, and Bottom are made at a fixed data budget. Table 10 supports the bias–complexity trade-off in Theorem 5.2. First, two-stage
Table 10: Disentangling two-stage training, data quantity, and likelihood selection. All two-stage models warm-start from 8K and refine at the target horizon on a random, highest- (Top), or lowest-likelihood (Bottom) of continuations. One-stage and Top/Bottom results are measured. Shaded : improves over one-stage training at the same target; green: best in column within each target.
| Selection | ρ | Succ.↑ | Reliability ↑ | Fragile ↓ | ||
|---|---|---|---|---|---|---|
| Rel≥4 | Rel≥6 | Rel≥8 | ||||
| 12K target | ||||||
| One-stage (full) | — | 111±2.3 | 13±0.8 | 9±0.6 | 6±0.5 | 12±0.8 |
| Two-stage All | 100% | 120±2.4 | 16±0.8 | 10±0.6 | 6±0.5 | 9±0.7 |
| Random | 116±2.5 | 15±0.8 | 8±0.6 | 4±0.5 | 10±0.7 | |
| Top | 25% | 125±2.2 | 19±0.7 | 10±0.6 | 5±0.5 | 6±0.6 |
| Bottom | 108±2.8 | 13±0.8 | 7±0.6 | 4±0.5 | 13±0.8 | |
| Random | 117±2.5 | 15±0.8 | 9±0.6 | 5±0.5 | 10±0.7 | |
| Top | 50% | 121±2.3 | 15±0.7 | 11±0.6 | 6±0.5 | 9±0.7 |
| Bottom | 112±2.6 | 15±0.8 | 8±0.6 | 3±0.4 | 9±0.7 | |
| Random | 118±2.6 | 15±0.8 | 9±0.7 | 5±0.5 | 10±0.8 | |
| Top | 75% | 119±2.5 | 16±0.8 | 9±0.6 | 6±0.5 | 10±0.7 |
| Bottom | 117±2.7 | 14±0.8 | 9±0.7 | 5±0.5 | 14±0.8 | |
| 16K target | ||||||
| One-stage (full) | — | 110±2.7 | 14±0.8 | 9±0.7 | 4±0.5 | 9±0.7 |
| Two-stage All | 100% | 123±2.4 | 16±0.8 | 12±0.7 | 6±0.5 | 8±0.7 |
| Random | 111±2.8 | 14±0.8 | 9±0.7 | 5±0.5 | 10±0.7 | |
| Top | 25% | 114±2.6 | 14±0.7 | 9±0.6 | 5±0.5 | 10±0.7 |
| Bottom | 108±2.9 | 13±0.8 | 9±0.7 | 4±0.5 | 9±0.7 | |
| Random | 121±2.5 | 15±0.8 | 11±0.7 | 6±0.5 | 9±0.7 | |
| Top | 50% | 122±2.4 | 15±0.7 | 11±0.6 | 6±0.5 | 9±0.7 |
| Bottom | 120±2.5 | 16±0.8 | 12±0.7 | 6±0.5 | 8±0.6 | |
| Random | 122±2.4 | 16±0.8 | 12±0.7 | 6±0.5 | 9±0.8 | |
| Top | 75% | 126±2.1 | 15±0.7 | 14±0.6 | 7±0.5 | 9±0.7 |
| Bottom | 114±2.7 | 15±0.8 | 11±0.7 | 4±0.5 | 13±0.8 | |
training with all eligible data improves over one-stage training from to successes at 12K and from to at 16K, indicating that the warm-start schedule itself provides a substantial benefit. Second, the Random controls reveal a horizon-dependent data-quantity effect. At 12K, increasing retention from to changes success only from to , which is within the estimated run-to-run variation. At 16K, however, the corresponding increase is much larger, from to , consistent with the finite-sample term : as grows with horizon, using too few trajectories becomes increasingly costly. Finally, fixed-budget comparisons isolate selection quality. At 12K-25%, Top reaches successes, compared with for Random and for Bottom, a gap larger than the reported variation. At 16K-75%, Top similarly reaches , versus for Random and for Bottom. In contrast, some settings show little separation, for example, at 16K-50%, Top, Random, and Bottom obtain , , and successes, respectively. Overall, the controls support a joint quality–quantity view: the two-stage schedule improves initialization, likelihood selection can provide additional gains when the separation exceeds evaluation variation, and retaining sufficient data becomes increasingly important at longer horizons.
D.4 RESULTS ON OTHER BENCHMARKS
The emergence–saturation pattern generalizes across benchmarks. As shown in Table 11 and Table 12, the one-stage results reproduce the same qualitative trend observed in the main experiments. On Terminal-Bench v2.0, successful attempts increase from at 4K to at 12K, but remain essentially unchanged at 16K ( ); similarly, on OpenThoughts-TBLite they increase
Table 11: Reliability of one-stage and selective two-stage training on Terminal-Bench v2.0. Two-stage models warm-start from 8K and refine at 12K or 16K on the highest- (Top) or lowest-likelihood (Bot.) of continuations. Values are reported with estimated run-to-run variation. Shaded : improves over one-stage training at the same horizon; green: best in row.
| Metric | One-stage | 12K refinement (from 8K) | 16K refinement (from 8K) | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| training horizon | ||||||||||||||||
| 4K | 8K | 12K | 16K | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | |
| Aggregate reliability | ||||||||||||||||
| Succ. attempts | ||||||||||||||||
| Rel | ||||||||||||||||
| Repeatability | ||||||||||||||||
| Rel | ||||||||||||||||
| Rel | ||||||||||||||||
| Rel | ||||||||||||||||
| Fragile () | ||||||||||||||||
Table 12: Reliability of one-stage and selective two-stage training on OpenThoughts-TBLite. Two-stage models warm-start from 8K and refine at 12K or 16K on the highest- (Top) or lowest-likelihood (Bot.) of continuations. Values are reported with estimated run-to-run variation. Shaded : improves over one-stage training at the same horizon; green: best in row.
| Metric | One-stage | 12K refinement (from 8K) | 16K refinement (from 8K) | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| training horizon | ||||||||||||||||
| 4K | 8K | 12K | 16K | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | Top | Bot. | |
| Aggregate reliability | ||||||||||||||||
| Succ. attempts | ||||||||||||||||
| Rel | ||||||||||||||||
| Repeatability | ||||||||||||||||
| Rel | ||||||||||||||||
| Rel | ||||||||||||||||
| Rel | ||||||||||||||||
| Fragile () | ||||||||||||||||
from to before saturating at . The reliability profile also exhibits the same redistribution beyond the effective horizon: from 12K to 16K, task coverage decreases ( on TB v2.0; on TBLite), while mean success among solved tasks increases (; ), increases, and the number of fragile tasks decreases. Thus, across benchmarks, longer supervision initially broadens task solving, whereas supervision beyond the intermediate horizon primarily makes already-solvable tasks more repeatable rather than increasing aggregate reliability.
Selective refinement consistently improves long-horizon reliability. Table 11 and Table 12 further show that the benefit of selective refinement transfers across benchmarks. On Terminal-Bench v2.0, 12K Top-50 improves successful attempts from to , while 16K Top-75 improves from to . The same pattern is stronger on OpenThoughts-TBLite, where the corresponding improvements are and . These gains are larger than the estimated run-to-run variation, supporting the main-paper observation that uniformly supervising all long-horizon continuations is unnecessary: selecting a subset of compatible continuations can yield higher reliability than full long-horizon training.
The effect of selection depends on both likelihood and retained data. As shown in Table 11 and Table 12, the cross-benchmark results also preserve the interaction between continuation likelihood and selection ratio observed in the main experiments. At 12K and , Top-likelihood selection consistently exceeds Bottom-likelihood selection in aggregate success (71 vs. 66 on TB v2.0 and 151 vs. 141 on TBLite), while also improving higher-order repeatability. However, the advantage is not uniform across every metric or selection ratio: Bottom-likelihood subsets can retain broader task coverage in some settings, and the strongest 16K result emerges only when sufficient data are retained, with Top-75 achieving successes on TB v2.0 and on TBLite. This is consistent with the main conclusion that likelihood is a useful compatibility signal, but effective refinement must jointly balance continuation learnability and data sufficiency.
E MISSING PROOFS
In this section, we provide the detailed derivation of Theorem 5.2 (or Theorem E.11) and establish several consequences for choosing the supervision horizon. In particular, Corollary E.14 characterizes when shorter-horizon supervision yields a tighter bound than full-horizon training, Corollary E.16 and Corollary E.18 characterize when an intermediate horizon minimizes a surrogate bound, and Corollary E.19 describes how this horizon changes with the amount of expert data.
Our analysis proceeds in three steps. First, we formalize the benefit of longer supervision through temporal supervision bias, which captures the full-horizon performance gap induced by truncating teacher trajectories. Second, we show that extending the supervision horizon exposes the learner to a richer set of decision histories, increasing the effective policy complexity and hence the finite-sample estimation burden. Third, we connect prefix-level estimation error to full-horizon performance and combine these two effects to obtain the bias–complexity bound in Theorem E.11.
We then use this result to answer three questions about the bound: when shorter-horizon supervision yields a tighter guarantee than full-horizon training, under what conditions an intermediate horizon minimizes a surrogate of the bound, and how this horizon shifts as the amount of expert data grows. These results characterize the guarantee rather than the true error, consistent with the scope stated below. Finally, we connect the decision-level analysis to the token-level supervision horizon used in our experiments.
Setup. We build on the decision-level imitation-learning formulation in Section 3. Let denote the student policy class and the teacher policy. Let denote the number of teacher decisions retained for supervision. We assume that teacher trajectories are sampled independently from and have lengths . For , we set , so that and are well defined for every . For any , supervision is restricted to the first decisions, while the policy continues to condition on the complete history at each step.
Scope of the analysis. The analysis concerns imitation risk under teacher-visited histories, for an empirical risk minimizer over a finite policy class with bounded loss. For log-loss, boundedness requires clipping probabilities below at some , giving for actions of at most tokens. Neural networks trained for a finite number of optimizer steps on a token-averaged objective (Equation 8) only approximate this setting. The resulting bound does not by itself imply that the true error, or task success under the agent's own rollouts, is non-monotone in , and it makes no prediction about trajectory length or persistence. We therefore use it to identify two competing quantities and treat the behavioral findings of Section 5.1 as empirical.
Definition E.1 (Horizon-H imitation risk). Let denote an action-level imitation loss satisfying
The population and empirical imitation risks under supervision horizon H are
where denotes the teacher trajectories. Behavior cloning with horizon learns
Definition E.2 (Horizon-induced policy complexity). Let
denote the set of interaction histories reachable under the teacher policy within the first decisions. Two policies are equivalent at horizon , written if
The corresponding quotient class and horizon-induced policy complexity are
For infinite policy classes, the union bound in Lemma E.7 must be replaced by a covering or symmetrization argument, with replaced by the corresponding complexity of the loss class restricted to . We do not pursue this extension here.
Lemma E.3 (Policy complexity increases with supervision horizon). For any ,
Proof. Since
any two policies distinguishable within horizon remain distinguishable within horizon . Thus, increasing the supervision horizon may split equivalence classes but cannot merge them, implying
Lemma E.3 formalizes that longer supervision exposes the learner to a richer set of distinguishable behaviors. This increase in complexity reflects the diversity of observed decision histories, not an increase in the number of model parameters.
Definition E.4 (Prefix-optimal set and pessimistic reference risk). Let
and define the pessimistic full-horizon risk of the prefix-optimal set as
Since , is finite.
Supervision over the first decisions constrains a policy only on histories in (Definition E.2). Policies that agree on these histories have identical prefix risk but may behave differently afterward, so generally contains policies with different full-horizon risks. accounts for all of them rather than for a single tie-broken minimizer.
Definition E.5 (Temporal supervision bias). We define the temporal supervision bias at horizon H (restated from Definition 5.1) as
Since is non-empty and minimizes over , we have . Moreover, every (the case of ) is a minimizer of and therefore attains , so and . Thus, measures the worst-case excess full-horizon risk left undetermined by supervising only the first decisions.
Assumption E.6 (Monotone temporal supervision bias). For any ,
Lemma E.7 (Finite-sample estimation error). Assume that the N teacher trajectories are independently sampled and that . Then, with probability at least ,
Proof. Define the trajectory-level prefix loss as
Although decisions within a trajectory are dependent, the variables are independent across teacher trajectories.
For a fixed policy , Hoeffding's inequality gives
Both and depend on only through its behavior on , and are therefore constant on each equivalence class of . A union bound over the classes thus yields
Setting the right-hand side to and using gives
Fix any . Since minimizes the empirical risk, , and hence
(30)
Substituting the uniform bound above proves the result.
Training controls performance only over the supervised prefix, whereas our goal is performance over the full task horizon. Note that the full-horizon risk , unlike , is not constant on the equivalence classes of : prefix-equivalent policies may differ after step . The transfer coefficient below is therefore defined relative to the pessimistic reference , which covers every prefix-optimal policy.
Definition E.8 (Prefix-to-full-horizon transfer coefficient). For supervision horizon H, define (restated from (5))
with if no policy has .
The coefficient measures how much prefix-level excess risk can amplify when evaluated over the full horizon. We assume there exists a constant such that
For a finite policy class, each is a maximum over finitely many ratios and is therefore finite, but it can be arbitrarily large, and enters the bound multiplicatively through . The assumption is therefore substantive as a quantitative condition. Because supervision constrains a policy only on , a policy with small prefix excess risk may still behave very differently after step , which inflates . A moderate thus requires the policy class to couple late-stage behavior to early-stage behavior, for example through parameter sharing across histories. Defining relative to , rather than to a single minimizer, ensures that the transfer inequality also holds for policies that tie on the prefix (Lemma E.9).
Lemma E.9 (Prefix-to-full-horizon transfer). For every ,
Consequently, under , with probability at least ,
Proof. Since for every , two cases are exhaustive.
Case 1: . Then , so by definition of . The left-hand side of (33) is non-positive and the right-hand side is zero, so the inequality holds.
Case 2: . By definition of ,
Applying (33) to , then and Lemma E.7, proves the second claim.
Lemma E.10 (Error decomposition). For any supervision horizon H,
Proof. Adding and subtracting gives
The two terms are and , respectively. Note that may be negative, e.g., when is a prefix-optimal policy with better late-stage behavior than the worst one in .
Theorem E.11 (Detailed Bias–Complexity Bound). Consider the history-conditioned terminal-agent imitation-learning problem above. Assume that:
-
the N teacher trajectories are sampled independently;
-
the imitation loss is bounded, ;
-
the policy class is finite, so that minimizers exist and ;
-
the transfer coefficient satisfies .
Then, for every , with probability at least ,
Proof. By Lemma E.10 and Lemma E.9,
(39)
Substituting proves the result.
For the remainder of this section, we denote the estimation term of the bound by
which upper-bounds the estimation error of Lemma E.10 with probability at least . By Lemma E.3, is non-decreasing in . Note that Theorem E.11 does not require Assumption E.6; monotonicity is used only to interpret the bound as a trade-off.
Interpretation. Theorem E.11 identifies two competing effects of increasing the supervision horizon. The first term, , is the temporal supervision bias, the worst-case full-horizon risk left undetermined by truncating supervision at H. Under Assumption E.6, it is non-increasing in H, reflecting the additional information provided by later-stage teacher behavior. The second term, , is the finite-sample estimation term. By Lemma E.3, it is non-decreasing in H, since longer horizons expose the learner to a richer set of behaviorally distinguishable histories.
The bound therefore reflects a bias–complexity trade-off: additional supervision tightens the guarantee when the reduction in temporal supervision bias outweighs the increase in the estimation term. This is consistent with the empirical observation that performance improves with horizon initially but shows diminishing returns beyond an intermediate regime, although the bound alone does not establish that the true error follows this pattern.
Definition E.12 (Bound-optimal horizon). The bound-optimal horizon is
It is the horizon at which the guarantee of Theorem E.11 is tightest, and it need not coincide with the empirically best horizon.
Corollary E.13 (Full-horizon supervision). At , the temporal supervision bias vanishes and the bound becomes
Moreover, by Lemma E.3,
Thus, full-horizon supervision removes temporal supervision bias but incurs the largest horizon-dependent estimation term.
Corollary E.14 (When shorter supervision is preferable). For any , the horizon-H bound is tighter than the full-horizon bound if and only if
where is the estimation term in (40). In particular, since , this requires .
Proof. By Theorem E.11 and Corollary E.13, the horizon-H and full-horizon bounds are
respectively. Hence, horizon H gives a tighter bound if and only if
which is equivalent to the stated condition. The second claim follows because is strictly increasing in , so requires .
To characterize diminishing returns, we impose an additional assumption on the temporal benefit contributed by later stages of a trajectory.
Assumption E.15 (Diminishing temporal novelty). There exists a non-increasing function such that
A useful special case is geometric decay, with and , for which . Under Assumption E.15, the bound of Theorem E.11 is itself bounded by the surrogate
Corollary E.16 (Marginal characterization of the sweet spot). For every ,
Thus, extending the supervision horizon tightens the surrogate bound only while the marginal reduction in temporal supervision bias exceeds the marginal increase in the estimation term.
Proof. By definition, .
Assumption E.17 (Single crossing). There exists such that for all , and for all .
Corollary E.18 (Intermediate surrogate-optimal horizon). Under Assumption E.17, . Moreover, if and only if .
Proof. By Corollary E.16, is strictly decreasing on and non-decreasing on , so is a minimizer. The second claim follows from the definition of .
Corollary E.19 (Effect of additional expert data). For a fixed horizon , as . Moreover, let denote the crossing point of Assumption E.17 at sample size . If the assumption holds at both and , then .
Proof. The first claim is immediate from (40). For the second, write and for at sample size . Then
where the bracket is non-negative by Lemma E.3 and independent of . Hence is non-increasing in , while does not depend on . It follows that for every ,
Suppose, for contradiction, that . Applying Assumption E.17 at with gives , which contradicts the display above since . Therefore .
Thus, more expert data weakens the statistical penalty of longer horizons and moves the surrogate-optimal horizon weakly later.
Connection to token-level supervision. The analysis above is expressed in terms of a decision horizon , while our implementation controls a token budget . As defined in Section 3.3, induces the trajectory-dependent decision horizon
where is the cumulative number of tokens through action . Thus, increasing monotonically extends the supervised portion of every trajectory. Two differences from the analysis remain. First, varies across trajectories, whereas the analysis uses a common . Second, an action that straddles the budget is partially supervised, which ignores. The analysis should therefore be read as describing the qualitative effect of extending supervision, not as a quantitative model of token-level truncation.