[Image blocked: No description]
A LoRA adapter for Qwen/Qwen3.8-27B, trained with reinforcement learning to work as the model
behind the OpenCode coding agent on software-engineering and terminal tasks.
[!Tip]
Maximum-effort thinking accuracy, at a sixth of the tokens. With thinking off, this adapter matches the base
model thinking at its highest reasoning effort (xhigh): 51.0% vs 47.1% on SWE-bench Pro, 53.0% vs 55.4% on
Terminal-Bench 2.1, while generating 6–8× fewer tokens per task. Keep thinking off: turning it on for the adapter
adds nothing significant. See Thinking vs no thinking.
- SWE-bench Pro (hard 51): 35.3% → 51.0% (+15.7 points; 11 tasks newly solved, 3 lost).
- Terminal-Bench 2.1: 46.4% → 52.4% (+6.0 points); +13.6 points on the 66 tasks not used to pick the checkpoint (12 newly solved, 3 lost; p = 0.035).
- Less work per task: a quarter of the base model's turns on SWE-bench Pro (13 vs 48) and half on Terminal-Bench
2.1, on the tasks both solve, with 3.5× and 2.6× fewer generated tokens.
[!Note]
All results are under the OpenCode harness: one attempt per task, a 100-step budget, thinking off unless stated, text
only (the vision tower is not served), sampling at temperature 0.8 with top-p 1.0 (the training sampling). Base model
and adapter always run under identical settings. These numbers are not comparable with the ones on the
Qwen3.8-27B card, which uses other harnesses (Terminus, Claude Code),
thinking at maximum effort, larger budgets and the full SWE-bench Pro.
Full recipe will be shared in the release blogpost for anyone to build their own harness adapter.
Pick your setup
A real SWE-bench Pro task under OpenCode: the base model gets lost in a dependency and ends up repeating the same
command until it hits the 100-step limit; this adapter writes the schema, the validator and its tests, fixes one API
mistake and passes, in 17 tool calls.
[Image blocked: No description]
Still version, and the task
[Image blocked: No description]
Task: instance_flipt-io__flipt-c1728053367c753688f114ec26e703c8fdeda125 from SWE-bench Pro (hard 51): add an
internal/cue package that validates flipt configuration files against an embedded CUE schema. Both runs are from the
evaluation above: the base model was graded 0, this adapter 1. Each line is one tool call as the trajectory recorded it,
cut to fit.
[blocked]
Results
[Image blocked: No description]
[Image blocked: No description]
On Terminal-Bench 2.1 the four runs are compared on the 83 tasks all of them graded, so the base model and adapter scores differ slightly from the paired results below, which use the 84 tasks those two graded. "Thinking" is the chat template's
thinking mode at its default reasoning effort (xhigh).
Full paired results (intervals and sign tests against the base model)
One attempt per task, thinking off, paired against the base model under OpenCode on the same tasks. The interval is
95%; the p-value is an exact sign test on the tasks that changed outcome.
- SWE-bench Pro (hard 51): the 51 hardest tasks of SWE-bench Pro, 2 h and 100 agent steps per task.
- Terminal-Bench 2.1: all 89 tasks of Terminal-Bench 2.1, 1 h and 100 agent steps per task.
Step 150 was picked by looking at the checkpoints' scores on SWE-bench Pro and on an 18-task subset of Terminal-Bench
2.1, tracked during training.
Work per solved task (turns, visible content, reasoning and generated tokens)
Medians per task, this adapter / the base model, over the tasks both solved: same tasks, same outcome, so the numbers
measure only how much work each needed. Generated tokens are everything the model writes (visible content, reasoning and
tool calls); content is the visible text between tool calls.
- Against the base model, the adapter writes about as much text, but in far fewer turns: short reasoning between
targeted actions (about 45 tokens of text per turn against about 20), instead of exploring with many commands.
- Against the base model with thinking, nearly all the difference is reasoning: the adapter reaches the same answers
without it.
- Content for the base model on Terminal-Bench 2.1 is not available: its run's traces were not kept.
[blocked]
Thinking vs no thinking
Thinking mode on its own brings the base model to this adapter's accuracy, within noise; the adapter gets there without
it, at 6–8× fewer tokens. Thinking runs use the template's default reasoning effort (xhigh) and OpenCode's limit of
32,000 output tokens per model call; fewer than 0.5% of turns reached it, as often for the adapter as for the base model.
Evaluation checks
- Infrastructure. During evaluation, the public tunnel between the sandboxes and the model server went down a few
times, failing rollouts for reasons unrelated to the model. We check every rollout for this and reran all affected
ones, on both sides; the numbers above are the corrected ones (the base model's SWE-bench Pro score was 31.4% before
the reruns).
- Harness limits. In this setup the model is served text only and web search is disabled. OpenCode reads image and
video files as images, which the server rejects, and asks for web searches, which are cancelled: either ends the
session. This happens on a handful of Terminal-Bench tasks, more often for the adapter than for the base model, so it
understates the adapter there. With vision served and web access, these tasks run normally.
- Test files. Agents, the base model and this adapter alike, sometimes write or edit test files while working,
mostly their own scratch scripts to check a change. This cannot affect a grade: SWE-bench Pro's grader resets all test
files and applies the official tests before running them, and Terminal-Bench's tests are copied in only at grading.
- Hidden reasoning. The adapter's visible reasoning is plain text:
<think> tags appear in its output in fewer than
1 turn in 1,000, and with thinking off the template never opens a thinking block.
[blocked]
Use with OpenCode
Serve the adapter with vLLM and point OpenCode at it
1. Serve the adapter with vLLM
This is the configuration of the evaluations. Keep thinking off, as in training: with it on, the adapter is not
significantly more accurate and generates about 6× more tokens. Prefix caching on this hybrid model needs
--mamba-cache-mode align; without it, every agent turn re-reads its whole history.
2. Point OpenCode at it
Install OpenCode 2 (training and evaluation used @opencode/cli 2.2.7):
Add the server to ~/.config/opencode/opencode.json:
[blocked]
Use with OpenCode (transformers serve)
Serve with transformers and point OpenCode at it
transformers serve is a lightweight OpenAI-compatible
server, for local use and experimentation (vLLM is faster under load). It handles Qwen's tool calls out of the box.
Serve the merged checkpoint from Merge the adapter into the base model:
--reasoning off keeps thinking off, as in training. The server listens on http://localhost:8000, so the OpenCode
configuration from the vLLM section works as is, with the model key set to the name the server
serves, here ./Qwen3.8-27B-opencode-merged.
[blocked]
Use with OpenCode (llama.cpp)
Serve the GGUF adapter with llama.cpp and point OpenCode at it
The GGUF version of Qwen3.8-27B-opencode-adapted is in harness-hub/Qwen3.8-27B-opencode-adapted-GGUF. It runs on top of a GGUF of the base model:
Then use the OpenCode configuration from the vLLM section with "baseURL": "http://localhost:8080/v1".
The adapter was trained on the BF16 weights: the closer the base GGUF is to them, the closer you get to the trained
behavior. Q8_0 is a good default; lower-bit quants drift further. The GGUF version has not been re-evaluated.
[blocked]
Merge the adapter into the base model
Get a standalone model, with no LoRA at serving time
The adapter can be merged into the base weights with PEFT. The result is a regular Qwen3.8-27B checkpoint (about 54 GB
in BF16) that any engine serves without LoRA support. Merge on CPU if the GPU is needed for serving afterwards:
Then serve it like the base model, without the LoRA flags:
The merged checkpoint can also be converted to GGUF and served with llama.cpp the same way.
[blocked]
Training
Method, data, hyperparameters and hardware
The training script is
examples/async_grpo_harbor in TRL.
For a full write-up, please refer to the release blogpost.