Harness adapters: Qwen3.8-27B learns to call fewer tools

Hugging Face trained RL LoRA adapters that fit Qwen3.8-27B to the pi, OpenCode and Hermes Agent harnesses, raising scores and cutting tool calls.

If you run an open model inside a coding agent, you can now train a small add-on that fits the model to that specific agent instead of swapping models. In a Nov 20, 2026 post, Hugging Face trained one LoRA adapter for Qwen3.8-27B per harness (pi, OpenCode and Hermes Agent) with reinforcement learning inside the harness itself. Under pi, with one attempt per task, the adapter scores 64.0% on the 51 hardest SWE-bench Pro tasks (50–51 graded per run) against the base model's 40.0%, and 56.5% on Terminal-Bench 2.1 against 40.0%. On tasks both the base model and the adapter solve, it makes 60% fewer tool calls on SWE-bench Pro and 56% fewer on Terminal-Bench 2.1.

The method is what you can reuse. Each harness ran unmodified in Docker (Pi 1.5.2, OpenCode 2.2.7, Hermes Agent v0.22.6), a proxy recorded the exact tokens, and TRL's AsyncGRPOTrainer learned from them on two B200 GPUs per adapter. Tasks came from SWE-smith, SWE-Gym and Tasksmith, minus the benchmark tasks and their repositories, and had to pass openenv validate checks. Only tasks the base model solved some of the time, but not every time, qualified. The pipeline then repaired and re-validated rejected tasks with Tasksmith, and the final training mix was 750 tasks from this pipeline plus 300 from Termgrade. The reward was pass or fail plus a 0.1 tool-efficiency bonus. I-Scoop puts the OpenCode adapter at about 319 MB against roughly 54 GB for the full model, with everything released under Apache 2.0.

Our read: the task set is the part to reuse. The post explains that GRPO learns nothing from tasks the model always or never solves, which is why only sometimes-solved tasks qualify, and I-Scoop argues that this verified task set, not the adapter, is what outlasts the next model release.

The gains need context. Hugging Face says scores can't be compared across harnesses because pi compacts context and the others don't, that the super-adapter (the three adapters merged into one) has slightly optimistic Terminal-Bench numbers because its merge weight was tuned there, and that with thinking off the model writes reasoning-like text before tool calls, which calls for follow-up work. Per I-Scoop, the model card says most single rows fall within noise and only pooled results are meaningful, and the GGUF builds haven't been re-evaluated. The post does report the pi specialist's gains as significant (p = 0.002 on SWE-bench Pro, p = 0.001 on Terminal-Bench 2.1). Thinking mode is also a competitor: under pi on SWE-bench Pro, the base model with thinking on reaches 74.0%, above the pi adapter's 64.0%; only the super-adapter with thinking on ties it, per the post.

Try it: package one recurring bug fix from your repo as a Harbor task with a reference solution and tests, then run openenv validate path/to/task --sandbox hf-sandbox from the post. The post screens every task on four checks: the reference earns the maximum reward, doing nothing scores clearly lower, no canary beats doing nothing, and a replay of the reference gives the same reward.

Sources