> ## Content Index
> Fetch the complete content index at: https://claudefox.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Claude Code vs OpenCode (2026): cost, Claude access, which to use
- URL: https://claudefox.com/claude-code-vs-opencode/
- Published: 2026-11-20T09:12:11.000Z
- Updated: 2026-11-20T09:13:26.000Z
- Description: A sourced comparison of Claude Code and OpenCode in November 2026: the MIT licence, 200+ providers and local models, how OpenCode can run Claude under Anthropic's current rules, Go and Console pricing, default permissions, moving CLAUDE.md and skills, and our take.
- Author: hupicake
- Tags: Tips

Last checked: 2026-11-20\. OpenCode facts come from opencode.ai, the OpenCode V2 documentation and the anomalyco/opencode GitHub repository. Claude Code facts come from Anthropic's Claude Code docs, claude.com pricing, the Claude API price list and the Claude Help Center. All prices are as of November 20, 2026, in US dollars; Anthropic's prices exclude applicable tax. On that date the newest OpenCode release was v2.3.2 (November 18); the V1 line still gets releases, most recently v1.19.6 on November 17.

Pick Claude Code if you want Claude usage included in a monthly plan, within its usage limits: a $20 Claude Pro plan includes Claude Code with Opus 5.5 as the default model. Pick OpenCode if you want an MIT-licensed agent that works with almost any model, including local ones. OpenCode can run Claude, but through an Anthropic API key or another paid route billed per token, not through a Claude Pro, Max or Ultra login.

## Claude Code vs OpenCode at a glance

Claude Code is Anthropic's proprietary agent, sold inside Claude plans and limited to Claude models; OpenCode is a free, open-source agent that you connect to the model provider of your choice and pay that provider directly.

__Cells link the vendor page behind each figure, or our guide that covers it. Prices as of November 20, 2026.__
| Criterion          | Claude Code                                                                                                                                                                                                                                                                                                                                                                | OpenCode                                                                                                                                                                                                                                                                                          |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pricing and plans  | [Pro $20 a month ($17 billed annually), Max $100, Ultra $200; Team $20 or $100 per seat billed annually ($25 or $125 monthly). Claude Code is in paid plans only](https://claude.com/pricing?ref=claudefox.com)                                                                                                                                                            | [Free and MIT-licensed; you pay your model provider. Optional OpenCode Go $10, Go Plus $40, Go Teams $20 per member a month (2-member minimum), or pay-as-you-go Console credits](https://opencode.ai/docs/console/go/?ref=claudefox.com)                                                         |
| Models available   | [Claude models only, through a Claude plan, an API key or cloud providers such as Amazon Bedrock. Opus 5.5 is the default on Pro, Max, Ultra, Team, Enterprise and the API; Sonnet 5.5, Haiku 5.5, and Fable when selected (paid with usage credits on Pro, up to half the weekly limit on Max and Ultra)](https://code.claude.com/docs/en/model-config?ref=claudefox.com) | [200+ providers through Models.dev, local models through Ollama, free models without an account; Claude through an API key, Bedrock, Vertex or Console credits](https://opencode.ai/docs/providers/?ref=claudefox.com)                                                                            |
| Where it runs      | [Terminal, VS Code, JetBrains, desktop app, web, Slack](https://code.claude.com/docs/en/overview?ref=claudefox.com)                                                                                                                                                                                                                                                        | [Terminal UI, desktop app for macOS, Windows and Linux, mobile app (iOS TestFlight, Android), SDK, opencode run for scripts](https://opencode.ai/?ref=claudefox.com)                                                                                                                              |
| Agent features     | [Subagents, hooks, MCP, skills, plugins and marketplaces](https://code.claude.com/docs/en/sub-agents?ref=claudefox.com)                                                                                                                                                                                                                                                    | [Build and Plan agents, subagents, custom agents, plugins, MCP, skills, custom commands, /undo snapshots, parallel sessions](https://opencode.ai/docs/agents/?ref=claudefox.com)                                                                                                                  |
| Context and limits | [Native 1M-token window on Opus 5.5 and Sonnet 5.5; 5-hour and weekly limits (verified Ultra accounts have no 5-hour limit)](https://claudefox.com/claude-code-usage-limits/)                                                                                                                                                                                              | [Set by the model and provider you connect; on Go, a 5-hour cap of 20% and a weekly cap of 50% of the monthly allowance](https://opencode.ai/docs/console/go/?ref=claudefox.com)                                                                                                                  |
| Privacy and data   | [Consumer plans: training is your choice, 5-year retention if you allow it, 30 days if not; Team, Enterprise and API: no training unless you opt in](https://code.claude.com/docs/en/data-usage?ref=claudefox.com)                                                                                                                                                         | [Your provider's terms apply. Console says its providers keep zero retention and do not train, with listed exceptions: OpenAI, Anthropic and xAI APIs keep requests 30 days, Google up to 55, and some free models may use your data](https://opencode.ai/docs/console/models/?ref=claudefox.com) |
| Default safety     | [Auto mode with a safety classifier is the starting mode in the terminal and VS Code from v2.1.283 (claude -p starts in Manual; organizations can turn auto off); Manual mode asks first](https://code.claude.com/docs/en/permission-modes?ref=claudefox.com)                                                                                                              | [Everything allowed by default, including paths outside the project, except .env reads, which ask; the Plan agent does not edit normal project files but may write plan files](https://opencode.ai/docs/permissions/?ref=claudefox.com)                                                           |
| Best fit           | Claude-first developers who want included usage and Anthropic's newest models                                                                                                                                                                                                                                                                                              | Developers who want open source, any model, local models, or one tool for ChatGPT and Copilot plans                                                                                                                                                                                               |

## Can OpenCode use Claude, and with which account?

Yes, OpenCode runs Claude models, but you pay per token through an API key or a reseller; a Claude Pro, Max or Ultra subscription does not carry over, because Anthropic's terms reserve subscription sign-in for Claude Code and Anthropic's own apps.

Anthropic's Claude Code legal page, checked today, says OAuth sign-in for Claude Free, Pro, Max, Ultra, Team and Enterprise plans is intended for ordinary use of Claude Code and other native Anthropic applications. It adds that Anthropic does not permit third-party developers to offer Claude.ai login in their own applications or to route requests through Free, Pro, Max or Ultra plan credentials. OpenCode's current docs match this: they describe plan sign-in for ChatGPT Plus or Pro and for GitHub Copilot, and an API-key method for Anthropic.

- Anthropic API key: run opencode auth login anthropic --method key, or set ANTHROPIC\_API\_KEY. Anthropic bills you at list price: Opus 5.5 at $4 per million input tokens and $20 output, Sonnet 5.5 at $2 and $10, Haiku 5.5 at $0.10 and $0.50 for prompts up to 100,000 tokens.
- OpenCode Console: pay-as-you-go credits at the same Claude prices, for example Opus 5.5 at $4 input, $0.20 cached read, $5 cached write and $20 output. Each credit purchase adds a 4.6% + $0.31 processing fee.
- OpenCode Go: of the Claude family, only Haiku 5.5 is in the Go catalog; Go's model table lists its monthly limit, if you use only that model, as $15 on Go and $60 on Go Plus.
- Cloud accounts: Amazon Bedrock and Google Vertex (one google-vertex provider for Gemini and Anthropic models) work with their usual credentials.
- GitHub Copilot: OpenCode supports Copilot's device sign-in and then shows the model list of that Copilot account.

## Who should pick Claude Code, and who should pick OpenCode?

Claude Code suits people who want Claude usage included in a monthly plan and Anthropic's own tooling; OpenCode suits people who value open source, model choice and cheaper non-Claude models over included Claude usage.

- Pick Claude Code if Claude does most of your work. Pro, Max and Ultra include Claude Code, and it draws from the same usage pool as the Claude apps instead of per-token billing.
- Pick Claude Code if you want cautious defaults. Its Manual mode asks before edits, commands and network access, and auto mode reviews actions with a classifier; OpenCode's base policy allows everything except .env reads.
- Pick OpenCode if you want to read, fork or self-host the code. It is MIT-licensed; Claude Code's licence file says all rights reserved, with use under Anthropic's Commercial Terms.
- Pick OpenCode if you switch models often, run local models through Ollama, or want to use a ChatGPT or Copilot plan you already pay for.
- Pick OpenCode if cost matters more than model choice: Go starts at $10 a month for a usage allowance across a curated catalog of mostly open models (its only Claude model is Haiku 5.5), and free models need no account.

## How much does each cost?

OpenCode itself costs nothing, so your bill is whatever your model provider charges; for Claude that is Anthropic's per-token list price, while Claude Code bundles Claude usage into a monthly plan.

- One Opus 5.5 task with 1 million input tokens and 50,000 output tokens, without caching: $4 plus $1, so $5, through your own Anthropic key or Console credits. Buying $20 of Console credit costs $21.23 with the fee.
- The same work in Claude Code on Claude Pro at $20 a month counts against its 5-hour and weekly limits instead of a dollar meter. Anthropic says there is no fixed message count for those limits.
- Anthropic's own figure for Claude Code on the API is an average of about $13 per developer per active day, or $150 to $250 a month, across enterprise deployments. It is a useful yardstick for API-billed Claude agent work; OpenCode publishes no such figure.
- Heavy users: Claude Max costs $100 for 5x Pro usage and Ultra $200 for 10x Pro's weekly usage, with no 5-hour limit on verified Ultra accounts. OpenCode Go Plus costs $40 for higher limits on Go's catalog, mostly open models plus a few GPT and Gemini models and Claude Haiku 5.5, with no Opus or Sonnet.
- Free: OpenCode's free models cost nothing, but providers of some, such as Big Pickle and Inkling 2 Small Free, may use your data to improve or train models.

## How do you switch between Claude Code and OpenCode?

Most of your Claude Code setup loads in OpenCode as is: it reads CLAUDE.md where no AGENTS.md exists and loads skills from .claude/skills.

- Instructions: OpenCode reads AGENTS.md, falls back to CLAUDE.md in any directory without one, and reads \~/.claude/CLAUDE.md when there is no global \~/.config/opencode/AGENTS.md. Claude Code reads AGENTS.md only when there is no CLAUDE.md in the working directory or above it.
- Skills: besides its own .opencode/skills and \~/.config/opencode/skills, OpenCode loads .claude/skills, \~/.claude/skills, .agents/skills and \~/.agents/skills. OPENCODE\_DISABLE\_CLAUDE\_CODE\_PROMPT=1 skips CLAUDE.md files; OPENCODE\_DISABLE\_CLAUDE\_CODE=1 also skips .claude skills.
- Subagents: rewrite Claude Code agents as Markdown files in .opencode/agents/ with mode: subagent in the frontmatter; a permissions list is optional, and a subagent with no model set inherits the parent session's.
- Hooks: OpenCode handles events through plugins; we found no documented importer for Claude Code hooks, so plan to rewrite them.
- MCP servers: add them with opencode mcp add, which writes to the project config; Claude Code uses claude mcp add or a project .mcp.json.
- Permissions: add rules before your first run if you want OpenCode to ask before shell commands or before reading and editing paths outside the project (external\_directory).

```
// opencode.jsonc: ask before shell commands and outside-project paths, allow git status and diff, block pushes
{
  "permissions": [
    { "action": "external_directory", "resource": "*", "effect": "ask" },
    { "action": "shell", "resource": "*", "effect": "ask" },
    { "action": "shell", "resource": "git status *", "effect": "allow" },
    { "action": "shell", "resource": "git diff *", "effect": "allow" },
    { "action": "shell", "resource": "git push *", "effect": "deny" }
  ]
}
```

OpenCode installs with npm install -g @opencode/cli, brew install anomalyco/tap/opencode-v2 or a curl script from opencode.ai.

## Frequently asked questions

- Is OpenCode free? Yes. The agent is MIT-licensed and free; you pay only for paid models, through your own provider account, Console credits or a Go plan.
- Can I use my Claude Pro or Max subscription in OpenCode? Not under Anthropic's current terms, covered above. Use an Anthropic API key or another paid route instead.
- Is OpenCode cheaper than Claude Code? For open models, usually: Go starts at $10 and free models cost nothing. For Claude, OpenCode pays per token at Anthropic's list price, while Claude Pro includes Claude Code usage for $20 a month.
- Which is safer by default? Claude Code. OpenCode's default policy runs tools and touches files outside the project without prompting, apart from .env reads, until you add rules.
- Can Claude Code use OpenCode's models? Yes. OpenCode documents pointing Claude Code at its Console with ANTHROPIC\_BASE\_URL and an OpenCode key (ANTHROPIC\_AUTH\_TOKEN), which reaches Console's paid and Go models; run /logout first so Claude Code does not send your Claude login.

## Our take

This is opinion. If Claude is the model you want, Claude Code is the better deal in November 2026: the same Opus 5.5 that costs $4 and $20 per million tokens in OpenCode comes inside a $20 Pro plan, within its usage limits. OpenCode is the better tool if you want open source, local models or a mix of vendors, and its support for CLAUDE.md and .claude/skills makes trying it cheap. Tighten its permissions before you point it at a real repository.

## Related on claudefox

- [Claude Code pricing (November 2026): plans and API costs](https://claudefox.com/claude-code-pricing/)
- [Claude Code usage limits explained: 5-hour and weekly caps](https://claudefox.com/claude-code-usage-limits/)
- [How to install Claude Code on Mac, Windows and Linux](https://claudefox.com/install-claude-code/)
- [Claude Code vs Codex CLI (2026): which coding agent to use](https://claudefox.com/claude-code-vs-codex/)
- [Claude Code vs Cursor (2026): pricing, models, which to use](https://claudefox.com/claude-code-vs-cursor/)
- [Claude API pricing calculator: cost per request, day and month](https://claudefox.com/claude-api-pricing-calculator/)

Source: [OpenCode home page](https://opencode.ai/?ref=claudefox.com), [OpenCode repository (GitHub)](https://github.com/anomalyco/opencode?ref=claudefox.com), [OpenCode releases (GitHub)](https://github.com/anomalyco/opencode/releases?ref=claudefox.com), [Providers (OpenCode docs)](https://opencode.ai/docs/providers/?ref=claudefox.com), [CLI providers (OpenCode docs)](https://opencode.ai/docs/cli/providers/?ref=claudefox.com), [Models (OpenCode docs)](https://opencode.ai/docs/models/?ref=claudefox.com), [Console models (OpenCode docs)](https://opencode.ai/docs/console/models/?ref=claudefox.com), [Go (OpenCode docs)](https://opencode.ai/docs/console/go/?ref=claudefox.com), [OpenCode Go plans](https://opencode.ai/console/go?ref=claudefox.com), [Instructions (OpenCode docs)](https://opencode.ai/docs/instructions/?ref=claudefox.com), [Skills (OpenCode docs)](https://opencode.ai/docs/skills/?ref=claudefox.com), [Agents (OpenCode docs)](https://opencode.ai/docs/agents/?ref=claudefox.com), [Permissions (OpenCode docs)](https://opencode.ai/docs/permissions/?ref=claudefox.com), [MCP servers (OpenCode docs)](https://opencode.ai/docs/mcp-servers/?ref=claudefox.com), [Plugins (OpenCode docs)](https://opencode.ai/docs/plugins/?ref=claudefox.com), [CLI intro (OpenCode docs)](https://opencode.ai/docs/cli/?ref=claudefox.com), [Migrate from V1 (OpenCode docs)](https://opencode.ai/docs/migrate-v1/?ref=claudefox.com), [Claude Code harness (OpenCode docs)](https://opencode.ai/docs/console/harnesses/claude-code/?ref=claudefox.com), [Legal and compliance: authentication and credential use (Claude Code docs)](https://code.claude.com/docs/en/legal-and-compliance?ref=claudefox.com), [Claude Code licence (GitHub)](https://github.com/anthropics/claude-code/blob/main/LICENSE.md?ref=claudefox.com), [Claude plans and pricing (claude.com)](https://claude.com/pricing?ref=claudefox.com), [Claude API pricing (Claude Platform docs)](https://platform.claude.com/docs/en/about-claude/pricing?ref=claudefox.com), [How do usage and length limits work? (Claude Help Center)](https://support.claude.com/en/articles/11647753-how-do-usage-and-length-limits-work?ref=claudefox.com), [Claude Code overview (Claude Code docs)](https://code.claude.com/docs/en/overview?ref=claudefox.com), [Model configuration (Claude Code docs)](https://code.claude.com/docs/en/model-config?ref=claudefox.com), [CLAUDE.md and AGENTS.md (Claude Code docs)](https://code.claude.com/docs/en/memory?ref=claudefox.com), [Create custom subagents (Claude Code docs)](https://code.claude.com/docs/en/sub-agents?ref=claudefox.com), [Hooks reference (Claude Code docs)](https://code.claude.com/docs/en/hooks?ref=claudefox.com), [MCP (Claude Code docs)](https://code.claude.com/docs/en/mcp?ref=claudefox.com), [Plugins overview (Claude Code docs)](https://code.claude.com/docs/en/plugins?ref=claudefox.com), [Permission modes (Claude Code docs)](https://code.claude.com/docs/en/permission-modes?ref=claudefox.com), [Data usage (Claude Code docs)](https://code.claude.com/docs/en/data-usage?ref=claudefox.com), [Manage costs (Claude Code docs)](https://code.claude.com/docs/en/costs?ref=claudefox.com)