Back to Home

Pi Coding Agent Gets Qwen3.8-27B Harness Adapter

Hugging Face has published harness adapters that tune Qwen3.8-27B to the coding agent it runs inside, and the pi adapter is the headline act. The release covers pi 1.5.2, OpenCode 2.2.7 and Hermes Agent v0.22.6, plus a merged rank-96 "super-adapter" that works across all three. The weights are Apache-2.0 on the Hub.

The premise is simple and slightly uncomfortable for anyone treating model choice as the whole decision. A harness is the wrapper that supplies the tools, the system prompt and the loop. The same weights behave differently once you move them from one agent to another, and Hugging Face argues that models are simply not optimized for every runtime.

The pi numbers

For the pi specialist adapter with thinking off, SWE-bench Pro's hard 51-task subset moves from 40.0% to 64.0% pass@1. On Terminal-Bench 2.1 the same adapter goes from 40.0% to 56.5%. OpenCode climbs from 35.3% to 51.0% on SWE-bench Pro, and Hermes Agent from 29.4% to 43.1%.

Efficiency moves with accuracy. On the pi adapter, average tokens per task fall from 2.9K to 1.5K. The reward function explains why: the verifier's pass or fail, plus a 0.1 bonus for tool efficiency. Models trained under that signal learn to stop flailing.

The merged super-adapter is the more interesting artifact. With thinking on, the mean across six harness and benchmark pairs rises from 55.5% to 63.5%. It wins five of six pairs and ties the sixth, pi on SWE-bench Pro, where the base model was already at 74.0%. Tool calls drop 19% to 48% depending on the pair.

The pattern is worth noting. Where the base model was strong, the adapter adds nothing. The largest gains land where the base is weakest: Hermes Agent on SWE-bench Pro goes from 45.1% to 60.8%, OpenCode from 47.1% to 66.7%. Thinking off, the mean goes from 39.5% to 49.0%, newly solving 71 tasks and losing 34.

How to run it

The model card ships a vLLM recipe: serve Qwen3.8-27B with LoRA enabled and a rank limit of 128, the next supported size above 96, then load the super-adapter as a named module and point pi, Hermes Agent or OpenCode at the local OpenAI-compatible endpoint. PEFT loading, a merged standalone checkpoint and a GGUF build for llama.cpp are also available.

Training never re-implemented the harness. A proxy sits between the agent runtime and vLLM, records the exact tokens the model produced, and the trainer learns from those. The task mix came from SWE-smith, SWE-Gym and Tasksmith, filtered down to the 171 of 442 scored tasks the base model solved only sometimes, because GRPO needs variation to learn anything.

Scale was modest: 598 cumulative steps, 78,114 samples and roughly 167M trained tokens, on a blend of 750 harness adapter tasks and 300 terminal RL tasks. A safety plugin called safeagents blocked 647 of about 1.3 million tool calls during rollouts.

The caveats are listed by the authors themselves, and they matter before anyone swaps weights in production:

  • The merge scale was chosen on Terminal-Bench 2.1, so those numbers are mildly optimistic.
  • On out-of-distribution AutomationBench the gain disappears: base 23.0%, pi 27.0%, merged 23.7%, Hermes 17.7%.
  • SWE-bench Pro here is a hard 51-task slice, where one task moves the score about two points.

There is also reasoning leakage with thinking off, where the model writes short reasoning-like text before tool calls, and the authors note that pi and Hermes handle prior reasoning turns differently, which affects SWE-bench Pro results. One Terminal-Bench verifier accepted known-wrong answers. No dollar cost per task is published.

For teams running open 27B models behind an agent, the practical takeaway is that harness-specific tuning is now a documented, reproducible step rather than a research stunt. The tasks, trajectories and adapter weights are public. The business takeaway is less comfortable: a model tuned to your harness also raises the cost of switching harnesses later.

Expect "tuned for X harness" to become a marketing line within months. Ask for numbers on the same harness version, and test on your own repositories before trusting a 51-task benchmark.

Comments

No comments yet. Be the first to share your thoughts!