arXiv(opens in a new tab)cs.CLSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.39982

Mid-Harness: Scaling Actions Between Model and Harness for Terminal Agents

Minki Kang, Ryo Hachiuma, Shaokun Zhang, Subhashree Radhakrishnan, Yonggan Fu, Jindong Jiang, Mingjie Liu, Ehsan Hosseini-Asl, Yi Dong, Yu-Chiang Frank Wang, Byung-Kwan Lee

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Minki Kang1,2∗^{1,2*}, Ryo Hachiuma1^{1}, Shaokun Zhang1^{1}, Subhashree Radhakrishnan1^{1}, Yonggan Fu1^{1}, Jindong Jiang1^{1}, Mingjie Liu1^{1}, Ehsan Hosseini-Asl1^{1}, Yi Dong1^{1}, Yu-Chiang Frank Wang1^{1}, Byung-Kwan Lee1†^{1\dagger}

1^{1}NVIDIA, 2^{2}KAIST

Figure

(a) Concept of Mid-Harness

1 Generator coverage

Pass@1 (%)

Base agent

Mid-Harness with

Frontier Verifier

50.00

68.03

2 Verification matters

Listwise

Pairwise

Distilled pairwise

51.02

54.76

57.14

3 Complements trajectory scaling

Best-of-7

  • Mid-Harness

Sequential Refine (SR)

  • Mid-Harness

55.10

66.33

55.10

60.20

75

(b) Summary of empirical findings

Figure 1 | (a) Concept figure. Mid-Harness verifies candidate actions before execution. (b) Effective action verification improves trajectory success and complements trajectory scaling. TMAX-9B [1] Pass@1 (%) on TerminalBench-Lite: base versus Mid-Harness with GPT-5.6 Sol verifier (top), results from different verification mechanisms (middle), and combining Mid-Harness with Best-of-T (T = 3) [2] and SR (R = 1) [3] (bottom). Mid-Harness uses N = 8.

Abstract

Terminal agents act through stochastic model generations, yet the ability to generate a useful action does not ensure its reliable execution. A poor command (e.g., wrong package install) can change the environment in ways that hinder subsequent progress, even when the model could generate a better alternative. We investigate whether allocating test-time compute at the model-harness boundary can improve action reliability and trajectory success, and what makes this allocation effective. To study these questions, we introduce Mid-Harness, which samples and verifies candidate actions before forwarding one for execution, while keeping the generator and harness unchanged. With a TMAX-9B generator, more action sampling yields little benefit under weak verification, whereas a capable verifier can exploit useful alternatives from the same generator. On TerminalBench-Lite, a GPT-5.6 Sol verifier raises Pass@1 from 50.00% for the base agent to 68.03% with 8 sampled actions. When the same TMAX-9B model serves as the verifier, pairwise verification performs best among the evaluated verification mechanisms. Distilling responses from the stronger verifier into TMAX-9B further improves Pass@1, while leaving the action generator unchanged. With TMAX-9B on TerminalBench-Lite, combining action and trajectory scaling reaches higher success at lower estimated token cost than generating more trajectories alone. Mid-Harness also improves performance across additional models, benchmarks, and harnesses. These findings identify action scaling as a promising target for test-time compute scaling in terminal agents. The project page is available at link.

*Work done during internship. †Project Lead. © 2026 NVIDIA. All rights reserved.

1. Introduction

Large language models increasingly power terminal agents that perform tasks in software engineering, data science, and scientific discovery [4, 5]. Yet the ability to generate useful actions does not ensure that an agent completes a task reliably. The same model and harness may succeed on one run and fail on another because each run commits to a long-horizon sequence of stochastically generated actions. Each executed command changes the environment on which subsequent decisions depend [6–8]. Therefore, a poor command (e.g., wrong code edit, wrong package install) can hinder subsequent progress by changing the environment, even when the model could have generated a better alternative [9]. We use action reliability to mean consistently generating actions that support task completion, and evaluate its trajectory-level consequences through task success.

Prior work improves reasoning and agent performance by allocating additional test-time compute to sampling, verification, and refinement [10–12, 3, 2], including verification of candidate actions before execution [13, 14]. These successes motivate scaling compute for action reliability, but leave an incomplete understanding of when and why this scaling improves trajectory success. In particular, the benefit of generating more candidates depends on the ability to verify them, making it important to study these factors jointly [15]. We therefore conduct a systematic study of action sampling and verification, asking: when does additional computation before action execution improve trajectory success, and what makes it effective?

To investigate these questions, we introduce Mid-Harness, a method for studying action-level compute scaling at the model-harness boundary while keeping the action generator and execution harness unchanged (Figure 1(a)). At each step, Mid-Harness requests several candidate actions from the generator using the same interaction history, applies a verifier, and forwards only the chosen candidate to the harness for execution. Our main comparisons vary candidate width, verification mechanism, and verifier capability with TMAX-9B [1] and its harness fixed. We use these comparisons to study two requirements: whether the generator provides useful alternatives, and whether verification can identify them before execution [16].

We first ask whether the generator already produces useful alternatives that could improve trajectory success if reliably identified. Without ground-truth labels for candidate actions, we probe this opportunity using a strong verifier. With TMAX-9B as the fixed generator on TerminalBench-Lite [17], verification by GPT-5.6 Sol [18] raises Pass@1 from 50.00% for the base agent to 68.03% (Figure 1(b)). This result provides evidence that the generator produces useful alternatives that verification can exploit, improving trajectory success without changing or further post-training the generator.

We next examine how much of this opportunity can be recovered in a self-verification setting, where the same model generates and verifies actions. We find that increasing candidate width yields marginal improvement under weak verification (Section 4). In this setting, pairwise verification performs best among the evaluated mechanisms, showing that how candidates are compared matters even without changing the verifier model (Figure 2). Fine-tuning a verifier initialized from the generator on pairwise responses from GPT-5.6 Sol further raises Pass@1 from 54.76% to 57.14%, while leaving the action generator unchanged (Section 4.3). Our analysis shows that distillation increases offline agreement with the frontier verifier, while disagreement over command semantics and execution feasibility persists (Section 5). Together, these results identify verifying what an action will do in the current environment without executing it as a central challenge in converting candidate diversity into successful trajectories.

Finally, we investigate whether the benefits of action scaling extend to trajectory-level compute scaling methods. On TerminalBench-Lite, Mid-Harness improves Pass@1 with both parallel scaling using Best-of-T Trajectories with an LLM-as-a-verifier [2] and sequential scaling using Sequential Refine [3] (Figure 1(b), Section 6.1). With TMAX-9B, combining Mid-Harness with one round of SR surpasses Best-of-T at T = 7 while using less than half its estimated token cost (Figure 5). We also find gains across additional models, tasks, and harnesses (Section 6.2).

Our main findings and contributions are:

• Verification governs the benefit of action sampling. With TMAX-9B on TerminalBench-Lite, wider sampling yields little benefit under weak verification, while the strong verifier enables substantially more successful trajectories.

• Verification mechanism and training help recover this opportunity. Pairwise verification performs best among the evaluated mechanisms, and verifier distillation improves trajectory success without changing the generator. The offline analysis identifies command semantics and execution feasibility as persistent sources of disagreement with the teacher verifier.

• Mid-Harness enables a systematic study of action scaling in terminal agents. By varying sampling and verification at a fixed model-harness boundary, we examine when additional computation improves trajectory success and demonstrate its compatibility with parallel and sequential trajectory scaling.

References (90)