SSD Nodes Learn Hosting plans →
Guides Matt ConnorBy Matt Connor

Harness adapters: LoRAs tuned to your agent

Harness adapters are small LoRAs trained with RL inside one coding agent. See what the Qwen3.8 27B adapters gain and how to serve one with vLLM for Pi.

What a harness adapter is

A harness adapter is a small LoRA (low-rank adaptation) file, trained for one model inside one agent harness. You keep the base model as it is and load the adapter on top when that agent drives it. The harness-hub organisation on Hugging Face publishes a set for Qwen3.8-27B and three coding agents: Pi, OpenCode and Hermes Agent. A Hugging Face blog post dated 20 November 2026 describes how they were built.

The idea is narrow on purpose. A harness is the program around the model: its system prompt, its tool definitions, its loop and its output format. The agent harness explainer covers what that layer does. A general model has to guess how each harness wants it to behave. The adapter teaches it one harness by practice inside that exact harness.

The org card puts the pitch in one line: "Open models, tuned for the agent harness they run in." The rest of this page covers how the adapters were trained, what the model cards report, how to serve one with vLLM, and where the approach stops working. All card figures here are as of 21 November 2026. The cards are a few days old and have open discussion threads, so they may change.

How the harness adapters were trained

Each specialist adapter is a LoRA with rank r = 32 and alpha = 64. It is attached to the q, k, v, o, gate, up and down projections, which the blog describes as the all-linear setting. A LoRA does not change the base weights. It adds two small matrices to each targeted projection, and the rank sets how wide those matrices are.

Training used RL (reinforcement learning) with GRPO (group relative policy optimisation). It ran through the experimental AsyncGRPO trainer in Hugging Face's TRL library. The important detail is the environment. The model ran tasks inside the unmodified harness, so the reward came from real agent sessions with the real tool format. Per the cards, each harness was trained on 2 NVIDIA B200 GPUs, with thinking off during rollouts and a learning rate of 2e-5. That is the training setup. It says nothing about what you need to serve the result.

The training images pinned these harness versions:

  • Pi 1.5.2
  • OpenCode 2.2.7 (the @opencode/cli package)
  • Hermes Agent v0.22.6

The released checkpoints are Pi at step 160, Hermes at step 160 and OpenCode at step 150. A fourth repo, the super-adapter, merges all three, each at weight ½. The Hermes card itself pins no version and installs Hermes from the main branch, so treat v0.22.6 as the version the blog names for training.

What the Pi adapter scores, and the warning on the card

The Pi card reports a paired test. The setup is the Pi harness, one attempt per task, a 100-step budget, text only, temperature 0.8 and top-p 1.0. Thinking is off unless a column says xhigh. These are the card's numbers as printed.

ChartPi harness, Qwen3.8-27B vs the Pi adapter (pass rate %, from the pi-adapted card)
The data behind this chart
[
  {
    "label": "SWE-bench Pro (hard 51)",
    "base_pct": 39.2,
    "base_xhigh_pct": 74.5,
    "adapter_pct": 64.7,
    "adapter_xhigh_pct": 74.5
  },
  {
    "label": "Terminal-Bench 2.1",
    "base_pct": 41.0,
    "base_xhigh_pct": 54.2,
    "adapter_pct": 56.6,
    "adapter_xhigh_pct": 56.6
  }
]

With thinking off, the adapter moves SWE-bench Pro from 39.2% to 64.7%. The card counts 15 newly solved tasks against 2 lost. On Terminal-Bench 2.1 it goes from 41.0% to 56.6%, a gain of 16.3 points with 16 tasks gained and 2 lost. With xhigh thinking on, the base and the adapter tie on SWE-bench Pro at 74.5%.

The Terminal-Bench row matters most for planning. The adapter with thinking off scores 56.6% there. That is above the base model's 54.2% at xhigh thinking. The card says it gets there with about 4.5 times fewer generated tokens. On SWE-bench Pro the same trade does not hold, because thinking still wins there.

The card is direct about how far these numbers travel. It says they are not comparable with the ones on the Qwen3.8-27B card. The reason it gives: that card uses other harnesses (Terminus, Claude Code), thinking at maximum effort, larger budgets and the full SWE-bench Pro. The Qwen card's own SWE-bench Pro figure, for example, comes from the Claude Code harness at temperature 1.0 and a 256K context window. Do not set it beside the table above.

The two corrections on the Pi card

