WHALE: A Simple Recipe for Joint Harness-Weight Optimization
Haechan Kim, Yoonho Lee, Gisang Lee, Chelsea Finn, Kangwook Lee
KRAFTON · KAIST · Stanford University
Published August 31, 2026 · on the feed September 3, 2026 · ▲ 29 · arXiv 2609.00196
The abstract
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.
The Brief
2:36A short podcast summary of the paper. Written and voiced by AI.
Transcript
WHALE. A Simple Recipe for Joint Harness-Weight Optimization. By Haechan Kim and four others, from Krafton, KAIST, and one other institution. Published on the thirty-first of August. Its code repository is worked out: about one thousand five hundred source files, with a readme and a licence.
How well an agent performs depends on two things at once. There are the model's parameters, and there is the harness: the executable code that manages context and control flow around the model. Optimize either one alone and the system can end up bottlenecked by the other, still frozen. The two interact. Updating the weights can change which harness is effective, and updating the harness can change which of the model's capabilities get exposed. Existing methods for joint adaptation optimize weights together with textual prompts, but they leave the broader harness fixed.
Weight-Harness Alternating LEarning, or WHALE, is a simple recipe that alternates between two phases. First it updates the model under the current harness. Then it searches for a better harness under the model it has just updated. Each side gets to move while the other holds still, and then they trade places.
The two phases are instantiated with existing tools. Weight updates use online rejection-sampling fine-tuning. Harness search uses Meta-Harness. The key design choice is when to switch. Switch too eagerly and noise looks like progress. Linger too long and one side over-optimizes against a counterpart that is about to change. WHALE handles this in one of two ways: either fixed durations for each phase, or an adaptive patience rule applied over the training signals.
The experiments use Qwen3.5 agents at two billion and at four billion parameters, across three domains: search question answering, mathematical reasoning, and chess puzzles. Against weight-only optimization, harness-only optimization, and Fast-Slow Training, WHALE comes out ahead by between four point one five and twenty-four point three eight percentage points in best mean at eight accuracy.
The domains also show that either component can be the bottleneck. In SearchQA, harness search matches the peak accuracy of weight-only training with far fewer rollouts. In math, harness search improves accuracy only after a weight update has happened. And small interleaved updates beat a stagewise schedule that does weights first and harness second, in accuracy and in rollout cost alike. The code is publicly available.
The argument is about where the ceiling sits. Hold the harness fixed and a better model may be held back by old scaffolding. Hold the weights fixed and a better harness may have nothing new to expose. Letting the two take turns, in small steps, means neither stays the limit for long.
Paper Quest · 7 chapters · about 40 min
Play this paper
Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.
Chapter 1 🧩 · The problem
An agent is two things, weights and code. Tune one and the other holds you back.
You run a small tool-using agent. Its score depends on two things: the model's weights, and the harness, the code that decides what enters the context, how tools are called and when a run stops.
The road ahead
- 1 · The problem ~7 min An agent's score depends on both its model weights and its harness code, and tuning only one leaves the other holding it back.
- 2 · What came before ~3 min
- 3 · The key idea ~8 min Take turns: train the weights while the harness holds still, then search the harness code while the new weights hold still, and switch at the right moment.
- 4 · Choose your own research ~3 min
- 5 · Build the method ~8 min Each cycle fine-tunes the weights under the current harness, then searches for a better harness under the new weights, switching by budget or patience.
- 6 · The experiment ~6 min You’ll guess: In mathematical reasoning, did searching for a better harness improve the agent's accuracy before any weight update?
- 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Free, with Google or an email address. Your stars and progress are kept.