Harness-S: Learning from Sibling Harnesses for Generalizable Agent Training
Organizations: Shanghai Jiao Tong University · Xiaohongshu Inc. · Zhongguancun Institute of Artificial Intelligence · Southeast University ·
Abstract
Harness evolution from a common base exhibits Locality, Complementarity, and Nonstationarity: variants repair different failures, and their utility changes as the policy learns. Rather than seeking a universally superior harness, we introduce Harness-S to selectively rescue failures of a base execution system through sibling harnesses and transfer the resulting capabilities into a single policy that remains effective under the original harness. Directional Harness Evolution develops specialized sibling harnesses along distinct repair directions, forming a reusable Sibling Harness Pool that remains fixed during policy training. Complementary Harness Rescue Training invokes this pool only when all initial attempts under the base harness fail. The same policy generates fresh rollouts under selected auxiliary harnesses, and these trajectories replace the failed group for reinforcement learning. An Adaptive Harness Router selects the Top-k variants using Harness Behavior Profiles and voting across multiple LLMs. Policy-aware profile re-anchoring refreshes this evidence as the policy learns. Across AppWorld, SWE-Gym, and DBBench, the trained policy substantially outperforms policy-only training when returned to the original base harness. Behavioral analyses and held-out cases support the transfer of harness-elicited behaviors into the policy itself. Reusing the router for Rank-1 inference provides additional gains at the same executor rollout count.
Figures & tables
| Model / method | Param. | Test harness | AppWorld | SWE-Gym | DBBench | |||
| Pass@3 | Avg@3 | Pass@3 | Avg@3 | Pass@3 | Avg@3 | |||
| Frontier models | ||||||||
| GPT-6-Sol | — | 82.82 | 76.34 | 53.13 | 47.50 | 71.33 | 68.89 | |
| DeepSeek-v4-Flash | — | 81.68 | 77.61 | 51.88 | 46.25 | 75.00 | 70.44 | |
| GLM-5.3-Flash | — | 80.15 | 65.65 | 46.88 | 43.13 | 76.67 | 72.11 | |
| Base model and policy-only training | ||||||||
| GRPO | Random Harness | Rule Router (w/o Profile) | Top-4 | Top-8 Fixed | Top-8 Adaptive | |
| Rescue success by training stage | ||||||
| Steps 1–10 | — | 25.00 | 40.00 | 43.48 | 35.71 | 52.38 |
| Steps 11–20 | — | 18.18 | 26.67 | 43.75 | 24.24 | 66.67 |
| Steps 21–30 | — | 20.00 | 27.78 | 38.89 | 26.67 | 45.71 |
| Steps 31–40 | — | 25.00 | 44.44 | 33.33 | 38.89 | 50.00 |
| Final test performance | ||||||
| Behavior | Base | GRPO | Harness-S |
| AppWorld | |||
| Schema lookup before first API use | 22.9 | 38.2 | 67.6 |
| Multiple API calls in one execute block | 24.8 | 20.5 | 31.5 |
| Explicit pagination loops | 13.8 | 33.5 | 38.3 |
| Repeated execute code | 15.4 | 30.1 | 9.8 |
| Read-back after the last write | 69.2 | 56.9 | 69.4 |
| Stage | Observed execution |
|---|---|
| Case 1: Set intersection (held-out test instance) | |
| Training rescue | H2 selects liked songs that also occur in the library or playlists, then updates and sends the draft. This successful rollout is used at update 10. |
| GRPO | Uses a union of liked songs and the other sources, sending an overinclusive list. Failure. |
| Harness-S | Applies the intersection to the new song instances and sends the correct email. Success. |
| Case 2: Account recovery (held-out validation instance) | |
| Training rescue | H5 completes a Venmo account workflow: reads email codes, resets the password, and verifies login. This successful rollout is used at update 3. |
| Harness | Before training | After training | ||||
|---|---|---|---|---|---|---|
| Pass@3 | Avg@3 | rate | Pass@3 | Avg@3 | rate | |
| 42.62 | 31.93 | — | 67.56 | 56.87 | — | |
| Rank-1 | 56.87 | 45.42 | 1.53 | 68.32 | 61.45 | 22.52 |
| Rank-2 | 53.44 | 42.11 | 6.87 | 66.03 | 55.60 | 14.89 |
| Rank-3 | 50.38 | 39.19 | 4.96 | 64.89 | 54.20 | 13.36 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Train | Validation | Test | Total |
|---|---|---|---|---|
| AppWorld | 320 | 150 | 262 | 732 |
| DBBench | 1,600 | 200 | 300 | 2,100 |
| SWE-Gym | 240 | 100 | 160 | 500 |
| Case 1: — complete pagination across sources | |
| Edit: add an after-tool reminder to continue pagination until explicit exhaustion. | |
| state.hooks.pagination-completion-guidance | |
| Before ( ) | After ( ) |
| ⬇ null | ⬇ { " action ": " warn ", " condition ": " pagination_present ", " event ": " after_tool ", " message ": " Pagination metadata is present . Continue only until an empty or short page or an authoritative total ; do not treat the first page as complete .", " parameters ": {} } |
| When | Aggregating information across inbox, spam, and archive. |
| Behavior | Paginate through all specified sources, merge the results, and remove duplicates. The paired execution attempts a single-pass match and omits information from some sources. |
| Setting | Value |
|---|---|
| Search | 3 rounds; proposal budgets 7 / 8 / 8; 4 parent slots |
| Development tasks | Sampled from the 320-task training set |
| Repair direction | 2–3 related root causes per candidate; at least 2 distinct failed tasks per cause |
| Local evaluation | At most 30 tasks, including at most 10 successful controls |
| Revision budget | Initial candidate plus at most one revision |
| Harness editor | GLM-5.3; temperature 0.6; thinking enabled with high reasoning effort |
| Setting | Training rollouts | Training GPU h | test Avg@3 (%) |
|---|---|---|---|
| Plain GRPO | 2,560 (100.00%) | 50.58 | 48.98 |
| GRPO ( rescue) | 3,616 (141.25%) | 97.77 | 51.91 |
| DSH + Top-4 | 2,560 (100.00%) | 58.47 | 47.84 |
| DSH + Claude Code | 2,560 (100.00%) | 50.03 | 46.69 |
| Harness-S / Top-8 | 3,032 (118.44%) | 67.19 | 56.87 |
| Method | Search rollouts | Training rollouts | GPU h | API tokens (M) |
|---|---|---|---|---|
| Meta-Harness | 8,000 | 0 | 35.24 | 4.89 |
| WHALE | 8,640 | 2,560 | 95.84 | 9.80 |
| HarnessForge | 5,680 | 0 | 65.39 | 24.40 |
| Harness-S | 4,010 | 3,032 | 75.79 | 18.69 |
Agent Harness Optimization
Agent harness optimization improves the prompts, tools, memory, workflows, and control code that shape how AI agents act.
See all 192 papers