Skip to content

GLM-5 model gets stuck in infinite loop, repeating same actions #18415

Closed as not planned

Description

@corrm

Description

When using the GLM-5(Alibaba Coding Plan) model with opencode, the agent sometimes gets stuck in an infinite loop where it performs the same actions repeatedly instead of progressing through the task. This behavior doesn't occur with other models.

That happens a lot of times.

Plugins

[ "opencode-websearch-cited@latest", "@nick-vi/opencode-type-inject", "oh-my-opencode" ]

OpenCode version

No response

Steps to reproduce

  1. Use opencode with GLM-5 model
  2. Give a moderately complex task that requires multiple steps
  3. Observe that the agent starts repeating the same tool calls or actions
  4. The agent continues this loop indefinitely without completing the task

Screenshot and/or share link

Image

Operating System

No response

Terminal

No response

Activity

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

    @github-actions
    Contributor

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

  3. bgruszka commented on Apr 4, 2026

    @bgruszka

    Same here - right now it's not usable anymore.

  4. neuhaus commented on May 1, 2026

    @neuhaus

    It's an issue with the LLM, not opencode I'd say

  5. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 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