---
title: "Introducing harness adapters: adapt your favorite model to your harness to improve performance and cost"
description: "Training reinforcement learning-based LoRA adapters inside a specific agent harness improves model accuracy and efficiency for that harness and task combination. The post presents a reusable recipe for training such harness adapters, using Qwen3.8-27B as the base model and three harnesses: Pi, OpenCode, and Hermes Agent. The adapters are trained with GRPO using TRL’s AsyncGRPOTrainer, with rollouts executed inside the harness itself via Harbor integration. Results show that each harness adapter outperforms the base model on benchmarks like Terminal-Bench 2.1, achieving higher pass@1 scores while using fewer tokens. The three adapters were also merged into a single super adapter that works across all three harnesses without modification."
---

# Introducing harness adapters: adapt your favorite model to your harness to improve performance and cost

[Hugging Face](https://yomu.fyi/company/hugging-face) · Younes B, ben burtenshaw, Nathan Habib, Lysandre, Amine Dirhoussi, Adithya S K, shaun smith, Sergio Paniego, Joel Niklaus, Lewis Tunstall · Nov 20, 2026

**Type:** Tutorial

## Summary

Training reinforcement learning-based LoRA adapters inside a specific agent harness improves model accuracy and efficiency for that harness and task combination. The post presents a reusable recipe for training such harness adapters, using Qwen3.8-27B as the base model and three harnesses: Pi, OpenCode, and Hermes Agent. The adapters are trained with GRPO using TRL’s AsyncGRPOTrainer, with rollouts executed inside the harness itself via Harbor integration. Results show that each harness adapter outperforms the base model on benchmarks like Terminal-Bench 2.1, achieving higher pass@1 scores while using fewer tokens. The three adapters were also merged into a single super adapter that works across all three harnesses without modification.

## Context

Models are not fully optimized for all harnesses and task distributions, leaving performance and efficiency on the table. The post addresses this by training custom RL-based LoRA adapters for specific harness-task combinations.

## Approach / What changed

Training LoRA adapters for Qwen3.8-27B per agent harness (Pi, OpenCode, Hermes Agent) using RL inside the harness itself. Datasets, training, and agent rollouts happen on the Hugging Face Hub using TRL’s AsyncGRPOTrainer, OpenEnv, and harbor. The adapters are trained with GRPO, and the recipe is fully reusable.

## Takeaways

- RL training inside the target harness yields more accurate and efficient models compared to the base model, as shown by higher pass@1 scores and lower token usage on Terminal-Bench 2.1.
- The three harness-specific LoRA adapters can be merged into a single super adapter that performs well across all three harnesses without modification.
- The model learned to generate short reasoning-like text before tool calls, a phenomenon called ‘reasoning leakage’, which improves efficiency but requires further study for hybrid thinking models.

## FAQ

### How do the harness adapters perform on tasks outside the training harness?

On AutomationBench tasks with a different agent loop, the adapters stay close to the base model, with Pi and OpenCode slightly ahead and Hermes slightly behind, indicating no clear transfer or degradation.

### What did the model learn during RL training?

The model learned to generate short reasoning-like text before tool calls, a 'reasoning leakage' that improves token efficiency and performance compared to the base non-thinking model.

### Can the recipe be reproduced for other models and harnesses?

Yes, the post provides a fully reusable recipe with all artifacts (adapters, GGUFs, RL tasks, safeagents plugin) available in a Hugging Face collection, and invites builders to apply it to their own models and harnesses.

**Tags:** [Agents](https://yomu.fyi/topic/agents), [Hugging Face](https://yomu.fyi/topic/hugging-face), [LoRA](https://yomu.fyi/topic/lora), [Qwen](https://yomu.fyi/topic/qwen), [RL](https://yomu.fyi/topic/rl)

- Source: [Hugging Face](https://huggingface.co/blog/harness-adapters-at-scale)
- Source URL: https://huggingface.co/blog/harness-adapters-at-scale
- Ingested by Yomu: 2026-11-20T15:00:12.397Z

[Read original post](https://huggingface.co/blog/harness-adapters-at-scale)
