Harness-Aware Distillation for Small Language Model Agents
1KAIST AI 2Independent researcher
†Co-corresponding authors
Agents are deployed inside a harness, the software that manages the model's context, tools, and feedback. When an agent is distilled into a smaller one, the harness stays in place, so the student mainly needs what the teacher adds beyond the harness. HAD teaches exactly that, by contrasting the same teacher's actions with and without the harness information.
Abstract
Language model agents are deployed with a harness, the software around the model that manages its context, tools, and feedback. When such an agent is distilled into a smaller one, the harness stays in place, so the student mainly needs the teacher-specific abilities that the harness cannot provide, such as acting correctly on harness information. Standard distillation, however, imitates the teacher's full outputs and treats the harness as part of the input. We propose Harness-Aware Distillation (HAD), which focuses distillation on what the teacher adds beyond the harness. HAD complements on-policy distillation with two components: an action preference that contrasts the same teacher's actions with and without the harness information, scored after the student's own reasoning, and a validity check that drops preference pairs whose preferred action contradicts the harness records. We show that the contrast gives the student information that the teacher's responses alone cannot provide, and HAD needs no task rewards, success labels, or future information. Across multiple long-horizon agent benchmarks and models, HAD outperforms on-policy distillation baselines with the same harness, and on one benchmark its student even surpasses the larger teacher. Our analysis shows that HAD enters fewer unproductive loops and recovers from errors more often than the baselines, and suggests that it adaptively keeps learnable feedback in its weights while reading state information from the harness.
Motivation
Three ways on-policy distillation misses the harness
Method
Results
Full results. All distillation methods are trained with the harness.
| ALFWorld (1.7B ← 8B) | WebShop (0.6B ← 30B) | ScienceWorld (0.6B ← 30B) | ||||
|---|---|---|---|---|---|---|
| Method | Unseen SR | Seen SR | Score | SR | Score | SR |
Teacher and student are evaluated zero-shot. Bold marks the best student in each column.
Analysis
Stall prevention and recovery
Episodes without stalls (prevention) and stalls escaped (recovery).
Which parts of the harness are internalized
The HAD student, evaluated with one harness category hidden.
BibTeX
@article{choi2026had,
title = {Harness-Aware Distillation for Small Language Model Agents},
author = {Choi, Moonseok and Moon, Taehong and Nam, Giung and Lee, Juho},
journal = {arXiv preprint arXiv:XXXX.XXXXX},
year = {2026}
}