Backed by Y Combinator (F26)

OpenCode vs Claude Code (2026)

Choose opencode for an open-source coding agent with multiple model providers and local-model support; choose Claude Code for Anthropic's agent integrated with Claude models and paid Claude plans. opencode itself is free, but hosted model usage may cost extra, and a Claude subscription is not a general-purpose API key for other tools.

TL;DR

DecisionOpenCodeClaude Code
LicenseFree, MIT-licensed open sourceProprietary; subject to Anthropic's terms
Models and providersMultiple providers, custom endpoints and local runtimesClaude models through Anthropic and supported cloud providers
PricingFree software; inference costs extra. Optional Go from $10/monthPro from $20/month ($17 billed annually), higher plans or API billing
Subscription loginChatGPT Plus/Pro and GitHub Copilot; not a Claude subscriptionEligible Claude subscriptions through Anthropic's own sign-in
Local modelsNative Ollama, LM Studio and vLLM discoveryOllama compatibility exists, but non-Claude models aren't supported by Anthropic
MCPLocal and remote servers, including OAuthLocal and remote servers, including project .mcp.json
Subagents and pluginsCustom agents, SKILL.md skills and package/local pluginsCustom subagents, skills and marketplace/local plugins

Pick OpenCode for provider freedom or local inference; pick Claude Code for an integrated Claude workflow. Both support MCP and reusable extensions, so test the same real task before choosing.

Reason runs in the Mac app and on the web.

  1. 1
    Open ReasonSign in on the web, or in the Mac app.
  2. 2
    Settings › ModelsConnect the plans you already pay for.
  3. 3
    In the composerGive Reason the branch and what's next.

Open source or integrated? Keep both.

OpenCode and Claude Code: detailed comparison

CapabilityopencodeClaude Code
LicenseMIT-licensed open source; inspect and modify the codeProprietary; the repository license reserves Anthropic's rights and refers to its Commercial Terms
Providers and modelsMulti-provider catalog from models.dev; provider keys, supported account sign-ins and custom endpointsClaude models through Anthropic or supported cloud providers and gateways
Local modelsNative Ollama discovery, plus LM Studio and vLLM supportOllama documents an Anthropic-compatible integration; Anthropic does not support routing Claude Code to non-Claude models
PricingAgent software is free; provider charges or local hardware costs remain. Optional Go $10/month, Go Plus $40/month, Go Teams $20/member/monthPro $20/month ($17/month billed annually), Max $100/month, Ultra $200/month; Team, Enterprise or separately billed API usage
Subscription loginDocumented ChatGPT Plus/Pro sign-in and GitHub Copilot device login; not Claude subscription credentialsEligible Claude plan login in Anthropic's own flow; API keys are billed separately
SurfacesTerminal interface, desktop app and web interface paired to an OpenCode serverTerminal, VS Code, JetBrains, desktop app and browser/cloud sessions
MCPLocal and remote servers; remote OAuth and configurable tool permissionsLocal and remote servers with scopes and authentication options; project configuration in .mcp.json
SubagentsBuilt-in General and Explore, plus configurable custom agents and child-session permissionsBuilt-in and custom subagents with their own context, tools, model and permissions
Headless and CINon-interactive opencode run for scripts and CI; you supply the runner and credentialsNon-interactive claude -p, Agent SDK and GitHub Actions; bare mode needs API or supported cloud credentials rather than subscription login
PrivacyDepends on your model endpoint, local runtime, MCP servers and optional services; open source does not make hosted inference localConsumer training preference and commercial data policies differ; execution surface and connected tools also affect data flow

This comparison uses official OpenCode V2 and Claude Code documentation, checked November 10, 2026. V1 documentation and configuration examples can differ; match instructions to the version you run.

Compare both on one small task

  1. Choose an OpenCode provider

    In your OpenCode workspace, connect a model provider and select a model. Use a supported account sign-in, your own API key or a local runtime; hardware, context size and tool support affect local-model results.

  2. Set up Claude Code

    Choose the terminal, IDE, desktop or web setup in Anthropic's overview. Sign in with an eligible paid Claude plan, or use a separately billed Claude Console API key or supported cloud provider; check which authentication methods your chosen surface supports.

  3. Compare a complete change

    Start from the same clean commit in separate branches or worktrees. Ask each agent to fix the same small bug, run the same tests, then compare correctness, review effort, elapsed time and actual usage or cost—not just the first answer.

Pricing: free software is not free hosted inference

