Skip to content

More resilient retry policy for Amazon Bedrock rate limiting #452

Closed

Description

@gabrielcolson

Claude Sonnet 4 juste became available in my AWS region (eu-central-1) and my increase quota request is still pending so I often get rate limited. This is not an issue in Claude Code as they use some sort of exponential backoff and it eventually works but it looks like OpenCode just tries 3 times and stops the generation.

Would be great if we had a more resilient retry policy in OpenCode.

Activity

  1. self-assigned this
    on Jun 27, 2025
  2. phenomen commented on Jun 27, 2025

    @phenomen

    I use the official Anthropic API endpoint and get rate limited all the time. It would be great if OpenCode had:

    1. More retries
    2. A longer pause between retries

    I would rather wait a minute for the limit to reset than have the agent drop the task basically immediately.

  3. AsocPro commented on Jun 27, 2025

    @AsocPro

    It would be cool if this could be designed in a way that it would work for Claude subscriptions so if a limit was hit and then say I went to bed open code could pick up in a few hours or whenever my limits reset in the 5 hour interval. I don’t know if those limits give any info on when they will reset but it would be cool for it to use the quota for the 5 hour period where I would be sleeping and otherwise not using any tokens.
    I don’t know if that would make too crazy of a back off or not but that just would help get more bang for my buck.

  4. kierr commented on Oct 8, 2025

    @kierr

    I use the official Anthropic API endpoint and get rate limited all the time. It would be great if OpenCode had:

    1. More retries
    2. A longer pause between retries

    I would rather wait a minute for the limit to reset than have the agent drop the task basically immediately.

    Retries is now 10, and then there's also #2116

  5. added a commit that references this issue on May 12, 2026
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