The Pi card records two corrections, and the second one changed the headline.

  1. Thinking-on SWE-bench Pro. An earlier version reported 64.7% for the base and 66.7% for the adapter with thinking on. Pi capped each call at 16k output tokens in those runs. Both were rerun with the 32k cap used everywhere else, and both now read 74.5%. The thinking-off results were not affected.
  2. The tunnel failure. An earlier version reported 29.4% to 62.7% on SWE-bench Pro. Nine base-model rollouts had failed because the public tunnel between the sandboxes and the model server went down. Every affected rollout was rerun on both sides, which gives the 39.2% to 64.7% above.

The harness-hub org page still shows the superseded 29.4% to 62.7% figure and the old thinking-on numbers. Where the org page and a model card disagree, use the model card. The other cards carry similar history without a labelled correction. The Hermes card says its first release reported 27.5% to 49.0% before reruns. The OpenCode card says its base SWE-bench Pro score was 31.4% before reruns.

The super-adapter: one LoRA for three harnesses

The super-adapter merges the Pi, Hermes and OpenCode specialists at weight ½ each. Merging three rank-32 adapters gives rank 96. Its card has its own results table. Read it on its own. It reports a base of 40.0% for Pi on SWE-bench Pro, where the Pi card reports 39.2%, so figures from the two cards do not mix.

ChartSuper-adapter card results (pass rate %, from the super-adapter card)
The data behind this chart
[
  {
    "label": "pi, SWE-bench Pro",
    "base_pct": 40.0,
    "specialist_pct": 64.0,
    "super_pct": 46.0,
    "base_thinking_pct": 74.0,
    "super_thinking_pct": 74.0
  },
  {
    "label": "Hermes, SWE-bench Pro",
    "base_pct": 29.4,
    "specialist_pct": 43.1,
    "super_pct": 47.1,
    "base_thinking_pct": 45.1,
    "super_thinking_pct": 60.8
  },
  {
    "label": "OpenCode, SWE-bench Pro",
    "base_pct": 35.3,
    "specialist_pct": 51.0,
    "super_pct": 45.1,
    "base_thinking_pct": 47.1,
    "super_thinking_pct": 66.7
  },
  {
    "label": "pi, Terminal-Bench 2.1",
    "base_pct": 40.0,
    "specialist_pct": 56.5,
    "super_pct": 48.2,
    "base_thinking_pct": 52.9,
    "super_thinking_pct": 57.6
  },
  {
    "label": "Hermes, Terminal-Bench 2.1",
    "base_pct": 44.7,
    "specialist_pct": 58.8,
    "super_pct": 55.3,
    "base_thinking_pct": 58.8,
    "super_thinking_pct": 63.5
  },
  {
    "label": "OpenCode, Terminal-Bench 2.1",
    "base_pct": 47.6,
    "specialist_pct": 52.4,
    "super_pct": 52.4,
    "base_thinking_pct": 54.9,
    "super_thinking_pct": 58.5
  }
]

The rows show a clear pattern. With thinking off, the specialist usually beats the merged adapter. Pi on SWE-bench Pro scores 64.0% with its specialist and 46.0% with the super-adapter. With thinking on, the super-adapter is the stronger choice. Hermes on SWE-bench Pro reaches 60.8% with it, against a thinking base of 45.1%. The card's advice follows from that. Use the super-adapter with thinking on. For one harness with thinking off, use that harness's specialist.

Two caveats come from the blog. The merge weight was picked on Terminal-Bench 2.1, so the Terminal-Bench numbers for the super-adapter are slightly optimistic. Results also compare only within one harness, never across harnesses.

Serve a harness adapter with vLLM

vLLM loads the base model once and serves the adapter as a named model. If you have not picked an inference server yet, Ollama vs vLLM compares the two. For the hardware the base model needs, read running Qwen 3.8 27B on a VPS. This page gives no speed or memory figures, and the adapter cards give none worth repeating.

This is the Pi card's command. The card says it matches the configuration of its evaluations.

vllm serve Qwen/Qwen3.8-27B \
  --enable-lora \
  --max-lora-rank 32 \
  --lora-modules qwen3.8-pi=harness-hub/Qwen3.8-27B-pi-adapted \
  --language-model-only \
  --enable-prefix-caching \
  --mamba-cache-mode align \
  --enable-auto-tool-choice \
  --tool-call-parser qwen3_xml \
  --reasoning-parser qwen3 \
  --default-chat-template-kwargs '{"enable_thinking": false}' \
  --max-model-len 131072

What each adapter-related flag does:

  • --enable-lora turns on adapter support. Without it, vLLM serves only the base model.
  • --lora-modules name=path registers the adapter under a name. Clients then ask for qwen3.8-pi in the model field, like any other model.
  • --max-lora-rank sets the largest adapter rank the server accepts. vLLM allows only 1, 8, 16, 32, 64, 128, 256, 320 or 512, and the default is 16. That default is below the specialists' rank of 32, so the card sets 32. The rank-96 super-adapter needs the next allowed value up, 128, which is what its card uses.
  • --default-chat-template-kwargs '{"enable_thinking": false}' turns thinking off by default, as in training. vLLM merges these defaults with any chat_template_kwargs sent in a request, and the request value wins. A client that sends enable_thinking: true gets thinking back.
  • --language-model-only serves text only. The base model has a vision tower, and the cards do not serve it.

For Hermes or OpenCode, swap the module line for qwen3.8-hermes=harness-hub/Qwen3.8-27B-hermes-adapted or qwen3.8-opencode=harness-hub/Qwen3.8-27B-opencode-adapted. For the super-adapter, use qwen3.8-super=harness-hub/Qwen3.8-27B-super-adapter with --max-lora-rank 128. Its card leaves out the thinking-off flag, because it recommends thinking on.

The --mamba-cache-mode flag on newer vLLM

Every card includes --mamba-cache-mode align, and the cards say it is needed for prefix caching on this hybrid model. The vLLM v0.34.0 docs disagree. They mark the flag deprecated with no effect, and say prefix caching for Mamba layers now follows --enable-prefix-caching. The v0.34.0 source still defines the flag, so your build may accept it or ignore it. The cards do not say which vLLM version they were tested on. If your vLLM rejects the flag, drop that one line and keep --enable-prefix-caching.

Check that the adapter answers

Send one request that names the adapter:

curl -s http://localhost:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model": "qwen3.8-pi", "messages": [{"role": "user", "content": "Reply with the word ready."}]}'

A healthy server returns a JSON body with a choices array. If vLLM answers with an error about the model instead, check that the name in model matches the name before = in --lora-modules.

Point Pi at the adapter: the openai-completions setting

Pi needs Node.js 22.19 or newer. The card installs it with npm:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

The adapter was trained on Pi 1.5.2, and the latest Pi release is v1.6.0. If you want the exact version the adapter saw in training, install 1.5.2, and check that version on npm before you pin it. The full Pi setup on a server is in running the Pi coding agent on a VPS.

Then add a provider to ~/.pi/agent/models.json:

{
  "providers": {
    "local": {
      "baseUrl": "http://localhost:8000/v1",
      "api": "openai-completions",
      "apiKey": "dummy",
      "models": [
        { "id": "qwen3.8-pi" }
      ]
    }
  }
}

The api line is the one that matters. The card says that without "api": "openai-completions", Pi uses the Responses API, which this adapter was not trained or evaluated with. Pi's own docs say a custom provider needs a baseUrl and an api value. They list openai-completions as the value for OpenAI-compatible chat endpoints. The apiKey is a placeholder that makes the model available to Pi. The model id must match the adapter name from --lora-modules.

Run a task:

pi --provider local --model qwen3.8-pi --print "Find out why the tests in tests/test_parser.py fail."

Inside an interactive Pi session, opening /model reloads models.json. An edit to the file therefore does not need a restart.

The llama.cpp route, and the llama serve name

Each card also has a GGUF route for llama.cpp. GGUF is the model file format llama.cpp reads. The Pi card takes the base model as Qwen3.8-27B-Q8_0.gguf from ggml-org/Qwen3.8-27B-GGUF. It takes the adapter as Qwen3.8-27B-pi-lora-F16.gguf from harness-hub/Qwen3.8-27B-pi-adapted-GGUF. It recommends Q8_0. It also says plainly: "The GGUF version has not been re-evaluated." The scores above belong to the vLLM setup, not to this one.

The card's command starts with llama serve. At the v1.0.0 release, llama.cpp's README documents llama serve as a subcommand of the single llama binary that the llama.app installer puts in ~/.local/bin. That installer fetches the latest build, not a fixed release. A default source build of v1.0.0 also produces that llama binary, in build/bin next to llama-server. On a server where you want a pinned llama.cpp release, the source build is the one you control. This is the card's command written for llama-server, which the same build produces:

llama-server -m Qwen3.8-27B-Q8_0.gguf \
  --lora Qwen3.8-27B-pi-lora-F16.gguf \
  --chat-template-kwargs '{"enable_thinking": false}' \
  -c 65536 --port 9931 --alias qwen3.8-pi

All of these flags are in the v1.0.0 server README. --lora takes the adapter path, --alias sets the model name the API reports, and -c sets the context size. The server binds to 127.0.0.1 by default, so it is not reachable from outside the box unless you change --host. The card connects Pi through the pi-llama extension, installed with pi install git:github.com/huggingface/pi-llama, and then runs pi --model llama-cpp/qwen3.8-pi.