Claude plan or billing routePrice (US, excluding tax)
Free$0; Claude Code not included
Pro$20 a month, or $17 a month billed annually ($200 up front)
Max$100 a month
Ultra$200 a month
Team, Standard seat$25 per member a month, or $20 billed annually
Team, Premium seat$125 per member a month, or $100 billed annually
Enterprise$20 per seat a month billed annually (20-seat minimum), plus all usage billed at standard API rates
Claude Console (API)Pay as you go at standard API rates

opencode has no software license fee. You can bring your own provider key and pay that provider, use supported subscription sign-ins within their allowances, or run a local model on hardware you supply. Its optional Go service currently offers Go at $10 a month, Go Plus at $40 and Go Teams at $20 per member a month, each with usage limits; buying Go is not required to use opencode.

Claude Code is included in paid Claude plans, not Claude Free. The names and US prices below follow Anthropic's pricing and plan documentation, checked November 10, 2026; taxes, mobile prices, older contracts and provider billing can differ.

Subscription login: Claude plans are not API credits

OpenCode documents ChatGPT Plus and Pro sign-in and GitHub Copilot device OAuth; the account still needs the relevant entitlement and its usage rules still apply. An Anthropic API key is a different billing route from a Claude subscription.

Anthropic's current policy says third-party developers may not offer Claude.ai login in their own applications or route requests through Free, Pro, Max or Ultra plan credentials for users. It separately permits an end user to sign in to the unmodified Claude Code binary with their own subscription, including on a platform that hosts Claude Code. That exception does not turn opencode into an authorized Claude-subscription client: use an Anthropic API key or another supported provider there.

Which one fits your work?

  1. Choose opencode for switching model providers, experimenting with local inference, inspecting the agent's implementation or customizing an open-source stack. Budget time for provider configuration and testing each model's tool use.
  2. Choose Claude Code when you want Anthropic's integrated Claude experience, already have a suitable Claude plan, or value its first-party desktop, IDE and cloud workflows. Check your plan allowance and the authentication options for your chosen surface.
  3. For CI, both can run non-interactively, but neither command supplies a runner or makes model usage free. Start with read-only credentials where possible, explicitly scope tool permissions, and review repository hooks and MCP configuration before running an unattended job.
  4. Keep both when different tasks benefit from different models. Compare accepted, tested changes on representative work rather than treating one model's result as a universal agent ranking.

Local models and privacy: check the entire data path

OpenCode V2 discovers local Ollama models and also supports LM Studio and vLLM. Local inference can keep model requests on your hardware, but cloud models, web tools, remote MCP servers and other integrations can still send data elsewhere; choose a tool-capable model with enough context and inspect your configured endpoints.

Ollama also documents running Claude Code against its Anthropic-compatible API. That is Ollama's integration, not Anthropic-supported non-Claude inference, and model capabilities may differ from Claude. Do not confuse Ollama cloud models with inference on your own computer.

For Claude Code, Anthropic says consumer-plan users choose whether their data may improve models; commercial usage is not used for training by default. Retention depends on the account and settings, and zero data retention requires qualifying arrangements. OpenCode Go likewise publishes per-model training and retention terms—neither open source nor a paid plan alone guarantees that no data is retained.

Memory: CLAUDE.md vs AGENTS.md

OpenCode V2 uses AGENTS.md for persistent project guidance and explicitly does not fall back to CLAUDE.md. It loads global and project instruction files, discovers nested guidance as the agent explores, and accepts extra files or URLs through its instructions configuration. Do not apply the older V1 fallback rules to V2.

Claude Code distinguishes instructions you write in CLAUDE.md from auto memory: notes it writes from corrections and preferences. Current versions can read AGENTS.md directly when no project CLAUDE.md or CLAUDE.local.md exists in the working directory or above it; the Project instructions setting can load both. Direct AGENTS.md support requires v2.1.277 or later and is unavailable in some sessions, where importing AGENTS.md from CLAUDE.md is the documented fallback.

To share project guidance, keep build commands, conventions and verification requirements in AGENTS.md, then check how each installed client loads it. Keep tool-specific configuration separate and avoid contradictory copies; an instruction file is not a portable conversation history or a shared auto-memory store.

Extensibility: plugins, skills and subagents

Both tools support extensions, but their plugin systems are not interchangeable. OpenCode V2 loads package or local plugins configured in opencode.json(c), and discovers plugins under .opencode/plugins/. Its plugins can add tools, hooks, commands, agents and integrations. Claude Code plugins bundle components such as skills, agents, hooks and MCP servers, distributed through marketplaces or local directories.

Both use SKILL.md for reusable task instructions loaded when needed. OpenCode searches .opencode/skills and compatibility locations including .claude/skills and .agents/skills; Claude Code uses its own skill discovery and frontmatter. Shared Markdown can be a starting point, but review invocation settings, tool names, paths and supporting scripts before reusing a skill.

OpenCode includes General and Explore subagents and lets you define agents with a model, prompt and permissions in .opencode/agents or configuration. Claude Code also offers built-in and custom subagents with separate context, model choices, tools and permissions; their requests count toward the same usage limits as the main conversation. Neither tool's subagents make inference free.

Running OpenCode and Claude Code together

For concurrent work, use separate Git worktrees and branches so the agents do not edit the same files. Anthropic documents worktrees as separate checkouts for parallel sessions; open OpenCode in one checkout and Claude Code in the other, then review and merge their changes through Git rather than treating their live contexts as synchronized.

  1. Commit or stash your current changes and write a short handoff: the branch, goal, files changed, tests run and next failing check. Do not assume the other agent can import a live conversation or its permissions.
  2. Review CLAUDE.md and move the shared build, test and architecture guidance into AGENTS.md for OpenCode V2: its current instructions docs explicitly say it does not use CLAUDE.md as a fallback. Older OpenCode V1 rules docs describe a fallback, so do not copy that assumption into a V2 setup.
  3. If keeping Claude Code too, consult its current CLAUDE.md and AGENTS.md loading settings, and avoid contradictory copies. Keep Claude-specific hooks, skills and agent definitions separate until you have translated and tested them; the filenames alone do not make them portable.
  4. Recreate MCP entries in the destination client's configuration instead of copying JSON blindly. Claude Code's project .mcp.json and OpenCode's MCP configuration use different schemas; transfer the server URL or launch command and required environment-variable names, then sign in again and verify one read-only tool call. Never commit credentials or copy session tokens between clients.
  5. Run the project's existing tests from a clean branch in the new agent, then inspect the diff. Migrate one tool or custom subagent at a time so a configuration error is distinguishable from a model-quality difference.

Keep both, and use Reason across your connected accounts

Reason is another option when you want a web or Mac app that works across the accounts you connect, rather than replacing every tool with one provider. Connect supported ChatGPT, Claude, SuperGrok/X Premium+ and Copilot subscriptions or your own API keys, subject to each provider's supported sign-in route and terms; a Claude connection is not permission to reuse Claude credentials in opencode.

Keep opencode for an open-source or local-model workflow and Claude Code for Anthropic's integrated experience. To continue work in Reason, give it the repository, branch and handoff notes; review its plan and each connected account's usage before choosing a model.

Hit your limit? Reason keeps going on your other connected accounts or Reason credits.

Questions

Is OpenCode better than Claude Code?

opencode is the better fit for an open-source agent, provider choice and native local-model configuration; Claude Code fits people who want Anthropic's integrated Claude workflows and plan login. Compare the tested result and actual cost on your own tasks rather than assuming either wins everywhere.

Is OpenCode free?

opencode's MIT-licensed software is free, but hosted inference or local hardware still costs money; optional Go plans start at $10 a month. Claude Code comes with Pro at $20 a month ($17 billed annually), Max at $100, Ultra at $200, Team and Enterprise, or separately billed Claude Console API usage.

Can OpenCode use a Claude subscription?

You can use Claude models in opencode with an Anthropic API key, billed separately from your Claude subscription. Anthropic's current policy prohibits third-party applications from offering Claude.ai login or routing requests through Free, Pro, Max or Ultra subscription credentials for their users; its exception for signing in to the unmodified Claude Code binary is not permission to use that subscription in opencode.

Can opencode and Claude Code use local models through Ollama?

OpenCode V2 documents native Ollama discovery, while Ollama documents a Claude Code integration through its Anthropic-compatible API. Anthropic does not support routing Claude Code to non-Claude models, so distinguish Ollama's compatibility instructions from Anthropic support and test tool use with your chosen model.

opencode vs Claude Code vs Codex: which should I choose?

Choose opencode for multi-provider and local-model flexibility, Claude Code for Anthropic's integrated Claude workflows, or Codex for OpenAI's coding workflow with ChatGPT sign-in and terminal, scripting and cloud options. There is no universal winner: compare the same tested task, account allowances and total cost before choosing; our Codex vs Claude Code guide covers that pair in more detail.

More guides