-
Couldn't load subscription status.
- Fork 2.3k
Description
When using the GLM-4.6 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 Claude Code or other models.
Steps to reproduce:
- Use opencode with GLM-4.6 model (via z.ai plan provider)
- Give a moderately complex task that requires multiple steps
- Observe that the agent starts repeating the same tool calls or actions
- The agent continues this loop indefinitely without completing the task
Expected behavior:
The agent should progress through the task logically, completing each step and moving to the next one, similar to how Claude Code behaves.
Actual behavior:
The GLM-4.6 model gets stuck repeating the same actions in a loop, never progressing to complete the task.
Environment:
- Model: GLM-4.6 (z.ai plan provider)
- Other models work fine (Claude Code, etc.)
Additional context:
This appears to be specific to the GLM-4.6 model's behavior or how it processes the opencode tool system. The issue doesn't occur with other models, suggesting it's not a general opencode bug but rather a model-specific interaction problem.
