Your Policy Is Secretly a Harness: The Decision Geometry of Agent Interfaces
Organizations: The Hong Kong University of Science and Technology (Guangzhou) · The Hong Kong University of Science and Technology
Abstract
Language model agents are post-trained and deployed through a harness, the prompts, tools, and control logic that present a task to the model and execute its outputs. Harnesses are often revised and judged by how an already trained model performs under them, which assumes that what the model learned under one harness carries over to the next. We ask what a policy learns from its harness and what survives when the harness changes. Under KL-regularized control, we show that the log odds of an optimal policy recover how strongly its harness favors each action over the others, so a trained policy carries the preferences of its harness. Deployed return then equals the ceiling of the harness, the best return it offers, minus the mismatch of the policy, the return lost to its own suboptimal decisions. Training changes only the mismatch, while changing the harness moves both terms. Comparing harnesses with a fixed model therefore mixes what each harness offers with how well that model uses it. In MiniWoB++, post-training makes a model's preferences specific to its training harness. Reversing the order of the observation fields leaves every optimal decision unchanged yet lowers a trained model's success from 85.0% to 19.2%. Conversely, every new harness that a fixed-model comparison rejects but that raises the ceiling outperforms the original agent after further training under it, and ceiling and mismatch measured beforehand predict these gains. For coding-agent harnesses on Terminal-Bench Lite, ceiling minus mismatch estimated with a stronger model as a stand-in for the optimum reproduces the accuracy ranking, while either term alone does not. Code is available at https://github.com/2020-qqtcg/HRP.
Figures & tables
| Presentation | Choice change | Task success | ||
|---|---|---|---|---|
| Original | 0.0% | 0.015 | 85.0% | |
| Reversed fields | 52.0% | 0.484 | 19.2% | |
| Menu as list | 9.2% | 0.023 | 86.0% | |
| Shifted codes | 27.7% | 0.148 | 57.1% | |
| Reversed codes | 30.0% | 0.130 | 68.2% | |
| Permuted codes | 25.3% | 0.110 | 67.6% |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| Context encoder, semantic decoder, and fixed execution protocol. | |
| Policy over token sequences and its executed semantic pushforward. | |
| Induced dynamics, task reward including execution costs, and semantic reference prior. | |
| Initial state distribution, discount, and KL regularization coefficient. | |
| Optimal action score and its centered representative. | |
| Readout, the centered action scores . |
| ID | Interface | Actions, execution, and controller state |
|---|---|---|
| H0 | Direct | One native click or checkbox submission per decision. |
| H1 | Batched clicks | Adds every ordered pair of clicks as a single menu option, executed without an intervening actor call. |
| H2 | Automatic gate | Checks a commit action before execution. Rejection leaves the page unchanged, consumes the decision, and disables subsequent checks. Memory stores whether the gate is enabled. |
| H3 | Verify tool | Adds an optional program check of a proposed native action. Memory stores the checked action and its advisory verdict. |
| H4 | Reviewer tool | Uses H3’s action menu and memory, with advice supplied by a frozen language-model reviewer. |
| H5 | Revised instructions | Uses H0’s actions, observations, dynamics, and budget, with additional system instructions for matching labels, tracking tile IDs, correcting selections, and deciding when to submit. |
| Split | Per family | Total | Use in post-training |
|---|---|---|---|
| Training | 480 | 1,440 | Parameter updates |
| Calibration | 96 | 288 | Full learning curves |
| Training probe | 24 | 72 | Fixed training subset for learning curves |
| Test | 192 | 576 | Transfer evaluation |
| Parameter | Setting |
|---|---|
| Base / reference / H4 reviewer | Qwen3.5-2B with frozen base, reference, and reviewer weights |
| Trainable adapter | LoRA rank 16, scale , dropout 0, no bias updates |
| LoRA projection targets | Attention: q/k/v/o_proj Linear attention: in_proj_qkv , in_proj_z , in_proj_b , in_proj_a , out_proj MLP: gate/up/down_proj |
| Optimizer | AdamW with a constant learning rate , , , weight decay 0, gradient norm clipping at 1 |
| Training budget | 1,024 updates per harness at four tasks per update (4,096 task draws) |
| Checkpoint schedule | Initialization and every 64 updates (17 checkpoints at the full budget) |
| Variant | Readout RMS | Mismatch | Return | Success (%) |
|---|---|---|---|---|
| R0 | 0.000 | 0.015 | 85.0 | |
| [0.000, 0.000] | [0.010, 0.021] | [ , ] | [84.0, 86.1] | |
| R1 | 0.200 | 0.484 | 19.2 | |
| [0.198, 0.203] | [0.460, 0.507] | [ , ] | [17.0, 21.4] | |
| R2 | 0.054 | 0.023 | 86.0 | |
| [0.053, 0.054] | [0.018, 0.028] | [ , ] | [85.1, 86.9] |
| Checkpoint | Deployment | Success (%) | ||
|---|---|---|---|---|
| Source | H0 | 0.42289 | 0.01485 | 85.05 |
| Source | H1 | 0.31285 | 0.13737 | 72.90 |
| H0 continuation | H0 | 0.42294 | 0.01481 | 83.37 |
| H0 continuation | H1 | 0.30404 | 0.14619 | 75.66 |
| H1 adaptation | H0 | 0.38642 | 0.05132 | 78.31 |
| H1 adaptation | H1 | 0.43133 | 0.01889 | 88.17 |
| Quantity | Mean [95% CI] |
|---|---|
| Ceiling gain | |
| Frozen mismatch increase | |
| Frozen return change | |
| Recovery threshold | |
| Final recovery difference | |
| Final interface ranking |
| Swap | Frozen | Gain | Ranking | Success | |||
|---|---|---|---|---|---|---|---|
| H1 H5 | |||||||
| H0 H5 | |||||||
| H3 H1 | |||||||
| H4 H1 | |||||||
| H2 H5 | |||||||
| H1 H2 |
| Calibration quantity | , | , |
|---|---|---|
| Largest condition-level absolute bias in | 0.24805 | 0.00287 |
| Largest family-level absolute bias in | 0.40320 | 0.00442 |
| Worst-node return-difference RMSE | 0.20259 | 0.00672 |
| Mean actor queries per task and condition | 356.9 | 42,553.3 |
| Estimator | Configuration RMSE | Recovery RMSE | Ranking RMSE |
|---|---|---|---|
| Ceiling minus measured mismatch | 0.00230 | 0.00245 | 0.00286 |
| Ceiling alone | 0.23470 | 0.05744 | 0.05342 |
| Frequency rollout, same query budget | 0.00240 | 0.02672 | 0.02667 |
| Harness | Decisions | |||
|---|---|---|---|---|
| Terminus-2 | 4.9 | 0.431 | 0.134 | 0.297 |
| mini-SWE-agent | 8.6 | 0.631 | 0.335 | 0.296 |
| DeepSeek Harness | 8.6 | 0.590 | 0.382 | 0.208 |
| Pi coding-agent | 6.6 | 0.383 | 0.206 | 0.177 |
| DeepAgents | 14.2 | 0.261 | 0.429 |
| Harness | States | Inspect | Modify | Plan | Stop | Opaque | Invalid |
|---|---|---|---|---|---|---|---|
| Terminus-2 | 44 | 37.7 / 30.3 | 15.8 / 20.8 | 0.0 / 0.0 | 38.3 / 35.1 | 8.2 / 6.4 | 0.0 / 0.1 |
| mini-SWE-agent | 77 | 59.7 / 43.5 | 14.1 / 11.3 | 0.0 / 0.0 | 11.7 / 22.4 | 14.1 / 18.9 | 0.1 / 0.0 |
| DeepSeek Harness | 69 | 33.3 / 20.0 | 12.1 / 15.0 | 15.1 / 26.5 | 11.2 / 14.8 | 27.7 / 18.6 | 0.1 / 2.7 |
| Pi coding-agent | 46 | 48.3 / 37.0 | 20.4 / 22.4 | 0.0 / 0.0 | 12.9 / 21.0 | 18.0 / 16.6 | 0.0 / 0.4 |
| DeepAgents | 85 | 27.9 / 24.8 | 11.8 / 16.8 | 11.1 / 11.4 | 3.9 / 8.4 | 38.2 / 32.4 | 3.5 / 0.0 |
LLM Agent Harnesses
LLM agent harnesses are the software and runtime systems that organize an agent’s tools, context, state, execution, and safeguards.
See all 389 papers