All fixes · OpenCode / upstream · 429 · Rate limits

OpenCode Rate Limited? Why It Happens and How to Fix It

OpenCode: rate limit exceeded / 429 from provider

OpenCode itself doesn't rate limit: it's BYO-provider, so the 429 comes from whichever backend you configured: Anthropic/OpenAI per-minute caps, OpenCode Go's usage windows ($12/5-hour and $30/week), or OpenRouter's allowances. First identify which provider threw it; the fix is provider-specific, and the structural fix is a backend with no 5-hour or weekly usage windows and a per-minute ceiling well above your agent's burst rate.

What causes it

  • Anthropic or OpenAI API keys: per-minute request/token limits (RPM/TPM) sized for chat, tripped by OpenCode's agent loop firing many calls per task.
  • OpenCode Go plan: its usage windows — roughly $12 of usage per 5 hours and $30 per week — are exhausted, so requests are refused until the window rolls.
  • OpenRouter: free-model daily caps, account rate allowance (scales with credit balance), or the upstream provider throttling and OpenRouter relaying it.
  • Anthropic subscription auth (Claude Pro/Max): the plan's 5-hour session window or weekly cap is spent — same limits as Claude Code.
  • Retries after a 429 amplifying the burst and keeping you over the limit.

How to fix it

  1. Identify the source first: check which provider is configured for the active model in opencode.json — the 429 belongs to that provider, not OpenCode.
  2. Anthropic/OpenAI keys: add backoff, cut parallel tool calls, and move up a usage tier for higher RPM/TPM.
  3. OpenCode Go: wait for the 5-hour or weekly window to roll, or shift the overflow work to a different configured provider.
  4. OpenRouter: switch off :free model variants, top up credits (allowance scales with balance), or enable provider fallbacks.
  5. Configure a fallback model/provider in OpenCode so a throttled backend doesn't stall the whole session.
  6. For daily agent use, point OpenCode at a flat-rate OpenAI-compatible endpoint with no usage windows and a high per-key request ceiling.

Running an agent? OpenCode's agent loop makes many provider calls per prompt — plan steps, tool results, edits. Limits sized for a human typing get consumed several times faster, which is why the same key that works fine in a chat UI 429s inside OpenCode.

Keep working on a fixed monthly plan

OpenCode takes any OpenAI-compatible provider: set the base URL to https://api.stdcmpt.com/v1 with model "standardcompute" and there's no 5-hour or weekly window and only a high anti-abuse request-rate ceiling, at one flat monthly price with a fixed compute budget.

Plans from $19 a month with $20 of compute. Eligible new accounts can try $0.25 of compute first, no card. Trial terms

FAQ

Does OpenCode have its own rate limits?

No. OpenCode is bring-your-own-provider; every rate limit or usage window belongs to the configured backend (Anthropic, OpenAI, OpenCode Go, OpenRouter…). The same key hits the same limits in any tool — agents just get there faster.

What are OpenCode Go's limits?

OpenCode Go meters usage in rolling windows — roughly $12 of model usage per 5 hours and $30 per week. Great value inside the windows; heavy all-day agent use exhausts them, and then you wait for the roll or route work to another provider.

What's the permanent fix for OpenCode 429s?

Either size your provider tier well above your agent's burst rate, or use a backend with no per-minute economics. A flat-rate endpoint with a high request-rate ceiling and failover across providers makes 429s rare.

GPT-5.6 rate limits stop my OpenCode sessions by early afternoon. What flat-rate options are there?

Standard Compute puts GPT-5.6 Sol, Terra and Luna, Claude, GLM and DeepSeek on one key that OpenCode lists as a provider. Limits are per key and per minute (300 to 2,000 requests a minute by plan), with no 5-hour or weekly window, and the price is fixed at $19 to $249 a month (USD) for a matching compute budget. At 100% of the budget new requests get HTTP 402 and nothing more is billed. OpenCode Go ($10 a month) costs less but covers a curated set of open-weight models with 5-hour and weekly windows.

Related errors