Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

OpenCode Go 403 'subscription required' and Z.ai 1313 are retried as transient

Open Beginner friendly
#3,350 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
backend

Research direction

Start with isRetryableAssistantError and NON_RETRYABLE_PROVIDER_ERROR_PATTERN in packages/ai/src/utils/retry.ts, then SUBSCRIPTION_LIMIT_PATTERN and usageLimitScope in retry-fallback/usage-limit.ts. Add the five listed markers to both, keeping the 429 and 503 throttle texts retryable. Done when the five refusals return retryable=false with a scope and the two control texts still return true, checked by the retry tests.

Written by the indexing model from the issue text.

Description

What happened?

Two entitlement or account-state refusals are classified as transient, so the turn retries them with backoff before any fallback. Waiting cannot lift either one:

  • 403 An active OpenCode Go subscription is required to use Go models. The body has type: "server_error", which is what matches the retryable server.?error pattern.
  • Z.ai 429 code 1313 Your request frequency has been limited due to abnormal usage. To restore access, please submit a request. The 429 matches the retryable pattern.

Observed on one install: the OpenCode Go refusal produced 4 bursts of 3 to 4 retries within 8 to 19 s on 2026-10-13. The 1313 text asks the user to submit a request to restore access, so repeated retries cannot help.

Three similar refusals are already terminal for the retry loop, but no scope is recorded for any of the five (usageLimitScope returns undefined), so the provider only gets the default selector cooldown (20 s, 30 s, or 5 min) and is picked again:

  • Kimi 403 Your current subscription does not have access to Kimi Code right now.
  • Antigravity 400 FAILED_PRECONDITION User location is not supported for the API use.
  • Antigravity 403 Verify your account to continue
Steps to reproduce

On main (b8c1d3a84), isRetryableAssistantError({ stopReason: "error", errorMessage }) from packages/ai/src/utils/retry.ts:

403: {"type":"server_error","message":"Upstream request failed: An active OpenCode Go subscription is required to use Go models."}   -> true
429: {"code":"1313","message":"Your request frequency has been limited due to abnormal usage. To restore access, please submit a request."}   -> true

The Kimi and Antigravity texts return false. Real throttles (429 Rate limit reached for requests, 503 Our servers are currently overloaded) return true and must stay that way.

Expected behavior

All five are terminal for the retry loop (immediate fallback, no same-model retry) and bind the account. Proposed change: add the markers to NON_RETRYABLE_PROVIDER_ERROR_PATTERN in retry.ts, where non-retryable outranks retryable:

"an active [^\\n]{0,40}subscription is required",
"subscription does not have access",
"user location is not supported",
"request frequency has been limited",
"verify your account to continue",

and the same five to SUBSCRIPTION_LIMIT_PATTERN in retry-fallback/usage-limit.ts, so usageLimitScope is set (account; model for the OpenCode Go text, which contains "models").

On copies of main's two files all five return retryable=false with a scope, and the two control texts stay true.

Version

2026.10.13; the classifier is unchanged on main.

Disclosure: drafted with an AI coding agent from my own session logs; I ran the checks quoted above.

Dominant language
TypeScript
Stars
479
Forks
139
Avg merge
6h 56m
Merged PRs (30d)
781

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from code-yeongyu/senpi

All issues in code-yeongyu/senpi

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.