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
Doom loop is not caught when during reasoning or output #12716
Oh I see, you are targeting this as a feature request. Ok cool, but please mark the issue as such (e.g. using [FEATURE] tag in the title), the feature works as currently designed and is not a bug.
doom loop in thinking has been especially strange because it will think forever, like longer than the context window usually allows. does opencode just continually send requests in thinking mode?
I’d treat this as a separate detector rather than extending tool doom-loop logic.
For reasoning/output loops, the primitive is repeated assistant turns with near-identical content and no external state change, plus a hard cap on consecutive model-only turns. Otherwise smaller models can burn tokens forever without ever touching the tool layer, which means the existing guard never even gets a chance to help.
Related: opened PR #32089 which fixes the doom loop detection for tool calls across messages. The reasoning/output loop detection you describe here is a separate issue that would need its own fix (detecting repetitive text/reasoning blocks, not tool calls). PR #21112 appears to be working on that.
Activity
github-actions commentedon Feb 8, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
Nindaleth commentedon Feb 14, 2026
(ref) I don't see any tool calls in your screenshot.
Heinrich-XIAO commentedon Feb 14, 2026
Yeah. That's what I mean. It makes sense for it to catch non-tool call doom loops.
Nindaleth commentedon Feb 14, 2026
Oh I see, you are targeting this as a feature request. Ok cool, but please mark the issue as such (e.g. using
[FEATURE]tag in the title), the feature works as currently designed and is not a bug.zenoda commentedon Apr 1, 2026
same problem
dezren39 commentedon Apr 6, 2026
doom loop in thinking has been especially strange because it will think forever, like longer than the context window usually allows. does opencode just continually send requests in thinking mode?
sandeep-chaps commentedon Apr 30, 2026
the doom_loop: deny switch is not working, using opencode github plugin, we are seeing several doom loops in PR reviews.
| Read {"filePath":"<CI_WORKSPACE>//verif/tbs/xbar/agents/xbar_mport_scheduler/xbar_mport_scheduler.sv","limit":25,"offset":127}
| Read {"filePath":"<CI_WORKSPACE>//verif/tbs/xbar/agents/xbar_mport_scheduler/xbar_mport_scheduler.sv","limit":25,"offset":127}
| Read {"filePath":"<CI_WORKSPACE>//verif/tbs/xbar/agents/xbar_mport_scheduler/xbar_mport_scheduler.sv","limit":25,"offset":127}
| Read {"filePath":"<CI_WORKSPACE>//verif/tbs/xbar/agents/xbar_mport_scheduler/xbar_mport_scheduler.sv","limit":25,"offset":127}
Also see patterns like A B A B A B A B also not get detected.
Ultimately filled up context limit since it cannot be interactively stopped on github opencode plugin
Keesan12 commentedon Jun 5, 2026
I’d treat this as a separate detector rather than extending tool doom-loop logic.
For reasoning/output loops, the primitive is repeated assistant turns with near-identical content and no external state change, plus a hard cap on consecutive model-only turns. Otherwise smaller models can burn tokens forever without ever touching the tool layer, which means the existing guard never even gets a chance to help.
JustSidus commentedon Jun 12, 2026
Related: opened PR #32089 which fixes the doom loop detection for tool calls across messages. The reasoning/output loop detection you describe here is a separate issue that would need its own fix (detecting repetitive text/reasoning blocks, not tool calls). PR #21112 appears to be working on that.
github-actions commentedon Aug 12, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.