Harness adapters are small LoRA files, around 300 MB, that make an open model work better inside one specific coding agent. Hugging Face trained three for Qwen3.8-27B, one each for pi, OpenCode and Hermes Agent, with reinforcement learning inside those agents. In its own tests the pi adapter lifts the model from 40% to 64% on the hardest SWE-bench Pro tasks and cuts tool calls by more than half. The base weights stay frozen, and the adapters, tasks and training recipe are open under Apache 2.0.
For European organisations the release matters for a reason beyond the scores. It turns “which model do we buy” into a different question: what do we own? An adapter is a file you can train, audit and run on your own hardware. The verified tasks it learns from come from your own code. This article explains how harness adapters work, what the results do and do not show, and what to settle before you train one.
What a harness adapter is
An AI harness is the software around a language model that turns it into an agent: the system prompt, the tools, the loop that hands control back to the model and the way context is managed. Pi, OpenCode and Hermes Agent are three open source harnesses for coding work in the terminal.
The adapter is a LoRA, a small set of extra weights loaded next to a frozen model. Hugging Face attached rank-32 LoRAs to all linear layers of Qwen3.8-27B, an Apache 2.0 model Alibaba released in August. The OpenCode adapter is about 319 MB, against roughly 54 GB for the full model in BF16.
The new part is where training happens. Most reinforcement learning frameworks re-implement an agent loop inside their own code. Here each harness ran exactly as shipped, in a Docker image with Pi 1.5.2, OpenCode 2.2.7 or Hermes Agent v0.22.6, while a proxy between the harness and the vLLM server recorded every token the model produced. The trainer learned from those exact tokens. The model therefore learns the real tools, prompt format and habits of the agent your developers already use.

Why the harness is part of what you buy
A general model is trained to do reasonably well everywhere. Each harness asks for something different: other tool names, another edit format, another way of dealing with a full context window. That leaves accuracy and tokens on the table in every agent.
Hugging Face researcher Joël Niklaus, one of the authors of the harness adapters work, measured the size of that gap on his Harness Leaderboard, which runs several harnesses on the same open models. The New Stack reported that the simple mini-swe-agent solved 51.4% of tasks against 27.3% for OpenClaw, and that Pi reached 49.4% at $0.29 per solved task while OpenCode cost $3.35 per solved task in the first run. An August paper drew the logical conclusion: evaluations should treat the model and the harness together as the system under test.
For procurement that is a practical point. A model score on a vendor page says little about what the same model will do inside the agent your team runs. Harness engineering tunes the scaffolding around a frozen model. Harness adapters do the reverse and tune the model to the scaffolding you keep.
How the recipe works
Reinforcement learning needs tasks an agent can attempt and a verifier that scores each attempt. Hugging Face assembled tasks in the Harbor format from three sources: SWE-smith, which injects bugs into real Python and Go repositories; SWE-Gym in TaskTrove, which turns real GitHub issues and their merged fixes into tasks; and Tasksmith from Repo2RLEnv, which generates tasks from merged pull requests.
Every task then went through openenv validate. The check confirms that the reference solution earns the maximum reward, that doing nothing scores clearly lower and that a replay gives the same result. Of 1,127 candidates on the Hub, 858 passed. The same check caught a Terminal-Bench 2.1 verifier that accepted known-wrong answers.
The filter that matters most comes next. GRPO, the algorithm used, compares several attempts at the same task. When every attempt passes or every attempt fails, there is nothing to learn. Qwen3.8-27B attempted each task four times. Of 442 scored tasks it solved 151 every time and 120 never. Only the 171 tasks it solved sometimes went into training.

