Skip to content

[Bug]: Infinite retry loop on consistent provider failure #29143

Closed as not planned

Description

@niStee

Description

The fallback system can spin in an infinite retry loop when a provider consistently fails. We should cap retry attempts (e.g. at 5) so the fallback system can proceed to the next configured model instead of spinning indefinitely.

Steps to Reproduce

  1. Configure a provider that consistently fails (e.g., due to network error or repeated 500 responses).
  2. Trigger the fallback system to use this provider.
  3. Observe the session logs showing an infinite retry loop without proceeding to the next configured model.

Expected Behavior

The retry loop should be capped at a reasonable limit (e.g., 5 attempts). Once the limit is reached, it should return an exhaustion status so the system can proceed to the next fallback model.

Environment

  • OS: Any
  • OpenCode version: dev
  • Provider/model: Any consistently failing provider

Activity

  1. github-actions commented on May 24, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. github-actions commented on Jul 24, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  3. niStee commented on Aug 13, 2026

    @niStee
    Author

    Reopened for reassessment: the linked contributor PR was closed by automated stale-PR cleanup rather than merged. The issue should be re-triaged against current dev; a refreshed PR should follow the current contribution template and include current verification.

  4. niStee commented on Aug 13, 2026

    @niStee
    Author

    Correction: GitHub rejected my reopen request because this account lacks repository permission to reopen issues. The issue remains closed. The recommendation is a fresh issue or maintainer-assisted reopen only if the behavior is still reproducible on current dev; the old PR should not be reopened unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions