
Choose Claude Code if you want to spend your Claude Pro or Max subscription allowance on coding. Choose OpenCode if you want an MIT-licensed agent with many model providers or local inference. Moving to OpenCode changes the harness, authentication and bill, even when you keep the same Claude model.
The short version: keep Claude Code for subscription-funded Claude work; try OpenCode when model choice or control of the source matters more. You can use both. Max subscribers also get separate API credits that can fund Claude API calls from another harness, subject to eligibility and credit limits.
Prices and documented behavior were checked against primary sources on 29 October 2026. This is a documentation comparison, not a current coding-quality test. Voyager, the desktop app our team builds, runs Claude Code on its official runtime with your own sign-in; that preserves Claude Code's billing route, rather than transferring your allowance to another agent (product details).
What each is
Claude Code is Anthropic's proprietary agent for terminal, IDE, desktop and cloud coding sessions (overview, license). Its latest release is 2.1.312, published 27 October. Anthropic supports Claude models through its own platform and supported cloud providers; non-Claude models through a gateway are unsupported (release, gateway policy).
OpenCode is Anomaly's open-source coding agent, licensed MIT. Its documentation lists 75+ providers and local models; the software is free, while model access has its own bill (repository, providers).
Check which OpenCode you install. On 29 October, opencode-ai on npm is 1.19.5, published 28 October, while @opencode/cli is 2.2.2, published 29 October (V1 registry, V2 registry). Homebrew core points at V2, currently 2.2.1 (formula). Both use the opencode command; remove a package-managed V1 installation before installing V2 (migration guide).
At a glance
| Decision | Claude Code | OpenCode |
|---|---|---|
| Claude Pro or Max subscription allowance | Yes | No bundled Claude subscription login |
| Model choice | Claude, officially | Multiple providers and local servers |
| Software license | Proprietary | MIT |
| Default approvals | Auto mode on supported interactive sessions; classifier review | Most actions allowed; configure ask rules |
| Shell isolation | Optional OS sandbox | No built-in sandbox; use a container or VM |
| Existing Claude setup | Native instructions, skills and plugins | Skills carry over; check instructions, MCP config and plugins |
| Remote work | Anthropic-hosted cloud sessions | Remote access to your running host |
Sources, read 29 October 2026: Claude Code authentication, permission modes, sandboxing and cloud sessions; OpenCode's providers, V2 permissions, security policy, migration guide and remote access notes.
Can you use your Claude subscription in OpenCode?
Your subscription allowance does not transfer. Anthropic's current login guidance says included usage is for its native applications. It prefers API keys for third-party tools and may allow selected tools through usage credits, billed separately from subscription limits. Attempts to disguise a client or route third-party traffic against those limits are prohibited (Claude account authentication).

OpenCode removed its bundled Anthropic OAuth plugin in 1.3.0 on 22 March 2026, following the 19 March merge of a change titled “anthropic legal requests” (release, PR #18186). Its provider instructions now direct you to an API key and warn against subscription-auth plugins, as shown in the opening screenshot (providers).
Three routes remain distinct:
- Claude API key in OpenCode: pay for API consumption through your Anthropic organization.
- Max monthly API credits: Max 5x includes US$100, Max 20x US$200 per month. Claim them after seven days on an eligible plan and link a Console organization. They expire monthly and exclude interactive Claude Code. Our reading is that an OpenCode request using that organization's Anthropic API key draws on this balance because it is a Claude API request; Anthropic does not name OpenCode in the coverage terms (API credit terms). An OpenCode Console key is a different billing account.
- Another app running Claude Code: Anthropic allows the unmodified binary inside other products, with each user authenticating and paying directly. Its SDK guidance also preserves subscription-limit use when signed in with a Claude plan. Neither statement authorizes a replacement harness to replay subscription credentials (embedding conditions, SDK guidance).
Anthropic's posted Usage Policy, scheduled to take effect 12 November 2026, also prohibits unauthorized services routing requests through consumer subscriptions (policy).
Compare the bill you would actually pay
Claude Pro is US$20 monthly or US$200 annually; Max 5x is US$100 monthly and Max 20x US$200 monthly, before applicable tax, checked 29 October 2026 (pricing, Max plans). Plans have five-hour and weekly limits shared with Claude chat (plan usage). The Claude usage limits guide explains the meters and reset behavior.
Anthropic reports enterprise API averages of roughly US$13 per active developer-day and US$150–250 per developer-month (cost guide). Those are Claude Code fleet figures, not an OpenCode quote or proof that Max is cheaper for your tasks. A subscription is attractive when its allowance covers your work; occasional API use can cost less than an unused monthly plan. Count Max's separate API credit only if you qualify and would use it.
Standard token rates, US dollars per million tokens, checked 29 October 2026:
| Model and route | Input | Cache read | Output |
|---|---|---|---|
| Opus 5.5, Anthropic or OpenCode Console | $4.00 | $0.20 | $20.00 |
| Sonnet 5.5, Anthropic | $2.00 | $0.10 | $10.00 |
| Sonnet 5.5, OpenCode Console | $2.00 | $0.20 | $10.00 |
| Haiku 5.5, either route, prompts up to 100K tokens | $0.10 | $0.01 | $0.50 |
Sources: Anthropic API pricing, OpenCode Console pricing. These are token rates, excluding cache-write premiums and other charges. Haiku has higher rates above 100K input tokens. Console still lists a higher Sonnet cache-read rate than Anthropic; do not assume identical pricing from identical model names.
OpenCode Console is optional pay-as-you-go access to multiple models. Its billing and model pages now agree on a 4.6% + US$0.31 processing fee per credit purchase: US$50 of credits costs US$52.61 (billing). A direct provider key avoids this Console purchase route.
OpenCode Go is a separate subscription: US$10/month, Go Plus US$40/month, or Go Teams US$20/member/month. Go and Go Plus require single-member workspaces. Each model has its own allowance: Haiku 5.5 and Kimi K3 get US$15 on Go or US$60 on Plus; GLM-5.3-Flash gets US$60 or US$180. Five-hour and weekly caps are 20% and 50% of the monthly allowance. Opus and Sonnet are absent from the current Go catalog (Go plans and allowances).
Choose Claude Code when its subscription fits your workload. Choose OpenCode when a different model or billing route fits better; check the provider's limits before counting an existing ChatGPT or Copilot subscription as sufficient (supported sign-ins).
Permissions and data change with the harness
Claude Code's supported interactive sessions start in auto mode unless settings override it. Routine project reads and edits proceed; a classifier reviews other actions. This reduces prompts without guaranteeing safety (permission modes). Its shell sandbox is off by default; /sandbox enables filesystem and network restrictions on macOS, Linux and WSL2 (sandboxing).
OpenCode's defaults allow most actions. V1 asks about outside-project access; V2 allows outside paths. Both now ask about direct .env reads (V1 defaults, V2 defaults). Its security policy explicitly says permissions do not provide sandbox isolation; use Docker or a VM if you need that boundary (security policy).
For OpenCode 2, this opencode.json asks before edits, shell commands and access outside the project:
{
"$schema": "https://opencode.ai/config.json",
"permissions": [
{ "action": "edit", "resource": "*", "effect": "ask" },
{ "action": "shell", "resource": "*", "effect": "ask" },
{ "action": "external_directory", "resource": "*", "effect": "ask" }
]
}
V2 uses permissions and shell; V1 uses permission and bash. Later matching rules win, including agent rules, so review those too (V2 rules).
Before storing provider keys in hosted Console, review the 17 October 2026 disclosure: OpenCode reported a breach affecting 1.4% of Console users. Its cofounder distinguished Console-stored keys from keys kept in local OpenCode (company disclosure, cofounder clarification).
Data follows the provider and tools you enable. Local model inference is an option, but it does not make remote MCP servers or web tools local. Go's privacy table varies by model: some contributor endpoints permit training, and DeepSeek's zero-retention agreement is renewed monthly. Check the current row before sending private code (Go privacy).
Choose Claude Code for its integrated classifier and optional shell isolation. Choose OpenCode for provider control, with explicit permissions and any isolation you require configured before the first task.
What carries over when you switch
Save your Claude configuration, choose the OpenCode version, then migrate one repository:
| Item | What to do |
|---|---|
| Model access | Run /connect. Use a provider key or supported sign-in, then check which account pays. |
| Project instructions | Put shared guidance in AGENTS.md. V1 falls back to CLAUDE.md; V2 currently discovers only AGENTS.md. |
| Skills | Both versions discover .claude/skills. Check scripts, dependencies and tool names. |
| MCP servers | Recreate the server entries under OpenCode's mcp configuration. |
| Hooks and plugins | Rebuild Claude-specific integrations. V2 also needs ports of V1 OpenCode plugins. |
| Language-server diagnostics | V1 has LSP support. V2 accepts lsp config but does not run language servers; use lint, typecheck or compiler commands. |
| Conversations | Keep Claude Code available for its existing sessions; OpenCode's import command documents OpenCode session exports. |
Sources, read 29 October 2026: V1 rules, V2 instructions, skills, MCP configuration, migration guide and CLI import. For the distinction between portable instructions and tool connections, use MCP vs skills.
If both agents will share instructions, keep AGENTS.md as the source and have CLAUDE.md import it with @AGENTS.md. Claude Code also supports AGENTS.md directly, but its default discovery depends on whether a Claude-specific instruction file applies (memory documentation).
Choose V1 if LSP diagnostics are essential today. Choose V2 if its current feature set fits, after checking the migration guide rather than assuming every accepted config field is implemented.
Does the harness change coding quality?
There is evidence that it can, but it does not establish a current winner for Claude models. Liu and Han's preprint, submitted 3 October 2026, compared fixed models across harnesses. With Qwen3.8-27B, Claude Code solved 347 of 444 paired tasks, OpenCode 312. The Qwen3.6 gap was not statistically significant. Costs also differed substantially (paper and results).
Those runs used Claude Code 2.1.259–2.1.273 and OpenCode 1.18.30–1.18.31, with unequal time budgets on the local Qwen arms. Claude models were run only in Claude Code, so this is not evidence that today's Claude Code beats OpenCode 2 on Claude. OpenCode subsequently added output-limit continuation in 2.0.29, addressing one failure mode discussed in the paper (changelog).
Before moving daily work, compare a bug fix and a multi-file change on separate clean branches. Hold the model, prompt and acceptance tests fixed. Record accepted diffs, interventions, time and cache-adjusted API cost. A cheaper request is useful only if it produces work you accept.
Which should you choose?
| Your deciding need | Start with | Purchase or setup check |
|---|---|---|
| Use Claude's subscription allowance | Claude Code | Does the plan cover your working week? |
| Mix providers or run local inference | OpenCode | Is your chosen model good enough for your tasks? |
| Keep Max and try another harness | Both | Claim eligible API credits and use the linked organization's key |
| Review actions with a classifier and optionally sandbox the shell | Claude Code | Check the active mode; enable the sandbox |
| Modify or embed the agent | OpenCode | MIT source; V2 plugins and server integrations need their own ports |
| Keep tasks running with your laptop closed | Claude Code cloud sessions | OpenCode remote pairing needs its host to remain running |
Claude Code's cloud sessions run on Anthropic infrastructure. OpenCode's remote pairing reaches a running OpenCode host; you can keep a separate host online, but pairing alone does not supply one.
Frequently asked questions
Can I use Claude Max with OpenCode? Use an Anthropic API key, with eligible Max API credits claimed in the linked organization. That is separate from routing OpenCode through your Max subscription allowance (credit coverage, authentication guidance).
Is OpenCode free? The MIT-licensed software is free. Hosted inference is a separate purchase unless a provider includes it in an existing plan or promotion; local inference needs your own hardware (providers).
Will Anthropic ban me for using OpenCode? Anthropic's staff recommended the API route. Its current rules prohibit disguised clients and attempts to charge third-party traffic against subscription limits. An API key still carries Anthropic's usage terms (staff response, authentication rules).
Does OpenCode read CLAUDE.md? V1 uses it as a fallback. V2 currently discovers AGENTS.md; move the relevant instructions there or configure instruction files explicitly (V2 instructions).
Voyager is a desktop AI agent for creative work
Describe what you want to make; Voyager plans it, uses your apps and tools, and keeps everything editable.
