You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model repeats the same response in a loop after generating an answer #16218
When I provide a prompt in OpenCode, the model generates a correct response initially. However, after generating the response, it keeps repeating the same answer continuously in a loop instead of stopping after the first response.
Plugins
Github co-pilot
OpenCode version
1.2.16
Steps to reproduce
OpenCode.
2.Enter any prompt (example: "Explain edge detection in image processing").
I realized this is actually because opencode defaults to a temperature of 0 for most models, but the recommended temperature for hunter alpha (Xiami Mimo V2 Pro in disguise) is 0.8 with a minimal system prompt, so I created a separate agent for hunter alpha with those settings.
Haha Ig that's fair, but we don't set temperature for these models currently, so we are just relying on the provider defaults. "Most models" is confusing, i should prolly reword that
the problem is still the same it gets to loop and even wen it finished in writing or creating files by open code or claude code or any agent its get provider gets an error or The write tool was called with invalid arguments: [ { "expected": "string", "code": "invalid_type", "path": [ "content" ], "message": "Invalid input: expected string, received undefined" }, { "expected": "string", "code": "invalid_type", "path": [ "filePath" ], "message": "Invalid input: expected string, received undefined" } ]. Please rewrite the input so it satisfies the expected schema.
Still having the same issue as well, has anyone else figured this out? I'm experiencing the issue even when exclusively using the big pickle model as default so I don't think it's a model issue but what do I know.
Just try creating a new agent profile with temperature 0.7 or around that with a minimal system prompt. Works with most models that I've had this issue with.
Activity
github-actions commentedon Mar 5, 2026
This issue might be a duplicate of existing issues. Please check:
finish_reason=stop- describes the root cause of the same behavior you're experiencingHona commentedon Mar 5, 2026
can you please include a screen recording? that would be great
rishilpasunuri commentedon Mar 6, 2026
Screen.Recording.2026-03-06.092601.mp4
naowalrahman commentedon Mar 12, 2026
experiencing this as well, in the reasoning chain of models. in my case I'm testing the new hunter alpha and healer alpha models on openrouter.
tracure1337 commentedon Mar 18, 2026
similar issue:
naowalrahman commentedon Mar 18, 2026
I realized this is actually because opencode defaults to a temperature of 0 for most models, but the recommended temperature for hunter alpha (Xiami Mimo V2 Pro in disguise) is 0.8 with a minimal system prompt, so I created a separate agent for hunter alpha with those settings.
rekram1-node commentedon Mar 18, 2026
Hm that shouldn't be the case at all...
naowalrahman commentedon Mar 19, 2026
Docs say this:
"If no temperature is specified, OpenCode uses model-specific defaults; typically 0 for most models, 0.55 for Qwen models."
rekram1-node commentedon Mar 19, 2026
Haha Ig that's fair, but we don't set temperature for these models currently, so we are just relying on the provider defaults. "Most models" is confusing, i should prolly reword that
ah12311 commentedon Mar 28, 2026
the problem is still the same it gets to loop and even wen it finished in writing or creating files by open code or claude code or any agent its get provider gets an error or The write tool was called with invalid arguments: [ { "expected": "string", "code": "invalid_type", "path": [ "content" ], "message": "Invalid input: expected string, received undefined" }, { "expected": "string", "code": "invalid_type", "path": [ "filePath" ], "message": "Invalid input: expected string, received undefined" } ]. Please rewrite the input so it satisfies the expected schema.
Arsalankhan315 commentedon Mar 28, 2026
Ho
VoidKillBox commentedon Apr 13, 2026
Still having the same issue as well, has anyone else figured this out? I'm experiencing the issue even when exclusively using the big pickle model as default so I don't think it's a model issue but what do I know.
Corxo commentedon Apr 22, 2026
This happened to me as well with Qwen 3 32B via Amazon Bedrock
sunil19822701 commentedon Apr 24, 2026
Same happens with me using big pickle
sam-laister commentedon May 1, 2026
im also running into this
igor-camara commentedon May 1, 2026
also running into this
naowalrahman commentedon May 1, 2026
Just try creating a new agent profile with temperature 0.7 or around that with a minimal system prompt. Works with most models that I've had this issue with.
hellozepp commentedon Jun 4, 2026
also running into this
github-actions commentedon Aug 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.