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
[Feature]: Auto-retry on MCP tool rate limit instead of terminating #16993
When an MCP tool call hits a rate limit, opencode immediately terminates the current task instead of retrying automatically.
Error message seen:
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.
This is especially disruptive because the agent aborts mid-task, requiring the user to manually re-trigger the entire workflow from scratch.
Expected Behavior
When an MCP tool call returns a rate limit error (e.g. HTTP 429 or a message matching the pattern above), opencode should:
Automatically retry the tool call with exponential backoff instead of terminating
Inform the user that a rate limit was hit and a retry is in progress (e.g. Rate limited by MCP tool, retrying in Xs...)
Continue the task seamlessly after a successful retry
Current Behavior
opencode terminates the current generation/task immediately when an MCP tool responds with a rate limit error.
The same retry-with-backoff approach should be applied consistently to MCP tool calls
Users should not need to restart their entire task just because an external tool was temporarily rate limited
Suggested Implementation
Apply the existing retry/backoff logic (used for LLM provider rate limits) to MCP tool call errors as well — detecting rate limit signals in the tool response and retrying with appropriate delay before propagating the error to the agent.
Activity
otto-apoc commentedon Mar 11, 2026
Closing: misidentified as MCP tool rate limit. The actual issue is model provider rate limiting.
roadmap: #215 filed — expect_success reads only request-id/x-request-…
roadmap: #215 filed — expect_success reads only request-id/x-request-…
roadmap: ultraworkers#215 filed — expect_success reads only request-i…
roadmap: ultraworkers#215 filed — expect_success reads only request-i…
roadmap: ultraworkers#215 filed — expect_success reads only request-i…
roadmap: ultraworkers#215 filed — expect_success reads only request-i…
roadmap: #215 filed — expect_success reads only request-id/x-request-…
roadmap: #215 filed — expect_success reads only request-id/x-request-…