Qwen3.8 27B thinks for 80 minutes and writes nothing. The fix is in the harness, not the weights
Reports describe a 27B model that checks a plan it already has, again and again. Five specific settings get it to its first edit.
Qwen3.8 27B can think for 45 to 80+ minutes before writing code because it keeps re-checking a plan it already has, which repetition penalties never catch. Fix it in the harness: declare only the effort levels its template accepts (low, medium, xhigh) and default to medium, use temperature 0.6, top_p 0.95 and top_k 20, cap thinking on th…
If you run Qwen3.8 27B in a coding agent you may have seen it. You hand it a real task, it starts thinking, and it does not stop.
The reports in a thread on the model's Hugging Face page are specific. On a 5K token plan it thought for 45 to 80+ minutes and 20,000 to 55,000+ tokens before writing a line. Several people reproduced it across SGLang, LM Studio, MTPLX and oMLX. One run in LM Studio went 82 minutes before it was stopped. Raising the context from 8K to 128K changed nothing.
The easy conclusion is that a 27B model cannot do agent work. The thread says otherwise, in two details.
The model already had the answer
One reporter typed: "You're stuck in a loop reasoning with yourself. Stop thinking and start coding." It started coding immediately. Nothing in the setup had told it to commit.
And the person with the 80 minute runs fixed them with settings, not weights: a hard thinking budget on the server, temperature 0.6, top_p 0.95. Someone else noticed SGLang leaves top_k off while the model card asks for 20.
That tells you what kind of failure this is. The model is not repeating itself, so repetition penalties never fire. It is re-checking a plan it already has. It is being thorough, forever.
Then the agent adds its own traps
OpenCode's thinking menu offers low, medium and high. Qwen3.8's chat template only accepts low, medium and xhigh. Pick high and every request fails with a 500 in milliseconds, and OpenCode retries it five times before telling you. The issue is open; the advice there is to declare the levels the model really has in your config.
A second trap hits agents that inject a system message mid conversation, which Codex and Claude Code do often: the template raises "System message must be at the beginning" and the request fails, while plain chat works fine. Patched templates are in that thread.
Five settings that fix it
- Only the effort levels it has. Declare low, medium and xhigh in
opencode.jsonand default to medium. The card warns low causes retries; the template's own default is xhigh. - The sampling the card and the thread agree on. Temperature 0.6, top_p 0.95, top_k 20.
- A thinking cap on the server, about 6K tokens. A prompt asking for brevity is not a cap. OpenCode cannot set this; it lives in llama.cpp or vLLM.
- The rule the stuck model obeyed, where it is always read. In
AGENTS.md: check a plan once, then make the first edit or run the first command. If you have thought for a long time with nothing written, write the code. - A gate on "done". It does not call the work finished until the checks have run (it parses, types check, tests pass) and the output is shown.
None of that is clever. All of it is specific to this one model in this one agent, and that is the point. A generic config cannot know that "high" is not a level this template has.
What this does not fix
It will not make a 27B model match a frontier model on hard problems, and we are not claiming it does. In OpenCode the rules and checks are instructions the model is asked to follow, not hooks it cannot skip. And we have not benchmarked the harness yet. What it removes is the hour of silence before the first edit.
Install it
All five are in a free harness for Qwen3.8 27B in OpenCode: the config with the right effort levels and sampling, the rules in AGENTS.md, a serving note with the thinking cap for llama.cpp and vLLM, a check script, and a known issues file linking every report above.
npx loreto add qwen3.8-27b --agent opencode
Or read every file first. It is free, with no signup.
Frequently asked questions
Why don't repetition penalties stop Qwen3.8 27B from overthinking?
Why does OpenCode return a 500 with Qwen3.8 27B on high effort?
Can OpenCode set the thinking budget itself?
Then tune it to your repository
The free harness gets Qwen3.8 27B to commit. Paste a repository and see what your own history adds before you pay anything.