The Hermes and OpenCode cards use port 8080 with the same 65536 context. The super-adapter card uses port 8080 with -c 131072 and shows no thinking flag.

Where harness adapters stop working

The adapters are narrow by design. Four limits decide whether one fits your setup.

One base model. Every specialist card lists base_model: Qwen/Qwen3.8-27B, and every command loads the adapter on top of that base. The adapters were trained on and loaded onto Qwen3.8-27B. A LoRA holds changes shaped to the weight matrices of the model it was trained on, so it does not carry over to a different model.

One harness. A specialist learned one harness's prompts and tool format. The blog's cross-harness test shows partial transfer only. The Pi adapter running under OpenCode went from 44.8% to 54.0% on Terminal-Bench 2.1, against 46.4% to 52.4% for OpenCode's own specialist. Under Hermes it went from 46.3% to 56.1%, against 44.7% to 58.8% for the Hermes specialist. On AutomationBench, which is outside the training tasks, the blog finds the differences within noise, except possibly for Hermes.

Thinking off. The specialists were trained and served with thinking off, and their cards say to keep it that way. The Hermes card gives the reason for its harness. With thinking on, Hermes sends each turn's reasoning back to the model, so long sessions run out of context. The OpenCode card says turning thinking on for the adapter adds nothing significant. The super-adapter is the one exception, and it recommends thinking on.

Hermes needs a long context. The Hermes card says Hermes Agent needs at least 64,000 tokens of context. The vLLM command's --max-model-len 131072 covers that. A smaller limit, set to fit a smaller GPU, may not.

One note on OpenCode: its paired Terminal-Bench result, 46.4% to 52.4% with p = 0.38, is not statistically significant. Its held-out run, 45.5% to 59.1% with p = 0.035, is.

Is there a harness adapter for Claude Code?

There is one, but not for Qwen, and it shows no gain. The org page lists adapters for LFM2.5-24B-A2B under Pi, Claude Code, Hermes and OpenCode. The Claude Code one, harness-hub/LFM2.5-24B-A2B-claude-code, was trained with RL on data-analysis tasks only. Its card says that after 100 steps, this checkpoint performs like the base model. The base scores a pass@1 of 0.68 with Claude Code, and the step-100 result is still marked TODO. Its license is other (lfm1.0), not Apache-2.0 like the Qwen adapters. Treat it as an experiment, not as a way to make Claude Code better with a local model.

The org page also lags behind its own repos. Its table still marks the Qwen3.8-27B Hermes and OpenCode adapters as coming, although both repos are published. That is one more reason to read the model card for any adapter you plan to run.

FAQ

What is a harness adapter?

A harness adapter is a LoRA trained for one model inside one agent harness, such as Pi or OpenCode. The harness-hub adapters for Qwen3.8-27B use rank 32 and alpha 64 on all linear projections. They were trained with reinforcement learning (GRPO) while the model ran real tasks in the unmodified harness. You keep the base model and load the adapter on top of it when that harness is the client.

Can I use the Pi adapter with OpenCode or Claude Code?

You can load it, but it was not trained for them. The blog's cross-harness test shows only partial transfer: under OpenCode the Pi adapter went from 44.8% to 54.0% on Terminal-Bench 2.1. Use the specialist for your harness. If you switch between Pi, Hermes and OpenCode, use the merged super-adapter with thinking on. The Claude Code adapter that exists is for LFM2.5-24B-A2B, not Qwen3.8-27B, and its card reports no measured gain.

Why does Pi need the openai-completions api setting for the adapter?

The Pi card says that without "api": "openai-completions" in ~/.pi/agent/models.json, Pi uses the Responses API, and the adapter was not trained or evaluated with that API. Set it on the provider that points at your vLLM server. Make the model id match the name you gave the adapter in --lora-modules.

Should I turn thinking on with a harness adapter?

Not with a specialist. The Pi, Hermes and OpenCode adapters were trained with thinking off, and their vLLM command sets {"enable_thinking": false} as the default. On Hermes, thinking on fills the context in long sessions. The super-adapter is different. Its card recommends thinking on, and that is where its scores are strongest.

Why does vLLM need --max-lora-rank for these adapters?

vLLM's default maximum LoRA rank is 16, and it only accepts the values 1, 8, 16, 32, 64, 128, 256, 320 and 512. The specialists have rank 32, so their cards set --max-lora-rank 32. The super-adapter has rank 96, which is not an allowed value, so its card uses the next one up, 128.

Was this article useful?