Harness Policy Distillation: Aligning Agent Policies with Runtime Semantics

cs.LG cs.AI Junze Zhu, Weihao Chen, Zhiyang Zhou, Zhen Wu, Xinyu Dai · Oct 14, 2026
Local to this browser
What it does
Deploying LLMs as agents requires respecting runtime-specific execution contracts, yet standard training leaves harness semantics implicit in action trajectories. This paper introduces Harness Policy Distillation (HPD), which replays...
Why it matters
09% to 22. 98% and substantially outperforms supervised, RL, and standard distillation baselines.
Main concern
HPD makes a well-motivated, conceptually clean contribution by isolating runtime-state mismatch from the broader supervision-mismatch problem and treating harness control semantics as an explicit training target. The gains on TRAJECT-Bench...
Community signal
0
0 up · 0 down
Sign in to vote with arrows
AI Review AI reviewed
Plain-language introduction

Deploying LLMs as agents requires respecting runtime-specific execution contracts, yet standard training leaves harness semantics implicit in action trajectories. This paper introduces Harness Policy Distillation (HPD), which replays reference trajectories through the target harness to compile control-state documents, uses harness verification to filter teacher actions, and jointly trains a shared model on native action prediction, document-conditioned action prediction, and document reconstruction. On TRAJECT-Bench with the Pi harness, HPD lifts Qwen3-8B task success from 3.09% to 22.98% and substantially outperforms supervised, RL, and standard distillation baselines.

Critical review
Verdict
Bottom line

HPD makes a well-motivated, conceptually clean contribution by isolating runtime-state mismatch from the broader supervision-mismatch problem and treating harness control semantics as an explicit training target. The gains on TRAJECT-Bench are large and consistent across model sizes and harnesses, and the three-view shared-parameter design is a principled way to internalize privileged information without deployment overhead. That said, some baseline behaviors are anomalous, the harness-specific adaptation requirement is a real limitation, and the small-scale BFCL transfer should be read cautiously.

What holds up

The paper's decomposition of policy mismatch into supervision mismatch and runtime-state mismatch is conceptually sharp and usefully separates what HPD fixes from what prior methods address. The three-view objective—Harness-Replay (T), Injected (I), and Runtime (R)—is well derived via KL chain rule (Appendix F) and the component ablations in Table 2 show that verified teacher targets alone (HPD-T) already beat the strongest baseline OPD, while adding I/R together yields further gains. The cross-architecture and cross-harness adaptations in Figure 4 support portability. The training details in Appendix C and open-sourced artifacts (code and model weights) are commendable.

“HPD-T reaches 20.58 TS, above the strongest baseline, OPD at 15.61. Full HPD leads in TS, F1, Step-SR, and Exact: its 22.98 TS is 43 completed tasks above OPD”
Section 4.2 · Section 4.2
“Only the joint T/I/R run raises TS beyond HPD-T, suggesting that I and R contribute to completion in combination rather than as independent additions.”
Section 4.4 · Section 4.4
Main concerns

Several baseline results are anomalous and deserve scrutiny. SFT collapses task success from 3.09% to 2.06% and final-answer F1 from 26.82% to 2.40% despite improving reference-path metrics, which looks more like a training failure or severe hyperparameter mismatch than a pure distribution-shift effect. If SFT was not tuned fairly, the comparison landscape changes. More importantly, staged training of T followed by R catastrophically drops TS from 20.58% to 7.03%, indicating extreme sensitivity to optimization dynamics that the paper does not fully explain. The BFCL v4 transfer in Section 4.3 rests on only 92 cases, which is underpowered for strong generalization claims. Finally, the exact-match verification gate plus cosine-similarity teacher selection may overfit to reference syntax rather than semantics.

“SFT raises RC from 19.90 to 55.92 and Step-SR from 26.45 to 47.20, yet lowers TS from 3.09 to 2.06 and F1 from 26.82 to 2.40”
Section 4.2, Table 1 · Section 4.2, Table 1
“T→R (staged) ... 7.03 ... 17.47 ... 37.29 ... 18.35 ... 5.15 ... 56.64”
Section 4.4, Table 2 · Section 4.4, Table 2
Evidence and comparison

