Harness Policy Distillation: Aligning Agent Policies with Runtime Semantics

Junze Zhu, Weihao Chen, Zhiyang Zhou, Zhen Wu, Xinyu Dai
10/14/2026
cs.LGcs.AI

No official code found. Best implementation: HuiCir/HPD (0 stars, last commit 2026-10-09).

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.

View on arXivView PDF

Code Implementations(1)

HuiCir/HPDCommunity74%

Harness Policy Distillation: aligning agent policies with runtime semantics

00Oct 9, 20261 weeks ago

Similar Papers

Cite this paper

@article{zhu2026harness,
  title  = {Harness Policy Distillation: Aligning Agent Policies with Runtime Semantics},
  author = {Junze Zhu and Weihao Chen and Zhiyang Zhou and Zhen Wu and Xinyu Dai},
  year   = {2026},
  eprint = {2610.20261},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.20261v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.20261.svg)](https://codeofpaper.com/paper/2610.20261)

Discussion