Skip to content

Model repeats the same response in a loop after generating an answer #16218

Closed as not planned

Description

@rishilpasunuri

Description

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

  1. OpenCode.

2.Enter any prompt (example: "Explain edge detection in image processing").

3.Wait for the model to generate the response.

4.Observe that the response repeats continuously.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows terminal

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 5, 2026
  2. github-actions commented on Mar 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  3. Hona commented on Mar 5, 2026

    @Hona
    Member

    can you please include a screen recording? that would be great

  4. rishilpasunuri commented on Mar 6, 2026

    @rishilpasunuri
    Author
    Screen.Recording.2026-03-06.092601.mp4
  5. naowalrahman commented on Mar 12, 2026

    @naowalrahman

    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.

  6. tracure1337 commented on Mar 18, 2026

    @tracure1337

    similar issue:

    Image
  7. naowalrahman commented on Mar 18, 2026

    @naowalrahman

    similar issue:

    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.

  8. rekram1-node commented on Mar 18, 2026

    @rekram1-node
    Contributor

    opencode defaults to a temperature of 0 for most models

    Hm that shouldn't be the case at all...

  9. naowalrahman commented on Mar 19, 2026

    @naowalrahman

    opencode defaults to a temperature of 0 for most models

    Hm that shouldn't be the case at all...

    Docs say this:
    "If no temperature is specified, OpenCode uses model-specific defaults; typically 0 for most models, 0.55 for Qwen models."

  10. rekram1-node commented on Mar 19, 2026

    @rekram1-node
    Contributor

    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

  11. ah12311 commented on Mar 28, 2026

    @ah12311

    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.

  12. Arsalankhan315 commented on Mar 28, 2026

    @Arsalankhan315

    Ho

  13. VoidKillBox commented on Apr 13, 2026

    @VoidKillBox

    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.

  14. Corxo commented on Apr 22, 2026

    @Corxo

    This happened to me as well with Qwen 3 32B via Amazon Bedrock

  15. sunil19822701 commented on Apr 24, 2026

    @sunil19822701

    Same happens with me using big pickle

  16. sam-laister commented on May 1, 2026

    @sam-laister

    im also running into this

  17. igor-camara commented on May 1, 2026

    @igor-camara

    also running into this

  18. naowalrahman commented on May 1, 2026

    @naowalrahman

    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.

  19. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  20. hellozepp commented on Jun 4, 2026

    @hellozepp

    also running into this

  21. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions