Harness Adapters Explained: Do They Improve Open Models?
Harness adapters are small LoRA add-ons trained for one coding agent. Here is how Hugging Face's Qwen 3.8 27B versions work and what the results show.
For Engineering

What is a harness adapter?
A harness adapter is a small add-on to an AI model, trained so the model works better inside one specific coding agent. Technically it is a LoRA: a small set of extra weights that sits on top of the original model, which stays frozen. Hugging Face trained three of them for Qwen 3.8 27B, one each for the Pi, Hermes and OpenCode agent harnesses. In their tests, the adapters raised scores on hard coding benchmarks while using fewer tokens and fewer tool calls.
TL;DR
- A harness is the software wrapper around a model (its tools, system prompt and context handling), and the same model can score very differently under different harnesses. Hugging Face reported one case of 62% under one harness and 33% under another.
- A harness adapter is a LoRA trained with reinforcement learning inside one real harness, so the model learns that harness's habits.
- On hard SWE-Pro tasks under Pi, the Qwen 3.8 27B adapter went from about 40% to 64%.
- On tasks both the base model and an adapter solved, the adapters used 53% to 72% fewer tool calls.
- Training correctness stayed roughly flat while attempts got shorter, which suggests much of the gain is the model overthinking and over-calling tools less.
- The adapters can be downloaded and applied to the model, and a merged "super adapter" is available for harnesses that don't have their own.
What is a harness, and why does it matter?
When you use an AI coding tool, you are not talking to a bare model. You are using a model inside a harness. The harness decides which tools the model can call (read a file, run a command, edit code), what instructions it gets up front, and how much of the earlier conversation it remembers.
Closed labs build the model and the harness together. Anthropic has talked about doing this with Claude Code, and OpenAI with Codex. Open models have usually been dropped into whatever harness you prefer, and nobody has trained them for it. You download Qwen 3.8 27B, put it in OpenCode or Pi, and hope.
The harnesses differ more than you might expect. They use different tool names and different system prompts. They also handle context differently. Pi, for example, throws away early reasoning turns, while OpenCode and Hermes keep them. The same task given to the same model becomes a different problem in each one.
How does a harness adapter work?
Hugging Face's approach has four parts.
- Run the real harness. Many reinforcement learning (RL) setups rebuild a generic agent loop for training. Hugging Face instead ran each harness exactly as it ships, inside a Docker container (an isolated sandbox), with no customizations.
- Record everything. A proxy sits between the harness and the model server (vLLM) and captures the exact tokens the model generated. The trainer learns from those.
- Reward the right things. The reward is a verifier's yes or no on whether the task was solved, plus a small bonus for using fewer tool calls. The efficiency gains are partly designed in, not an accident.
- Train only a small add-on. The base model stays frozen and only the LoRA is trained.
The setup builds on Harbor, a framework from the team behind Terminal Bench, with Hugging Face's own integration for RL environments. Training used an asynchronous GRPO trainer in TRL, Hugging Face's training library.
What data were the adapters trained on?
The training tasks were real software engineering work: bugs injected into Python and Go repositories, real GitHub issues, and tasks generated from merged pull requests.
The careful part was filtering. The base model attempted each task several times. Tasks it always solved were thrown out, and so were tasks it never solved. This matters because the training method compares attempts against each other. If every attempt gets the same score, there is nothing to learn from. RL works best on tasks the model solves some of the time, where the goal is to make "sometimes" into "usually."
The compute was modest by lab standards. Each adapter was trained on two B200 GPUs, one serving the model and one doing the training.
Do harness adapters actually work?
Yes, on the benchmarks Hugging Face reported. Each row compares the base Qwen 3.8 27B with its adapter, within the same harness:
| Harness | Benchmark | Base | With adapter |
|---|---|---|---|
| Pi | SWE-Pro (hard tasks) | 40% | 64% |
| Pi | Terminal Bench 2.1 | 40% | 56% |
| Hermes | SWE-Pro | 29% | 43% |
| Hermes | Terminal Bench | 45% | 59% |
| OpenCode | SWE-Pro | 35% | 51% |
| OpenCode | Terminal Bench | 48% | 52% |
Only compare within a harness. Each one starts from different default settings, so a Pi number next to a Hermes number tells you little.
Efficiency improved too. In one Pi example on Terminal Bench 2.1, the base model scored about 39% and used roughly 2,900 tokens per task. With the adapter it scored about 55% and used roughly 1,500. That is more tasks solved for about half the tokens. On tasks that both the base model and the adapter solved, the adapter used 53% to 72% fewer tool calls.
Where do the gains come from?
The authors point to three sources:
- The model reasons less.
- The model calls fewer tools.
- The model gets to the right action on the first try more often.
There is a caution here. During training, correctness on the training tasks stayed roughly flat, while the attempts got much shorter. That suggests a big share of the gain is not the model learning the harness in some deep way. It is the model learning to stop overthinking and stop calling tools it doesn't need. Qwen models are known for long reasoning, so this is plausible. It also means these adapters should be compared against other fine-tunes built to shorten reasoning. Hugging Face also notes that results shift depending on whether thinking mode is on or off, so test your own setup.
Can an adapter for one harness work in another?
Somewhat, and this is one of the more useful findings. Hugging Face ran the Pi adapter under OpenCode. It scored 54%. The base model in OpenCode scored 44.8%, and OpenCode's own specialist adapter scored 52.4%. An adapter trained for a different harness did about as well as the one trained for OpenCode.
They also merged all three adapters into one "super adapter." Averaged across six harness and benchmark combinations, it moved the score from 39.5% to 49%. That is less than the specialists achieve, but it is a reasonable first thing to try if you use a harness none of the three cover.
What does this mean for you?
If you only use hosted tools like Claude Code or Codex, nothing changes today. This is how those products are already built, and it explains why they often feel more polished than a model plugged into a generic wrapper.
If your team runs open models for coding, three things are worth acting on:
- Test the model and harness as a pair. A 62% versus 33% gap on identical weights means "which model is smarter" is the wrong question on its own.
- Measure tokens and tool calls, not just pass rates. If you run models locally at slow speeds, or use tools that charge per call, cutting 53% to 72% of tool calls saves real time and money.
- Try the downloadable adapters. They apply to the model weights, so you can compare base against adapter on your own tasks before committing.
If you manage people who do this work, ask for a small evaluation set drawn from your real tasks. Hugging Face's recipe (use tasks the model sometimes solves, with a clear pass or fail check) works for any task where success can be verified.
Could you build your own model-and-harness comparison tracker?
If you are testing models, harnesses and adapters, the results tend to end up scattered across notes and spreadsheets. With Remy, you can describe a small internal app in plain English: a form to log each run with the model, harness, adapter, task, pass or fail, tokens used and tool calls, plus a dashboard that compares them side by side. Remy builds it as a full-stack app with a database and sign-in, so your team can share one record of what was tried instead of passing around files.
Frequently Asked Questions
What is a LoRA?
A LoRA is a small set of extra weights trained on top of a frozen model. It changes how the model behaves without retraining the whole thing, so it is cheap to train and easy to share, download and apply.
Which harnesses and model did Hugging Face use?
They trained adapters for Qwen 3.8 27B on three harnesses: Pi, Hermes agent and OpenCode. They also made a merged adapter that combines all three.
Do harness adapters make a small model as good as a frontier model?
The sources don't support that claim. The reported results compare each adapter only against the same base model in the same harness. They show clear improvements, but not how the model stacks up against closed frontier models.
Is the improvement mostly about the harness or about less overthinking?
Probably both, but the training curves point toward less overthinking. Correctness on training tasks stayed roughly flat while attempts got shorter. Comparing the adapters against other fine-tunes that shorten reasoning would show how much is harness-specific.
Do I need a lot of hardware to train my own?
Hugging Face trained each adapter on two B200 GPUs, one for serving and one for training. That is far below a frontier lab budget, but it is not laptop territory.
Useful for
How we source, write, and correct our articles. Editorial standards



