Skip to content

fix(session): stop retrying free and Go usage quotas - #47339

Open
KaranDhillon05 wants to merge 2 commits into
anomalyco:devfrom
KaranDhillon05:stop-free-retries
Open

fix(session): stop retrying free and Go usage quotas#47339
KaranDhillon05 wants to merge 2 commits into
anomalyco:devfrom
KaranDhillon05:stop-free-retries

Conversation

@KaranDhillon05

@KaranDhillon05 KaranDhillon05 commented Sep 4, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #47318

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Free Zen models return FreeUsageLimitError with a long daily retry-after. The session retry policy treated that like a normal 429 and slept for hours (Free usage exceeded, subscribe to Go [retrying in 8h …]).

This change treats free_tier_limit and account_rate_limit as terminal: publish the existing Go upsell status once so App/TUI dialogs still fire, then stop instead of waiting. Free-tier API errors also persist the Go upsell message instead of a generic rate-limit string. Ordinary short-window 429s still retry.

How did you verify your code works?

  • bun test test/session/retry.test.ts test/provider/error.test.ts in packages/opencode (65 pass)
  • bun typecheck in packages/opencode

Screenshots / recordings

N/A — non-UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Treat FreeUsageLimitError and GoUsageLimitError as terminal so the
client surfaces the Go upsell once instead of sleeping for hours on
retry-after. Persist the Go upsell message for free-tier failures.

Closes anomalyco#47318

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found:

Why it might be related:
Both PRs address the same feature: stopping retries for Go and free-tier usage quota limits, and ensuring Go upsell prompts are shown to users. PR #46994 appears to be a previous attempt at this same fix. You should verify whether #46994 is already merged/closed or if this PR (#47339) is a revised/rebased version addressing the same issue.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@KaranDhillon05

Copy link
Copy Markdown
Author

Just a heads up to maintainers: The bot flagged this as a duplicate of #46994, but that PR targets the v2 branch. This PR applies the fix to release/dev (v1.18.x) to resolve the issue for current users.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limit Exceeded error

2 participants