Running Qwen3.8-27B inside the pi harness yields a Terminal-Bench 2.1 score of 39% while consuming an average of 2.9K tokens per task. For enterprise software engineering deployments, this profile reflects the financial reality of off-the-shelf foundations: models target broad capabilities rather than harness-specific execution loops, leaving runtime efficiency uncaptured.
Freezing those foundation weights and training a targeted Low-Rank Adaptation module via reinforcement learning inside the harness changes that unit economics profile. This approach lifts the pass@1 rate to 55% while reducing token consumption to 1.5K per task. By targeting the exact operational interface of an autonomous setup, the model cuts down on superfluous reasoning loops and extraneous tool invocations.
Reinforcement Learning at the Tool Boundary
General models deployed into autonomous harnesses frequently waste compute because their default generation paths do not match the interface expectations of the environment. Reinforcement learning on a custom task distribution paired with a specific agent harness delivers higher accuracy and lower resource burn by aligning the model directly with that execution structure.
"Combining RL on a custom task distribution with your favorite agent harness yields more accurate and efficient models for that target harness and task distribution."
In our view, this shift exposes the balance sheet problem of treating base foundation models as drop-in autonomous employees: general intelligence burns tokens navigating the runtime framework itself, whereas focused reinforcement learning aligns token generation directly to execution. As the team noted, most of the performance and token gain stems from the model reasoning less, calling fewer tools, and performing better first time.
How do engineering teams generate the required training environments to tune adapters for specific autonomous frameworks without incurring unsustainable data collection costs?
They construct targeted task distributions that reflect real operational failures. A wide search on the Hugging Face Hub for Harbor environments surfaced roughly 59,000 tasks, though that volume included duplicates, evaluation sets, and items marked as unsuitable for training. To establish a clean dataset for Qwen3.8-27B, the training workflow combined three distinct pipelines.
Engineering the Harness Interface
Task synthesis addresses training gaps by mirroring developer workflows directly. To address specific technical blind spots, the Tasksmith pipeline generates environments from merged pull requests, where an autonomous agent writes both the specification and validation tests.
The engineers used Tasksmith to bridge skill gaps by mapping the competencies evaluated across Terminal-Bench 2.1. All datasets, training steps, and agent rollouts executed via Jobs on the Hub utilizing TRL's AsyncGRPOTrainer alongside OpenEnv and harbor. The final deployment environments relied on standardized container images containing Pi 1.5.2, OpenCode 2.2.7, and Hermes Agent v0.22.6.
"The three LoRAs are also merged into a single super adapter that runs unchanged under pi, Hermes Agent and OpenCode."
This setup allows the team to train one specialized LoRA adapter for Qwen3.8-27B per target environment across pi, Hermes Agent, and OpenCode, executing reinforcement learning inside the respective harness. Each resulting harness adapter outpaced the base model in its native environment on both benchmark metrics and overall resource efficiency.
Treating agentic deployment as a model-tuning problem rather than a runtime prompt-chaining challenge resolves the latency and token overhead that inflate inference invoices. Whether enterprise teams choose to merge independent LoRA weights into a unified super-adapter across multiple operational harnesses or maintain isolated execution profiles determines their operational cost baseline as autonomous software engineering scales up.
For comparison
Broad general intelligence paradoxically hinders execution efficiency: base models burn billable compute on redundant reasoning cycles and API calls instead of running commands cleanly. Deploying generic models as out-of-the-box autonomous workers exposes steep operational overheads just from navigating platform interfaces. Rather than assembling fragile prompt chains at runtime, developers shifted the training loop directly into frameworks like pi, Hermes Agent, and OpenCode.