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
AI stuck in an infinite repetition loop and fails to execute commands #46239
I am encountering an issue where the AI assistant gets stuck in a continuous text generation loop.
As you can see in the attached screenshot ({89CEA8ED-45EE-4DD9-AF4A-AC35D3E9753D}.png), instead of executing the requested task or writing the code, the AI endlessly repeats the same Arabic phrases (repeatedly stating its intention to use the bash tool). It seems to be failing to correctly format the tool call, resulting in an infinite hallucination loop where it just narrates what it wants to do without ever actually starting the execution.
Expected Behavior:
The AI should successfully invoke the tool and execute the task instead of getting stuck in a repetitive text loop.
If your issue is the same as one of these, please add a comment there instead so the discussion stays consolidated. If it's a distinct case, please update this issue with additional details (OpenCode version, model/provider used, OS) to help differentiate it.
Closing as not planned. A model that keeps saying it will run a command but never makes the tool call is model behavior, not something OpenCode can fix on its side. Trying a different model or starting a fresh session usually helps. If you see it on a current 2.0 build with a specific model and it looks like OpenCode is dropping the tool call, open a new issue with the version, model and provider.
Activity
github-actions commentedon Aug 30, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is the same as one of these, please add a comment there instead so the discussion stays consolidated. If it's a distinct case, please update this issue with additional details (OpenCode version, model/provider used, OS) to help differentiate it.
neriousy commentedon Oct 22, 2026
Closing as not planned. A model that keeps saying it will run a command but never makes the tool call is model behavior, not something OpenCode can fix on its side. Trying a different model or starting a fresh session usually helps. If you see it on a current 2.0 build with a specific model and it looks like OpenCode is dropping the tool call, open a new issue with the version, model and provider.