Hugging Face's Harness Adapters Push Qwen3.8-27B From 39% to 65% on Hard SWE-bench Pro Tasks Inside the Pi Agent
Hugging Face published harness adapters on November 20, 2026, Apache 2.0 LoRA adapters for Qwen3.8-27B trained with reinforcement learning inside the unmodified Pi, OpenCode and Hermes Agent harnesses. Each beat the base model on SWE-bench Pro and Terminal-Bench 2.1 while making 53% to 72% fewer tool calls on solved tasks, and a merged super-adapter works across all three.
Hugging Face says a coding model can get much better at agent work without changing its base weights, as long as it is trained inside the agent it will actually run in. In a post published November 20, 2026, the company released harness adapters: small LoRA adapters for Qwen3.8-27B, each trained with reinforcement learning inside one unmodified coding-agent harness.
The idea is that general-purpose models are tuned for broad performance, not for the specific mix of a given harness and a given set of tasks. The post gives an example: Qwen3.8-27B scores 39% on Terminal-Bench 2.1 inside the Pi harness while using about 2.9K tokens per task. With the base weights frozen and a custom RL-trained adapter added, it reaches 55% pass@1 at about 1.5K tokens. The team attributes most of the gain to the model reasoning less, calling fewer tools and getting things right the first time.
Training inside the harness as shipped
Hugging Face trained one adapter for each of three harnesses: Pi 1.5.2, OpenCode 2.2.7 and Hermes Agent v0.22.6. Many RL frameworks train against a re-implementation of the agent loop. Here, the post says, “the harness runs exactly as it ships.” A proxy between the harness and the vLLM server records the exact tokens the model produced, and the trainer learns from those.
The stack uses TRL’s AsyncGRPOTrainer, which does not wait for every rollout to finish before taking the next optimization step, along with OpenEnv and the Harbor task format. Datasets, training and rollouts all ran as Hugging Face Jobs. Each adapter trained on two NVIDIA B200 GPUs, one serving the model through vLLM and one running training. The reward combined the verifier’s pass or fail with a small 0.1 bonus for tool efficiency.
871 tasks, 171 worth training on
A broad search of the Hub for Harbor environments returned about 59,000 tasks, many of them duplicates, evaluation sets or marked as not for training. The team narrowed this to two Hub sources and one generated set. SWE-smith injects bugs into real Python and Go repositories, SWE-Gym turns real GitHub issues and their merged fixes into tasks, and Tasksmith generates tasks from merged pull requests. It also removed the 253 tasks in its target benchmarks and any task from repositories those benchmarks use.
The resulting dataset, harness-hub/agentic-coding-envs, holds 871 tasks from 35 repositories. Only 171 passed the difficulty check, which keeps tasks the base model solves on some attempts but not all.
Across the three runs, training covered 598 steps, 78,114 samples and 167M tokens. A safety tool called safeagents checked 1.3M tool calls during training and blocked 647.
Bigger scores, far fewer tool calls
Every specialist adapter beat the base model inside its own harness. On the 51 hard tasks of SWE-bench Pro, Pi rose from 39.2% to 64.7%, Hermes from 29.4% to 43.1% and OpenCode from 35.3% to 51.0%. On the full Terminal-Bench 2.1, Pi gained 16.3 points and Hermes 14.1. OpenCode gained 6.0 points overall, and 13.6 on the 66 tasks that played no part in choosing its checkpoint.
On tasks both the adapter and the base model solved, the adapters made 56% to 72% fewer tool calls on SWE-bench Pro and 53% to 70% fewer on Terminal-Bench 2.1. The Pi adapter also carried over to other harnesses: under OpenCode it matched OpenCode’s own specialist on Terminal-Bench 2.1.
One merged adapter for three harnesses
The three adapters pushed the model in nearly unrelated directions, with a cosine similarity of about 0.01 to 0.02 between their weight updates. Hugging Face concatenated them into a single rank-96 super-adapter and applied it at half strength, after finding that a plain sum made the agent too terse. The merged adapter beat the base model under all three harnesses, by 6 to 18 points on SWE-bench Pro and 5 to 10 on Terminal-Bench 2.1, while cutting tool calls by 53% to 73%.
Outside coding, the gains mostly vanish. On 300 AutomationBench business-workflow tasks run in that benchmark’s own agent loop, the adapters stayed within noise of the base model, and the Hermes adapter scored a few points lower.
Text that looks like thinking
The team flags one open question. With thinking mode off, the adapted models tend to write short passages before a tool call, sometimes resembling reasoning (“wait,” “let me see”), where the base model goes straight to the call. Hugging Face calls this a kind of “reasoning leakage” and says the results still hold under a fixed token budget. It plans follow-up work on thinking and hybrid models.
The adapters, their GGUF builds, the merged super-adapter and the safeagents plugin are on the Hub under Apache 2.0. The RL tasks and the full evaluation trajectories are published there too.
- #Hugging Face
- #Coding Agents
- #Reinforcement Learning
- #LoRA
- #Qwen
Author
Raj M
Contributor
AI Systems Architect is a seasoned technology leader with over 15 years of experience in the IT industry working with Fortune 500 companies. With a solid foundation in multi-agent systems, open-source LLM infrastructure, and enterprise deployment, he excels at building scalable production-grade AI platforms.