Oleksandr Kuzmenko, EditorPublished 6 min readAI-assisted · editor-reviewed
TL;DR
- RL inside the target agent harness enables models to adapt to specific tools and prompt formats.
- Pass@1 on Terminal-Bench 2.1 increased from 39% to 55% for Qwen3.8-27B while cutting tokens from 2.9K to 1.5K.
- Adapters for different harnesses can be merged into a single super-adapter that runs unchanged across all targeted runners.
Key facts
- Base Model
- Qwen3.8-27B
- Terminal-Bench 2.1 Pass@1 (Base vs Adapter)
- 39% vs 55%
- Average Tokens per Task
- 2.9K (base) vs 1.5K (adapter)
- Supported Harnesses
- Pi 1.5.2, OpenCode 2.2.7, Hermes Agent v0.22.6
Source: Key facts — Terminal-Bench 2.1 Pass@1 (Base vs Adapter)
Source: Key facts. Terminal-Bench 2.1 Pass@1 (Base vs Adapter): 39% vs 55%. Each figure is copied from the story.
- Terminal-Bench 2.1 Pass@1 (Base vs Adapter)39% vs 55%
Harness-Level Reinforcement Learning
Standard reinforcement learning frameworks typically force developers to wrap agent loops in proprietary framework interfaces. Hugging Face's approach executes the agent harness (such as Pi 1.5.2, OpenCode 2.2.7, or Hermes Agent v0.22.6) directly inside pre-built Docker containers. A transparent proxy between the harness and vLLM records generated tokens so AsyncGRPOTrainer can optimize policies on raw execution traces.
Slashing Token Overhead on Benchmarks
On the Terminal-Bench 2.1 benchmark, base Qwen3.8-27B under the Pi harness scored 39% pass@1 while consuming an average of 2.9K tokens per task. After freezing the base weights and applying an RL-trained LoRA adapter, pass@1 climbed to 55%, while average token usage plummeted to 1.5K tokens. The model learns harness-specific constraints, invoking fewer exploratory shell commands and reasoning more compactly.
Task Synthesis and Super-Adapters
While a broad Hub search returned roughly 59,000 Harbor-formatted tasks containing duplicates and non-training sets, the team filtered them down to training tasks from SWE-smith and SWE-Gym, supplemented by synthetic PR tasks generated via Tasksmith in Repo2RLEnv. Developers can train separate LoRA adapters for distinct runners or merge the three LoRAs into a single super-adapter that runs unchanged under Pi, OpenCode, and Hermes Agent.
