Quota Limit Exceeded Error is not handled properly. #2328

Closed
opened 2026-02-16 17:35:08 -05:00 by yindo · 12 comments
Owner

Originally created by @arhen on GitHub (Oct 29, 2025).

Originally assigned to: @thdxr on GitHub.

Description

When using opencode with Github Copilot provider quota is reached max limit, there is no anything happened neither notification errors.
It stuck on Generating . . . loading:
Image

Logs:

Image

OpenCode version

v0.15.23

Steps to reproduce

  1. Login using GitHub copilot with reached max limit token
  2. Prompt whatever

Screenshot and/or share link

No response

Operating System

macOS 26.x

Terminal

Ghostty

Originally created by @arhen on GitHub (Oct 29, 2025). Originally assigned to: @thdxr on GitHub. ### Description When using opencode with Github Copilot provider quota is reached max limit, there is no anything happened neither notification errors. It stuck on `Generating . . .` loading: <img width="1721" height="767" alt="Image" src="https://github.com/user-attachments/assets/70dc5960-6acc-4749-a9c9-fbc1f74355ce" /> Logs: <img width="1709" height="137" alt="Image" src="https://github.com/user-attachments/assets/20360512-a12c-4c9d-80eb-f12200812b86" /> ### OpenCode version v0.15.23 ### Steps to reproduce 1. Login using GitHub copilot with reached max limit token 2. Prompt whatever ### Screenshot and/or share link _No response_ ### Operating System macOS 26.x ### Terminal Ghostty
yindo added the bug label 2026-02-16 17:35:08 -05:00
yindo closed this issue 2026-02-16 17:35:08 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 29, 2025):

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

  • #3106: Exact same issue - OpenCode gets stuck on "generating" when provider quota is reached without showing error notifications (this was already closed, suggesting a fix was implemented)
  • #877: Same symptoms but for Claude provider - stuck at "working..." when usage limit reached (also closed)
  • #452: Similar quota/rate limiting issues with AWS Bedrock, requests more resilient retry policy

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 29, 2025): This issue might be a duplicate of existing issues. Please check: - #3106: Exact same issue - OpenCode gets stuck on "generating" when provider quota is reached without showing error notifications (this was already closed, suggesting a fix was implemented) - #877: Same symptoms but for Claude provider - stuck at "working..." when usage limit reached (also closed) - #452: Similar quota/rate limiting issues with AWS Bedrock, requests more resilient retry policy Feel free to ignore if none of these address your specific case.
Author
Owner

@berenar commented on GitHub (Oct 29, 2025):

Yes I've seen this happen to me too. While https://github.com/sst/opencode/issues/768 would allow the user to see what happened, it would not fix it

@berenar commented on GitHub (Oct 29, 2025): Yes I've seen this happen to me too. While https://github.com/sst/opencode/issues/768 would allow the user to see what happened, it would not fix it
Author
Owner

@CoolCold commented on GitHub (Nov 9, 2025):

I've just hit the same issue, namely with Gemini and 429 / rate limit exceeded isssue
This type of things are handled quite well by Aider ( https://github.com/Aider-AI/aider ) and somewhat by Crush ( https://github.com/charmbracelet/crush/issues/536#issuecomment-3150288991 )

  • Aider does exponential backoff - retrying in 2, 4, 8..seconds with clear visible indication
  • Crush currently just reports the issue and stops - which is yet better than infinite retry
  • From what I see, Gemini API replies with the time interval when you can repeat your query back again - can be taken as a hint I guess

Opencode keeps going for hours, like:

  • Image
  • Image

Note, that ratelimits can happen on both free and paid subscription on Gemini/Google

❯ opencode --version
1.0.45

My naive understanding of recent changes, in Zen ratelimiter - https://github.com/sst/opencode/commit/30b1ae5d4b071f5637c1a590a177b5017a28c90b#diff-8ab8205b374f3d1907779abb668ee07eb06a6d8ba82bd5ce4991005375d01d6cR102 says that currently the way is to implement it per provider , not as a generic phase of request handling and I don't see the retry with backoff - I may be totally wrong here of course.

@CoolCold commented on GitHub (Nov 9, 2025): I've just hit the same issue, namely with Gemini and 429 / rate limit exceeded isssue This type of things are handled quite well by Aider ( https://github.com/Aider-AI/aider ) and somewhat by Crush ( https://github.com/charmbracelet/crush/issues/536#issuecomment-3150288991 ) * Aider does exponential backoff - retrying in 2, 4, 8..seconds with clear visible indication * Crush currently just reports the issue and stops - which is yet better than infinite retry * From what I see, Gemini API replies with the time interval when you can repeat your query back again - can be taken as a hint I guess Opencode keeps going for hours, like: * <img width="1280" height="768" alt="Image" src="https://github.com/user-attachments/assets/2d5ac22d-798b-4eb1-9d40-588da0344bcd" /> * <img width="1280" height="836" alt="Image" src="https://github.com/user-attachments/assets/4c076c38-645a-4530-91eb-ecc9256847f0" /> Note, that ratelimits can happen on both free and paid subscription on Gemini/Google ``` ❯ opencode --version 1.0.45 ``` My naive understanding of recent changes, in Zen ratelimiter - https://github.com/sst/opencode/commit/30b1ae5d4b071f5637c1a590a177b5017a28c90b#diff-8ab8205b374f3d1907779abb668ee07eb06a6d8ba82bd5ce4991005375d01d6cR102 says that currently the way is to implement it per provider , not as a generic phase of request handling and I don't see the retry with backoff - I may be totally wrong here of course.
Author
Owner

@rekram1-node commented on GitHub (Nov 9, 2025):

@CoolCold very valid points and both of these will be fixed soon

the visual part is something we have been missing wayy too long

and the other part will be fixed first thing tmr

@rekram1-node commented on GitHub (Nov 9, 2025): @CoolCold very valid points and both of these will be fixed soon the visual part is something we have been missing wayy too long and the other part will be fixed first thing tmr
Author
Owner

@burka commented on GitHub (Nov 16, 2025):

I hit those limits with my Cerebras.ai plan which will return a 429 until midnight each time and opencode just stalls. That feels really awkward :-/

@burka commented on GitHub (Nov 16, 2025): I hit those limits with my Cerebras.ai plan which will return a 429 until midnight each time and opencode just stalls. That feels really awkward :-/
Author
Owner

@rekram1-node commented on GitHub (Nov 16, 2025):

Dax has this fixed should ship soon I think

@rekram1-node commented on GitHub (Nov 16, 2025): Dax has this fixed should ship soon I think
Author
Owner

@burka commented on GitHub (Nov 18, 2025):

When I am out of quota it just stalled yesterday, but today I saw this beautiful message :-) <3
Image

@burka commented on GitHub (Nov 18, 2025): When I am out of quota it just stalled yesterday, but today I saw this beautiful message :-) <3 <img width="1249" height="66" alt="Image" src="https://github.com/user-attachments/assets/55f3af6d-e284-4b9d-9aa9-1518e07bed1a" />
Author
Owner

@rekram1-node commented on GitHub (Nov 18, 2025):

Yay!

@rekram1-node commented on GitHub (Nov 18, 2025): Yay!
Author
Owner

@burka commented on GitHub (Nov 18, 2025):

Love it! Don't love the message, but love the way opencode shows it! Thanks a lot! <3

Image
@burka commented on GitHub (Nov 18, 2025): Love it! Don't love the message, but love the way opencode shows it! Thanks a lot! <3 <img width="1101" height="61" alt="Image" src="https://github.com/user-attachments/assets/738b79fd-7108-4eb5-a2d9-00173a385d9c" />
Author
Owner

@rekram1-node commented on GitHub (Nov 18, 2025):

I think the message comes from whatever provider u are using

@rekram1-node commented on GitHub (Nov 18, 2025): I think the message comes from whatever provider u are using
Author
Owner

@burka commented on GitHub (Nov 18, 2025):

Yeah! That's the Cerebras Message when you hit your 120M token per day limit :-) So everything is great, thanks for this new message! Before this update opencode just stalled and stopped doing anything, so it's a lot better :-) Even though I would prefer my Quota to never end.... Thanks for your work!

@burka commented on GitHub (Nov 18, 2025): Yeah! That's the Cerebras Message when you hit your 120M token per day limit :-) So everything is great, thanks for this new message! Before this update opencode just stalled and stopped doing anything, so it's a lot better :-) Even though I would prefer my Quota to never end.... Thanks for your work!
Author
Owner

@arhen commented on GitHub (Dec 4, 2025):

Thankyou @rekram1-node

@arhen commented on GitHub (Dec 4, 2025): Thankyou @rekram1-node
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2328