OpenCode vs Claude Code: models, price and terms
OpenCode is a free, MIT-licensed coding agent that works with 75+ model providers, local and free models included. Claude Code is Anthropic's proprietary agent for Claude models, on a plan from $20 a month or an API key, and Anthropic's terms keep a Pro or Max sign-in out of OpenCode.
Contents
We make Shuriken. We tried to be fair; corrections welcome at office@shuriken.sh.
Quick answer#
OpenCode vs Claude Code comes down to models and money. OpenCode is free, MIT-licensed software that talks to 75+ model providers, local models and a set of free models included; you pay whichever provider you connect. Claude Code is Anthropic's own agent, proprietary, built for Claude models and paid for with a Claude plan from $20 a month or an API key. If you want Claude on a flat Pro or Max plan, that plan works in Claude Code and not in OpenCode. If you want GPT, Gemini, open-weight or local models in one agent, OpenCode.
OpenCode vs Claude Code at a glance#
Read from OpenCode's and Anthropic's own pages on 24 October 2026. Prices in US dollars a month.
| OpenCode | Claude Code | |
|---|---|---|
| Licence | MIT, source on GitHub | Proprietary: "© Anthropic PBC. All rights reserved." |
| Price of the program | "100% free to use" | Comes with a Claude plan or an API key |
| Models | 75+ providers through Models.dev, local models, free models | Claude, from Anthropic or through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry |
| Subscriptions it signs in with | ChatGPT Plus/Pro, GitHub Copilot, GitLab Duo | Claude Pro, Max, Team, Enterprise |
| Claude Pro or Max sign-in | No. Anthropic connects with an API key | Yes |
| OpenCode's own paid models | Go $10 or Go Plus $40 a month; pay-as-you-go credits | n/a |
| Cheapest Claude plan with Claude Code | n/a | Pro, $20, or $17 billed yearly |
| Where it runs | Terminal, desktop app, IDE extensions, web | Terminal, desktop app, IDE extensions, web, Claude mobile app |
| Headless | opencode serve: an HTTP server with an OpenAPI 3.1 spec |
claude -p and the Agent SDK |
| MCP | Local and remote servers, in opencode.json |
Yes, claude mcp add |
| Project instructions | AGENTS.md; CLAUDE.md as a fallback |
CLAUDE.md; AGENTS.md when there is no CLAUDE.md |
What OpenCode does well#
Any model, one agent. OpenCode's providers page lists Anthropic, OpenAI, Google Vertex AI, Amazon Bedrock, OpenRouter, Groq, DeepSeek and dozens more, plus local runtimes such as Ollama, LM Studio and llama.cpp. You run /connect, pick a provider, paste a key, then pick a model with /models. Switching from Claude to GPT to an open-weight model is a menu choice, not a new tool.
It's open source. The code is on GitHub under the MIT licence, and the home page says it counts over 220,000 stars and 950 contributors. Those are OpenCode's numbers; we haven't checked them.
Free to start. The home page says OpenCode "comes with a set of free models that you can use without creating an account". Its model docs describe them as free on OpenCode for a limited time. The same page names the catch for some of them: "During its free period, collected data may be used to improve the model." Read the privacy notes per model before you point one at private code, or hide them all with OPENCODE_DISABLE_FREE_MODELS=1.
A server you can script. opencode serve starts a headless HTTP server on port 4096 that serves an OpenAPI 3.1 spec, and the server docs explain that the normal terminal UI is just a client talking to that same server. You can protect it with OPENCODE_SERVER_PASSWORD.
A desktop app on three systems. The download page has OpenCode Desktop for macOS (Apple Silicon and Intel), Windows (x64 and ARM64) and Linux (.deb and .rpm), plus extensions for VS Code, Cursor, Zed, Windsurf and VSCodium.
What Claude Code does well#
Built around one model family. Anthropic makes both the model and the agent. Subagents, plan mode, hooks and skills are part of the agent itself.
A flat price for heavy use. Claude Code comes with Pro ($20 a month, or $17 billed yearly) and Max ($100 or $200), with a 5-hour and a weekly limit instead of a per-token bill. Anthropic's setup page says Claude Code "requires a Pro, Max, Team, Enterprise, or Console account" and that the free Claude plan doesn't include it. Whether a plan or a key costs you less depends on your own usage; our API key vs subscription guide prices both.
Everywhere Anthropic is. The overview lists the terminal, VS Code, JetBrains, a desktop app and the web, and the web version also runs in the Claude app for iOS and Android. The desktop app is the Code tab in the Claude app, on macOS and Windows, with Linux in beta on Ubuntu and Debian.
Other models, if you need them. Claude Code is built for Claude, but Ollama's docs say it "connects Claude Code to local and cloud models through its Anthropic-compatible API". The steps are in Claude Code with Ollama.
Can you use a Claude subscription in OpenCode?#
No, not in current versions of OpenCode. Its own providers page says so under Anthropic:
There are plugins that allow you to use your Claude Pro/Max models with OpenCode. Anthropic explicitly prohibits this. Previous versions of OpenCode came bundled with these plugins but that is no longer the case as of 1.3.0
OpenCode 1.3.0 came out on 22 March 2026, and its release notes start with "Removed anthropic oauth plugin". In current versions you connect Anthropic with an API key from Claude Console.
What Anthropic's terms say#
Anthropic's Claude Code legal and compliance page says who the subscription sign-in is for:
OAuth authentication is intended exclusively for purchasers of Claude Free, Pro, Max, Team, and Enterprise subscription plans and is designed to support ordinary use of Claude Code and other native Anthropic applications.
Its next point, addressed to developers, says what other apps may not do:
Anthropic does not permit third-party developers to offer Claude.ai login into their own applications, or to route requests through Free, Pro, or Max plan credentials on behalf of their users.
The Help Center's log-in article adds a paragraph on third-party tools, open-source projects included:
The preferred way to access Anthropic services using third-party software, tools, or services (“third-party tools”), including open-source projects, is through API key authentication through Claude Console or a supported cloud provider. Anthropic may at its discretion allow paid subscribers who have enabled usage credits to use certain third-party tools to access Anthropic services included in paid subscription plans, but reserves the right to draw use of such third-party tools from usage credits rather than subscription limits. Users are responsible for any usage credit charges incurred this way. Use of third-party tools that misrepresent their identity to Anthropic’s servers, attempt to route third-party traffic against subscription limits, or otherwise violate applicable terms or policies is prohibited and such use may be enforced against.
The 4 April 2026 change#
On 3 April 2026, Boris Cherny of Anthropic's Claude Code team posted:
Starting tomorrow at 12pm PT, Claude subscriptions will no longer cover usage on third-party tools like OpenClaw.
You can still use these tools with your Claude login via extra usage bundles (now available at a discount), or with a Claude API key.
Anthropic's Agent SDK help article carries two later notes. The one dated 15 June 2026 reads: "We’ve paused the previously-announced changes to Claude Agent SDK usage. For now, nothing has changed: Claude Agent SDK, claude -p, and third-party app usage still draw from your subscription limits." The one dated 7 October 2026 adds monthly API credits to Max and Team plans and says: "You can still use the Claude Agent SDK, claude -p, and third-party apps with your subscription limits." The legal page, read the same day, still carries the sentence about Claude.ai login in third-party apps quoted above.
That's what the pages say; it isn't legal advice, and enforcement is Anthropic's call. The full set of allowed and disallowed setups, Cline's and Roo Code's included, is in using your Claude plan in other tools. The rules on sharing a login and holding more than one account are quoted in can you have multiple Claude accounts.
Pricing#
OpenCode costs nothing as a program. The FAQ on its home page says "There might be additional costs if you connect any other provider." OpenCode also sells model access of its own, both optional:
- OpenCode Go: $10 a month, or Go Plus at $40, for "popular open coding models" the OpenCode team has tested. Limits are set in dollars per model: 20% of the monthly amount per 5 hours, 50% per week.
- Pay-as-you-go credits in the OpenCode Console, charged per request at listed per-token prices, with a processing fee of 4.6% + $0.31 on each credit purchase.
Claude Code is paid through Anthropic: Pro at $20 a month ($17 billed yearly), Max at $100 or $200, Team seats, or an API key billed per token. On an API key, Anthropic charges the same per-token rates whichever of the two sends the requests; only the subscription route is closed to OpenCode.
Using them together#
You don't have to pick one: Claude Code can stay on a Claude plan while OpenCode covers every other model. Both read AGENTS.md, so one instruction file can serve the two agents in the same repository.
Shuriken is a harness that runs coding agents on your own computers and servers, and both are among its 67 agents. One project can hold a Claude Code chat and an OpenCode chat side by side, each on its own branch in its own git worktree. Each chat uses the sign-ins and keys you already have, added once as sources; an OpenCode chat runs on whatever providers you set up in OpenCode. Claude Code gives Shuriken the most detail (subagents in Activity, mid-task account switching), and OpenCode runs as a full chat that you can open in OpenCode's own terminal UI when you want its interface back. How the pair fits, step by step, is in Shuriken and OpenCode; what Shuriken does with a Claude sign-in is written out, with the same quotes as above, in the guide on using your Claude plan in other tools. Only add accounts you own and are entitled to use; providers' terms may not allow sharing a subscription sign-in.
Shuriken never bills model usage. Free holds two sources and two linked devices, with every agent; Pro is €49 a month or €490 a year, VAT included for EU consumers. For the rest of the field, from Codex CLI to goose, see Claude Code alternatives. If you already run both agents, download Shuriken and give each its own branch.
Sources
- opencode.ai (home page and FAQ) (accessed 24 October 2026)
- OpenCode download page (accessed 24 October 2026)
- OpenCode docs: Providers (Anthropic) (accessed 24 October 2026)
- OpenCode docs: Models (pay-as-you-go, free models, fees) (accessed 24 October 2026)
- OpenCode docs: Go (accessed 24 October 2026)
- OpenCode docs: Server (accessed 24 October 2026)
- OpenCode docs: Rules (AGENTS.md) (accessed 24 October 2026)
- OpenCode docs: MCP servers (accessed 24 October 2026)
- OpenCode v1.3.0 release notes (accessed 24 October 2026)
- Claude Code docs: Overview (accessed 24 October 2026)
- Claude Code docs: Advanced setup (account requirements) (accessed 24 October 2026)
- Claude Code docs: Memory (AGENTS.md) (accessed 24 October 2026)
- Claude Code docs: Legal and compliance (accessed 24 October 2026)
- Claude Code LICENSE.md (accessed 24 October 2026)
- Claude pricing (accessed 24 October 2026)
- Claude Help Center: What is the Max plan? (accessed 24 October 2026)
- Claude Help Center: Log in to your Claude account (Authenticating to subscription plans) (accessed 24 October 2026)
- Claude Help Center: Use the Claude Agent SDK with your Claude plan (accessed 24 October 2026)
- Ollama docs: Claude Code (accessed 24 October 2026)
- Boris Cherny (Claude Code, Anthropic) on X, 3 April 2026 (accessed 24 October 2026)
Frequently asked questions
Is OpenCode better than Claude Code?
Neither wins everywhere. OpenCode is the pick when you want other companies' models, local models or an open-source licence; Claude Code is the pick when you want Claude on a flat monthly plan, because that plan's sign-in works in Claude Code and not in OpenCode.
Can I use Claude Pro or Max with OpenCode?
Not under Anthropic's current rules. Its Claude Code legal page says third-party developers may not route requests through Free, Pro or Max plan credentials, and OpenCode removed its Anthropic sign-in plugin in version 1.3.0. Connect Anthropic in OpenCode with an API key instead.
Are OpenCode's free models really free?
OpenCode's docs list a set of models that are free on OpenCode for a limited time, and say some of them may use the data collected during that period to improve the model. Set OPENCODE_DISABLE_FREE_MODELS=1 to hide them.
Does OpenCode read CLAUDE.md?
Yes, as a fallback. OpenCode reads AGENTS.md first and uses CLAUDE.md only when there is no AGENTS.md. Claude Code works the other way round: it reads AGENTS.md when the repository has no CLAUDE.md.
Is there an OpenCode desktop app like Claude's?
Yes. OpenCode Desktop has downloads for macOS, Windows and Linux. Claude Code's desktop app is the Code tab in the Claude app for macOS and Windows, with Linux in beta on Ubuntu and Debian, and it needs a paid Claude plan.