Abstract
WHALE alternates model weight updates and harness search to jointly optimize agent performance across reasoning tasks.
Agent performance depends jointly on the model parameters and the executable harness code that manages context and control flow. Optimizing either component in isolation can leave the system bottlenecked by its frozen counterpart: weight updates can change which harness is effective, while harness updates can change which model capabilities are exposed. Existing joint-adaptation methods optimize weights and textual prompts but leave the broader harness fixed. We propose Weight-Harness Alternating LEarning (WHALE), a simple recipe that alternates two phases: updating the model under the current harness, then searching for a better harness under the updated model. We instantiate these two phases with online rejection-sampling fine-tuning and Meta-Harness, respectively. When to switch is a key design choice: to separate real improvements from noise without over-optimizing against a changing counterpart, WHALE uses either fixed phase durations or an adaptive patience rule over training signals. Using Qwen3.5-2B/4B agents across three domains (search question answering, mathematical reasoning, and chess puzzles), WHALE outperforms weight-only, harness-only, and Fast-Slow Training by 4.15-24.38 percentage points in best mean@8 accuracy. Either component can be the bottleneck: harness search matches peak weight-only accuracy with far fewer rollouts in SearchQA, but improves math accuracy only after a weight update. Small interleaved updates also outperform stagewise weight-then-harness optimization in accuracy and rollout cost. The code is available at https://github.com/krafton-ai/WHALE.
Community
TL;DR: An agent is a model and a harness — the code that manages tools,
context, and control flow. Optimizing either alone leaves the system
bottlenecked by its frozen counterpart. WHALE simply alternates: update
weights under the current harness, then search for a better harness under
the updated model.
Key findings:
- Beats weight-only, harness-only, and prompt+weight joint adaptation
(Fast-Slow Training) by 4.15–24.38 points on SearchQA, Math, and Chess
Puzzles with Qwen3.5-2B/4B. - Bottlenecks are domain-dependent: harness search matches peak weight-only
accuracy in SearchQA with ~6% of the rollouts, but is nearly useless in
Math until a small weight update unlocks it. - Small alternating steps beat one-large-pass stagewise optimization —
surpassing its final accuracy with only 29%/49% of the rollouts. - Adaptive WHALE replaces the fixed schedule with a per-phase patience rule
on training signals, removing the schedule hyperparameters entirely while
matching or beating the best hand-tuned fixed schedule.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- MemoHarness: Agent Harnesses That Learn from Experience (2026)
- Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectories (2026)
- Co-Harness: Co-Evolving Harnesses and Model Weights for LLM Agents (2026)
- Rethinking the Evaluation of Harness Evolution for Agents (2026)
- HarnessEvolve: Learning from Reference Trajectories for Reliable Agent Self-Evolution (2026)
- JIT-Agent: Scaling Harness Intelligence via Just-in-Time Harness Evolution (2026)
- Self-Evolving Embodied Agents via Skill-Harness Evolution (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper