Skip to content
HUIAHUB

ComparisonCoding & dev tools

OpenCode vs Claude Code: models, cost, permissions and license compared

Compare OpenCode vs Claude Code on install, model providers, pricing, permission defaults, sandboxing, MCP and license, then pick the agent for your setup.

Edited by Published 8 min read29 sourcesAI-assisted research and drafting

At a glance

The facts each page stores, with the date they were last checked against the official sources.

opencode and Claude Code: facts side by side
Factopencodeanomalyco/opencodeClaude Code
KindOpen-source repositoryAI tool
PricingDoes not applyPaid
Free tierDoes not applyNo
APIDoes not applyYes
Open sourceDoes not applyNo
LicenseMITDoes not apply
GitHub stars230KDoes not apply
Latest releasev1.19.6 (Nov 17, 2026)Does not apply
Facts last checkedNov 30, 2026Oct 4, 2026

OpenCode vs Claude Code comes down to model choice against one vendor's stack. OpenCode is MIT-licensed, connects to many model providers and local models, and costs nothing beyond the models you pay for. Claude Code runs only Claude models, needs a paid Claude plan or API billing, and ships an OS-level sandbox and stricter default prompts.

Every fact below comes from each project's own README, documentation, license file or pricing page, checked on November 26, 2026. Plans and defaults change often, so check the linked pages before you rely on a number.

What OpenCode and Claude Code are

OpenCode is an open source coding agent published in the anomalyco/opencode repository on GitHub. Its docs list three ways to use it: a terminal interface, a desktop app and a web app. The README marks the desktop app as beta. The repository showed 229.2k stars on November 26, 2026.

Claude Code is Anthropic's agentic coding tool. It reads a codebase, edits files and runs commands. Anthropic ships it as a terminal CLI, VS Code and JetBrains extensions, a desktop app and a web version at claude.ai/code. The public anthropics/claude-code repository showed 157.1k stars on the same day. HuiaHub's Claude Code tool page tracks the product itself.

OpenCode vs Claude Code at a glance

Checked against each project's own pages on November 26, 2026.

OpenCodeClaude CodeSource
Makeranomalyco organization on GitHubAnthropicGitHub READMEs
LicenseMITAll rights reserved, Anthropic terms applyLICENSE files
InstallScript, npm, Homebrew, AUR, mise, Nix, DockerNative script, Homebrew, WinGet, apt, dnf, apk, npmInstall docs
ModelsMany providers via a models.dev catalog, plus local modelsClaude models onlyProvider and gateway docs
How you payYour own provider keys, OpenCode Go ($10 a month and up) or OpenCode Console creditsPro, Max, Ultra, Team or Enterprise plan, Console API or a cloud providerPricing pages
Default permissionsEverything allowed except reading .env filesAsks before shell commands, file edits and web fetchesPermission docs
OS sandboxNot described in the permissions docsYes, off by default, not on native WindowsSandboxing docs
MCPLocal stdio and remote HTTPstdio and HTTP, SSE deprecatedMCP docs
Skills and agentsSKILL.md skills, Markdown agentsSKILL.md skills, Markdown subagentsSkills and agents docs

How do you install each one?

OpenCode's README and docs list an install script, npm, Homebrew, the AUR, mise and Nix:

curl -fsSL https://opencode.ai/v2/install | bash
npm install -g @opencode/cli
brew install anomalyco/tap/opencode-v2

The docs say Windows package managers are not supported. They also warn that mise versions older than 2026.10.9 install OpenCode 1, and they name a Docker image tagged 2.0.0. Older guides that use other package names may be out of date. After install, run /connect in the terminal interface to add a provider, then /models to pick a model.

Claude Code's setup page recommends the native installer:

curl -fsSL https://claude.ai/install.sh | bash
brew install --cask claude-code
irm https://claude.ai/install.ps1 | iex
winget install Anthropic.ClaudeCode

Anthropic lists macOS 13.0+, Windows 10 1809+, Ubuntu 20.04+, Debian 10+ and Alpine Linux 3.19+, with 4 GB of RAM or more. Native installs update themselves in the background. Homebrew and WinGet installs do not. The setup page still documents npm (Node.js 22 or later), while the GitHub README labels npm as deprecated.

Which models can each one use?

OpenCode reads its provider and model catalog from models.dev. The provider docs do not state a provider count, so "75+ providers" figures in older comparisons are not confirmed by the current docs. Several sign-in routes are documented:

  • Ollama models are found automatically at http://127.0.0.1:11434, without an account.
  • LM Studio and vLLM also have local discovery built in.
  • GitHub Copilot connects through device OAuth.
  • A ChatGPT Plus or Pro plan can stand in for an OpenAI API key.
  • Anthropic models work through an API key or a compatible endpoint.

Claude Code runs Claude models. You sign in with a Claude subscription or a Claude Console account, or point it at Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry. Teams can also route it through an LLM gateway. Anthropic's gateway page says it doesn't support routing Claude Code to non-Claude models through any gateway.

How much does each one cost?

OpenCode the software costs nothing. You pay the provider whose model you call. OpenCode sells two optional services of its own:

  • OpenCode Go is a subscription: Go at $10 a month, Go Plus at $40 a month, and Go Teams at $20 per member per month with a two-member minimum. The OpenCode Go docs (opens in a new tab) set a 5-hour limit at 20% of the monthly allowance and a weekly limit at 50%.
  • OpenCode Console is a pay-as-you-go gateway. You buy credits, and each purchase carries a 4.6% + $0.31 processing fee. The Console model list includes Claude Sonnet 5.5 at $2.00 input and $10.00 output per million tokens.

The plan described as "OpenCode Zen" in some comparisons does not appear on OpenCode's current pages. The opencode.ai/zen address now shows the OpenCode Console model list.

Claude Code is included in every paid Claude plan and excluded from the free plan. Prices on claude.com/pricing (opens in a new tab) on November 26, 2026:

PlanPriceUsage
Pro$20 a month, or $17 a month billed annually ($200 up front)Base
Max$100 a month5x Pro usage
Ultra$200 a month10x Pro usage per week
Team Standard$25 per seat monthly, $20 annuallyPer-seat allowance
Team Premium$125 per seat monthly, $100 annuallyLarger allowance
Enterprise$20 per seat a month billed annually, 20-seat minimum, plus usage at API ratesUsage billed

With Console or a cloud provider, Claude Code bills per token. Anthropic's costs page puts the enterprise average at about $13 per developer per active day and $150 to $250 per developer per month.

Permissions and sandboxing: what each agent asks before it acts

OpenCode's default policy starts with a rule that allows every action on every resource. Only reads of .env files ask first, and .env.example reads are allowed. In practice the default build agent runs shell commands and edits files without a prompt. The docs warn that the shell runs with the host user's filesystem, process and network authority. Access outside the workspace is allowed by default too.

You tighten it in opencode.jsonc. Rules match on action and resource, and the last matching rule wins. This example comes from the OpenCode permissions docs (opens in a new tab):

{
  "$schema": "https://opencode.ai/config.json",
  "permissions": [
    { "action": "shell", "resource": "*", "effect": "ask" },
    { "action": "shell", "resource": "git status *", "effect": "allow" },
    { "action": "shell", "resource": "git push *", "effect": "deny" }
  ]
}

The built-in plan agent denies edits except under ~/.opencode/plan. The permissions page does not describe an OS sandbox.

Claude Code's default mode, labeled Manual, reads files in the working directory freely. Shell commands outside a built-in read-only set need approval, as do file edits and web fetches. Other modes are acceptEdits, plan, auto (a classifier reviews actions), dontAsk and bypassPermissions. Rules run in a fixed order: deny, then ask, then allow.

Claude Code also has an operating-system sandbox for shell commands (opens in a new tab). It limits writes to the working directory and routes network traffic through a proxy with an allowed-domain list. macOS uses Seatbelt, and Linux and WSL2 need bubblewrap and socat. The sandbox is off by default, you turn it on with /sandbox, and native Windows runs commands unsandboxed. File tools, MCP servers and hooks run outside it. HuiaHub's guide to sandboxing AI coding agents covers containers for either tool.

MCP servers, skills and custom agents

Both agents speak MCP. OpenCode defines servers under mcp.servers and supports local stdio and remote Streamable HTTP servers, with OAuth on by default for remote ones. Claude Code supports stdio and HTTP, lists SSE as deprecated, and stores servers at local, project (.mcp.json) or user scope. It asks for approval before it uses project servers from .mcp.json.

opencode mcp add docs --url https://example.com/mcp
claude mcp add --transport http docs https://example.com/mcp

The server name and URL above are illustrative.

Skills use a SKILL.md file in both. OpenCode reads .opencode/skills and, for compatibility, .claude/skills and .agents/skills, at project and global level. A skill permission can allow, ask or hide each one. Claude Code reads ~/.claude/skills, .claude/skills and plugin skills, follows the Agent Skills open standard, and runs a skill when it fits the task or when you type /skill-name.

For agents, OpenCode ships build and plan as primary agents and general and explore as subagents. Custom agents are Markdown files in .opencode/agents or ~/.config/opencode/agents. Claude Code's custom subagents are Markdown files with YAML frontmatter in .claude/agents or ~/.claude/agents, next to built-in Explore, Plan and general-purpose agents.

License and source code

OpenCode's LICENSE file is the MIT License, with the copyright line "Copyright (c) 2025 opencode". You can read, fork and modify the code.

Claude Code's LICENSE.md in the anthropics/claude-code repository reserves all rights and makes use subject to Anthropic's Commercial Terms of Service. Anthropic's legal and compliance page (opens in a new tab) says Free, Pro, Max and Ultra users fall under the Consumer Terms, and Team, Enterprise and API users under the Commercial Terms. HuiaHub's Claude Code vs Codex CLI comparison covers the same license question for OpenAI's agent.

Pick OpenCode if, pick Claude Code if

Your situationBetter fit, based on the docs above
You want to switch between providers or run Ollama modelsOpenCode
You already pay for a Claude Pro, Max or Ultra planClaude Code
You need an MIT license or want to change the agent's codeOpenCode
You want shell commands confined by an OS sandboxClaude Code (macOS, Linux, WSL2)
You want prompts before edits and commands without writing configClaude Code
You want a flat monthly fee for open coding modelsOpenCode with OpenCode Go
Your company buys through Bedrock, Agent Platform or FoundryClaude Code

Sources

  1. 1.GitHub - anomalyco/opencode: The open source coding agent. · GitHubRepositoryPrimarygithub.com
  2. 2.Intro | OpenCodeWebopencode.ai
  3. 3.Providers | OpenCodeWebopencode.ai
  4. 4.Permissions | OpenCodeOfficial docsPrimaryopencode.ai
  5. 5.Agents | OpenCodeWebopencode.ai
  6. 6.MCP servers | OpenCodeOfficial docsPrimaryopencode.ai
  7. 7.Skills | OpenCodeOfficial docsPrimaryopencode.ai
  8. 8.Models | OpenCode ConsoleOfficial docsPrimaryopencode.ai
  9. 9.Overview - Claude Code DocsOfficial docsPrimarycode.claude.com
  10. 10.Advanced setup - Claude Code DocsOfficial docsPrimarycode.claude.com
  11. 11.Authentication - Claude Code DocsOfficial docsPrimarycode.claude.com
  12. 12.Connect Claude Code to tools via MCP - Claude Code DocsOfficial docsPrimarycode.claude.com
  13. 13.Extend Claude with skills - Claude Code DocsOfficial docsPrimarycode.claude.com
  14. 14.Manage costs effectively - Claude Code DocsOfficial docsPrimarycode.claude.com
  15. 15.Plans & pricing | Claude by AnthropicWebclaude.com
  16. 16.opencode.ai/docs/goWeb
  17. 17.opencode.ai/docs/zenWeb
  18. 18.opencode.ai/zenWeb
  19. 19.opencode.ai/docs/rulesWeb
  20. 20.opencode.ai/changelog/v1.3.0.mdWeb
  21. 21.raw.githubusercontent.com/anomalyco/opencode/dev/LICENSEWeb
  22. 22.GitHub - anthropics/claude-code: Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complexRepositoryPrimarygithub.com
  23. 23.code.claude.com/docs/en/llm-gatewayWeb
  24. 24.Configure permissions - Claude Code DocsWebcode.claude.com
  25. 25.Configure the sandboxed Bash tool - Claude Code DocsOfficial docsPrimarycode.claude.com
  26. 26.code.claude.com/docs/en/sub-agentsWeb
  27. 27.code.claude.com/docs/en/memoryWeb
  28. 28.raw.githubusercontent.com/anthropics/claude-code/main/LICENSE.mdWeb
  29. 29.code.claude.com/docs/en/legal-and-complianceWeb

Spotted an error? See our corrections policy.

Enjoyed this? Get the weekly brief.

New guides, Project & Tool of the Week and the AI developments that matter. One email, no spam.

Read next

More on these topics