r/LocalLLM • u/esaule • 46m ago
Question opencode+qwen3 keeps looping; what am I doing wrong?
I have been trying these local LLM for coding tasks. I am running a local Qwen3-32B quantized in LMStudio. I am trying to use it with opencode. But after 3 prompts or questions, the agent session turn into some infinite loop of reasoning or some tool calling infinite loop of some kind. Sometimes it tells me how to do things instead of doing them.
I can't be the first one to run into this. What's going on? What am I doing wrong? Is there a basic "how to" somewhere I didn't find that explains how to set this up so that it is useful?
1
Upvotes
1
u/AutomaticLanguage334 21m ago
the thing you're doing wrong is that you're running a rather dated model. Qwen didn't start optimizing for agent workflows until Qwen3.5 I believe. consider switching to a more modern model if you want proper tool calling. (specifically, Qwen3.8-27B is the one you want at the moment, though Inkling-2 is the current hotness at the moment)
it could also be a low quant biting you. Q1 / Q2 quants on smaller models can be pretty inconsistent with their output quality.
1
u/asdonne 13m ago
I had a similar problem with Claude-code + ollama caused by inconsistent context settings between the two. I believe the context was being truncated which was causing problems. Explicitly setting the context length in both programs fixed the issue but ultimately a quantisised 32b model is going to have limited performance.