The evidence supports the core claim that harness-verified action targets improve over unverified teacher distillation: HPD-T (20.58% TS) beats OPD (15.61% TS) despite using the same 8B frozen base model, whereas OPD uses a privileged 32B teacher. This is a strong result. However, comparisons are not always apples-to-apples: OPD's 32B teacher is computationally stronger but lacks the harness control document, while HPD gains come from the intersection of verification and runtime annotation. The five-seed paired analysis with Holm-corrected p-values (Appendix C.5) adds statistical rigor. The metrics are well chosen—separating Action-Acc, Step-SR, RC, Exact, and TS—but the paper could more tightly link each metric to its corresponding mismatch type. The near-parity with DeepSeek V4 Flash on TS (22.98% vs 22.30%) is interesting but should not be over-interpreted as HPD matching frontier models, given differences in model scale and training.

“The adjusted TS p-values for Full HPD versus HPD-T and OPD are 0.00343 and 0.00338, respectively.”
Appendix C.5 · Appendix C.5
“HPD reaches 22.98 TS versus 22.30 for DeepSeek V4 Flash”
Section 4.7 · Section 4.7
Reproducibility

Reproduction is partially feasible but blocked by several factors. The training hyperparameters are exhaustively documented (Appendix C, Table 4: AdamW, constant 2e-6 LR, batch size 128, LoRA on Qwen3-8B, 8x A800s), and the authors release code and model weights. However, the harness-specific components—AutoProbe, the serializer $\Omega_H$, the transition kernel $T_H$, the observation adapter $\operatorname{Observe}_H$, the compiler $\Phi_H$, the verifier $V_{H,b}$, and the retry logic—are complex and must be reproduced exactly. The paper warns that applying HPD to a new harness requires reconstructing these from scratch. The evaluation uses proprietary TRAJECT-Bench tasks with replayed tool-output queues; independent reproduction requires access to this benchmark. Only five seeds are reported for variance estimation, and no standard deviations are given for the main Table 1 results. The teacher construction retry procedure (up to 5 attempts) and the $K=2$ candidate sampling with temperature 1 also need exact replication to reproduce the training targets.

“Candidates per sampling attempt: K=2 ... First-attempt acceptance rate (K=2): 87.90% ... Cumulative coverage by attempt 5: 100%”
Appendix B.3 · Appendix B.3, Table 3
“Learning rate: constant 2×10^{-6} ... Optimizer: torch.optim.AdamW(foreach=False) ... Batch size: 128”
Appendix C, Table 4 · Appendix C, Table 4
Abstract

Deploying a general-purpose model as an agent means running it inside a product-specific runtime harness that decides which actions are executable, how state advances, and when the loop may terminate. Ordinary trajectory supervision shows which action was taken but leaves the runtime semantics behind that action implicit. We introduce Harness Policy Distillation (HPD), which makes these runtime control semantics an explicit training target alongside actions to align the harness policy. HPD replays reference trajectories through the harness to recover the runtime semantics that are implicit in ordinary trajectory data, and represents them as control documents at each model-call boundary. These documents provide privileged information for a teacher to generate actions, while harness verification ensures that the resulting targets are executable under the runtime contract. We jointly train a shared model on the runtime semantics recovered from control-state privileged information and native history, thereby internalizing these semantics into the model policy. At deployment, the trained model uses the original harness interface without requiring the control document or any additional supplement. On TRAJECT-Bench with the Pi harness, Qwen3-8B trained with HPD reaches 22.98% autonomous task success and 49.23% runtime compliance, against 3.09% and 19.90% for the unadapted model. Harness-verified teacher actions substantially improve the native deployment policy, while joint control-state supervision provides further gains in task completion and runtime compliance. HPD turns executable runtime semantics into dense supervision for learning harness-compatible actions at each decision boundary.

Challenge the Review

Pick a starting point or write your own. Challenges run in the background, so you can keep reading while the AI investigates.

No challenges yet. Disagree with the review? Ask the AI to revisit a specific claim.