Make Loop resilient to network retry dead-ends and terminal spam - #141
Merged
Conversation
ByBrawe
marked this pull request as ready for review
August 22, 2026 12:57
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
session.status=retryauthoritative: stale busy recovery can no longer reinterpret provider retry as idlerunCount/lastRunAtwhen a Loop-owned turn never really starts or is released by the provider-retry watchdog, so outages do not consume--max-runsfailureCount/--max-failuresretry, abort only the persisted Loop-owned active turn, refund it, and retry with backoff; unrelated user retries are never aborted/loop devam etas intentionally infinitebitene kadar,until done,projeyi bitir), require a fresh completion/no-work reply twice before auto-pausing, preventing hundreds of post-completion continuation turnsEvidence motivating this
A real session log showed an explicit
devam et bitene kadar ... projeyi bitirloop producing hundreds of identical post-completion turns (project complete,nothing left) and repeated compaction untilloop-clearwas issued. Separately, current OpenCode versions and historical issues expose both transient network failures that kill a request and provider retries that can remain inretry; Loop must neither drop the job nor double-dispatch.Safety model
retryand unknown status are never stale-recovered to idle by age alone/loop devam etremains unlimited exactly as documented/requestedRegression coverage
Draft until source CI is green and the generated stable
src/index.jsbundle is synchronized and passes Bundle Gate.