Skip to content

[Bug]: Model rate limit error causes immediate termination instead of auto-retry #16994

Description

@otto-apoc

Description

When the model provider returns the following rate limit error, opencode terminates the current task immediately instead of retrying automatically:

You have exceeded the request rate limit. Please wait a short period before retrying your request or contact the support to increase your request rate limit.

Expected Behavior

Detect this rate limit response and apply retry-with-backoff logic, similar to what was added for other rate limit cases (see #452). The user should not need to restart their entire task.

Current Behavior

opencode aborts the task immediately upon receiving this error message. There is no retry attempt.

Steps to Reproduce

Trigger a request that causes the model provider to respond with the rate limit message above (e.g. by sending many requests in a short period).

Notes

Activity

added
coreAnything pertaining to core functionality of the application (opencode server stuff)
on Mar 11, 2026

github-actions commented on Mar 11, 2026

@github-actions
Contributor

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

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

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions