← All fixes
OpenCode / Anthropic· Quota & billing

Can you use a Claude Pro/Max subscription with OpenCode? Login, limits & alternatives (2026)

Using Claude Pro/Max subscription with OpenCode
Quick answer

Yes — OpenCode supports Anthropic subscription auth: log in with your Claude Pro/Max account and Claude models run on the subscription instead of API billing. The catch is that the subscription's limits come with it — the 5-hour session window and weekly caps apply exactly as in Claude Code, and heavy agentic use hits them early. Anthropic's consumer terms and limits govern that usage.

What causes it

How to fix it

  1. Use it within the windows: it's genuinely good value for judgment-heavy work — keep sessions scoped, compact context, and schedule heavy runs around window resets.
  2. Upgrade Pro → Max for substantially larger session and weekly caps.
  3. Switch the Anthropic provider in OpenCode to an API key (pay-per-token) — no plan windows, but the bill scales with usage.
  4. Route volume work to a flat-rate OpenAI-compatible provider in the same OpenCode config and save the subscription for the hard steps.
Running an agent?

The subscription is shared across every surface — chat, Claude Code, and OpenCode all draw from one budget. If OpenCode suddenly stops mid-task, check whether a morning of Claude chat already spent the window.

The permanent fix

Stop hitting this entirely

If the 5-hour and weekly windows are the problem, add Standard Compute as a provider in OpenCode: base URL https://api.stdcmpt.com/v1, model "standardcompute" — flat monthly price, no session windows, no weekly caps, with Claude-class models in the routed pool. A common setup is subscription auth for judgment-heavy steps and the flat-rate endpoint for the all-day volume.

Get a free API key →How it connects →

FAQ

Can I log into OpenCode with my Claude Pro or Max subscription?

Yes. OpenCode supports Anthropic's subscription login for Claude models — authenticate with your Claude account and usage bills against the plan, not an API key. The plan's 5-hour and weekly limits apply.

Is Claude via subscription unlimited in OpenCode?

No. You get the same rolling 5-hour session window and weekly caps as Claude Code. Agentic use consumes them quickly — heavy users hit the weekly cap days early, then wait for the reset.

Subscription auth vs API key in OpenCode — which should I use?

Subscription auth is cheapest if your usage fits the windows. An API key removes the windows but bills per token, which gets expensive for agents. A flat-rate endpoint is the fixed-cost, no-window option for sustained agent work.

Related errors

OpenCode rate limited / usage limits — which provider is stopping you & the flat-rate fix (2026)OpenCode / upstream · 429Claude Code usage limit reached — weekly limits, fixes & the alternatives heavy users switch to (2026)AnthropicClaude weekly limit — when it resets and how to keep workingAnthropicAnthropic / Claude rate limit exceeded (429)Anthropic (Claude) · 429Roo Code API costs too high — reduce spend or go flat rate (2026)Roo Code