The reward was the verifier’s pass or fail plus a 0.1 bonus for solving with few tool calls. Each adapter trained on two NVIDIA B200 GPUs, one serving the model with vLLM and one running TRL’s AsyncGRPOTrainer. A rule-based guard, safeagents, checked every tool call before it ran. Across the three runs it checked 1.3 million calls and blocked 647, with blocked calls falling as training went on.
What the results show
Each adapter was evaluated inside its own harness on the 51 hardest SWE-bench Pro tasks and all 89 Terminal-Bench 2.1 tasks, with thinking off and one attempt per task.
| Harness | SWE-bench Pro, hard 51 | Terminal-Bench 2.1 |
|---|---|---|
| pi | 40.0% → 64.0% | 40.0% → 56.5% |
| Hermes Agent | 29.4% → 43.1% | 44.7% → 58.8% |
| OpenCode | 35.3% → 51.0% | 47.6% → 52.4% |
On tasks both the base model and the adapter solve, the adapters use 56% to 72% fewer tool calls on SWE-bench Pro and 53% to 70% fewer on Terminal-Bench 2.1. Fewer calls mean fewer tokens, shorter runs and a smaller bill per task, which is the number finance teams will ask about.
Hugging Face also merged the three adapters into one super-adapter. Their weight updates were nearly orthogonal, with a cosine similarity of about 0.01 to 0.02, so they could be concatenated at half strength without much interference. With thinking off, the super-adapter raises the average across the six harness and benchmark pairs from 39.5% to 49.0%. With thinking on, a mode it was never trained in, the average goes from 55.5% to 63.5%. The specialist stays ahead when you use one harness with thinking off. All adapters and their GGUF builds are in the harness-hub collection.
Some of what the adapters learn travels. The pi adapter running under OpenCode lifts Terminal-Bench 2.1 from 44.8% to 54.0%, slightly ahead of OpenCode’s own specialist. Outside coding it does not: on 300 business automation tasks from AutomationBench, run in a different agent loop, the adapters land between 17.7% and 27.0% against 23.0% for the base model, which the authors read as noise.
What changes for European organisations
A model you can keep in-house
Base model and adapters are open weights under Apache 2.0, so you can run them on your own servers or laptops with no data leaving the building. Our article on running a coding agent on a 32 GB laptop covers the hardware side. The task set is a different matter. If you build tasks from your own repositories, they contain your code, your tests and possibly secrets or personal data in fixtures and logs. Treat that set like any other training data under GDPR and your security policy, and decide early who owns what a model learns when a contractor or vendor runs the training.
Where the AI Act draws the line
Fine-tuning a general-purpose AI model can, in principle, make you the provider of a new model. The Commission’s GPAI guidelines of July 2025 set an indicative test: a downstream modifier generally becomes the provider when the compute used for the modification exceeds one third of the original training compute, according to a summary by CMS. If that original figure is unknown, one third of the 1023 FLOP that defines a GPAI model serves as the proxy.
Harness adapters sit far below that line. As a rough i-SCOOP estimate, updating a 27-billion-parameter model on the 167 million tokens of all three runs takes in the order of 1019 FLOP. Even if generating the rollouts multiplied that tenfold, the total would stay more than a hundred times below the proxy. This is not legal advice, and the AI Act’s compute test has known blind spots, as our piece on weight-space programming explains. Documenting the compute, data and evaluations of each adapter is still the easiest way to answer the question when an auditor asks.
Guardrails belong inside the training loop
An agent rewarded for passing tests will look for shortcuts. In an earlier Hugging Face run, a model tried to look up the answer source of a task at the very first step, and the guard blocked it. The 647 blocked calls in this release show the same pressure at scale. If you train your own adapters, run a pre-execution guard and an isolated environment for every rollout, not only in production. Our overview of AI agent sandboxes lists the isolation levels to choose from.
Ask for paired results and trajectories
Hugging Face published every evaluation trajectory in a public bucket and reported paired comparisons: the same tasks, the same harness, one model against the other. That is the standard to ask of any vendor that claims a tuned model performs better for you. Rankings across different harnesses are not comparable, a point the authors make themselves because pi compacts context by default while OpenCode and Hermes Agent do not.
Where to be careful
- Small samples. One attempt per task on 51 and 89 tasks. The model card notes that most single rows fall within noise and only pooled results are meaningful.
- Slightly optimistic. The super-adapter’s merge weight was chosen on Terminal-Bench 2.1, so those numbers flatter it a little.
- Reasoning leakage. With thinking off, the trained model writes short text before tool calls that resembles reasoning. The authors argue the gains hold under a fixed token budget and point to recent research on the same effect.
- Text only, one base model. The vision tower is not served, and an adapter belongs to Qwen3.8-27B. The GGUF builds for llama.cpp have not been re-evaluated.
A checklist before you train your own
- Pick one harness your developers use daily and one codebase or recurring task type.
- Build tasks from merged pull requests with tests that can decide automatically whether a fix is correct.
- Validate every task: the reference must pass, doing nothing must fail, and replays must agree.
- Keep only tasks the base model solves sometimes, and hold out a set for evaluation that never enters training.
- Scan the task set for secrets and personal data, and record its origin and licence.
- Train with a guard on every tool call, then compare adapter and base model on the same held-out tasks in the same harness.
Frequently asked questions
Can I use a harness adapter with Claude Code or Codex?
Not with the models behind those tools, because you need the weights to train an adapter. The Qwen3.8-27B adapters target pi, OpenCode and Hermes Agent. An earlier Hugging Face series for the open LFM2.5-24B model did include a Claude Code adapter.
How much does it cost?
The adapters and the base model are free to download under Apache 2.0. Hugging Face has not published the full time or cost of a training run; each adapter trained on two B200 GPUs.
Is a harness adapter just fine-tuning?
It is a form of fine-tuning, with two differences. The model learns from rewards for successful attempts rather than from examples, and the base weights stay untouched, so you can load or drop the adapter at will.
The adapter expires, the tasks do not
An adapter is tied to one version of one model, and in practice to a version of your harness. When a better open model arrives, you train again. What carries over is the set of verified tasks from your own work, with tests that define what correct means. For a European organisation that wants to stay independent of any single model vendor, that task set may become the most valuable AI asset it owns.





