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
Agent enters a repetitive tool call loop (over-fetching) when executing complex tasks: it runs the same query multiple times without synthesizing the answer or advancing toward the objective, even when it already has sufficient information. The user needs to explicitly interrupt with commands like "Stop and answer now" to force synthesis.
Environment
opencode version: 2.0.32
OS: Linux 7.0.0-38-generic (linux x64)
Terminal: Unavailable: terminal environment variables are not set
Shell: /bin/bash
Install/channel: latest
Active plugins: None found
Reproduction
Send a complex prompt with multiple tasks (e.g., "Make the commit and resolve the GAPs")
The agent executes a tool (e.g., git log --oneline -5)
Instead of synthesizing the answer, the agent repeats the same tool call indefinitely
The loop is only interrupted when the user sends an explicit stop command
Expected Behavior
The agent should:
Stop fetching information as soon as it has sufficient data for a factual answer
Synthesize and answer objectively without repeating queries
Recognize signs of user impatience and adjust behavior immediately
Actual Behavior
The agent enters an infinite loop of identical tool calls, repeating the same query (e.g., git log --oneline -5) dozens of times without advancing toward the objective or responding to the user. There is no automatic stop mechanism when sufficient information has been collected.
Additional Context
Frequency: Occurs "very frequently" in complex tasks
Affected models: qwen3.6:35b-a3b (default) and qwen3-coder-next:latest — the problem is not specific to one model, it occurs with both
Workaround: User needs to explicitly interrupt with commands like:
"Stop and answer now"
"Answer objectively with what you have"
"Just answer, no more searches"
Impact: Seriously compromises the workflow; tasks that should be resolved in minutes extend indefinitely
Typical scenario: Tasks involving multiple steps (commits, tests, validations) where the agent needs to collect information before answering
Thanks for the detailed report! I think this is a duplicate of #45442. In both, the agent keeps sending the same tool call and nothing in OpenCode stops it until you interrupt manually. The repetition itself comes from the model, but OpenCode on v2 has no check that catches repeated identical calls. Open PR #53032 adds that check to the v2 runner and is linked to #45442.
Possible duplicates and related issues, ordered by likelihood:
We haven't heard back, so I'm closing this as a duplicate of #45442. That issue also covers the agent sending the same tool call over and over with nothing in OpenCode stopping it. Please follow #45442 and PR #53032, which adds a check for repeated tool calls to v2. Related issues are #51965 and #47759.
If your problem turns out to be different, for example it still happens once that check is in, please reply here or open a new issue with the details. Thanks for the report!
Activity
opencode-agent commentedon Oct 18, 2026
Thanks for the detailed report! I think this is a duplicate of #45442. In both, the agent keeps sending the same tool call and nothing in OpenCode stops it until you interrupt manually. The repetition itself comes from the model, but OpenCode on v2 has no check that catches repeated identical calls. Open PR #53032 adds that check to the v2 runner and is linked to #45442.
Possible duplicates and related issues, ordered by likelihood:
doom_loopcheck never fires when the repeated calls are spread over several steps (one tool call per step, as often happens with local models)A, B, A, Bgit status/git commitcalls)The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 19, 2026
We haven't heard back, so I'm closing this as a duplicate of #45442. That issue also covers the agent sending the same tool call over and over with nothing in OpenCode stopping it. Please follow #45442 and PR #53032, which adds a check for repeated tool calls to v2. Related issues are #51965 and #47759.
If your problem turns out to be different, for example it still happens once that check is in, please reply here or open a new issue with the details. Thanks for the report!