Skip to content
Skip to content
Comparisons11 min read

OpenCode vs Claude Code

OpenCode is an independent MIT-licensed, model-agnostic coding agent at opencode.ai. Claude Code is Anthropic’s agentic coding tool. Pick by license, model lock-in, and which surfaces you actually use.

Repath Khan

OpenCode vs Claude Code

MIT harness vs Anthropic agent.

critique.sh

Direct answer

Pick OpenCode when you want an MIT-licensed, model-agnostic coding agent you can run in a TUI, desktop app, or IDE extension, with 75+ providers via Models.dev and optional OpenCode Zen. Pick Claude Code when you want Anthropic’s agentic coding tool with a polished loop across terminal, IDE, desktop, browser, Slack, and CI. OpenCode is published at opencode.ai by the anomalyco project. It is not owned, operated, or rebranded by Critique. Claude Code is Anthropic’s product. Neither tool, by itself, is an independent reviewer of the patch it just wrote.

OpenCode vs Claude Code is a search people type when they already like a terminal agent and want to know whether to stay on Anthropic or switch to an open harness. The useful split is not “which one writes more lines.” It is license, model choice, surfaces, and who is allowed to call the change finished.

OpenCode’s own intro calls it an open source AI coding agent, available as a terminal interface, desktop app, or IDE extension. You cd into a project, run opencode, optionally /init to write AGENTS.md, then Plan or Build. That is a real, documented product. This post does not steal its stars, and it does not pretend Critique ships it.

Claude Code’s official overview describes an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools. Anthropic ships it in the terminal (claude), IDE extensions, a desktop app, and the browser, with Slack, GitHub Actions, GitLab CI, and other surfaces documented. Most of those surfaces want a Claude subscription or an Anthropic Console account. The Terminal CLI and VS Code also document third-party provider paths.

Fair comparison, different products
This is not a scoreboard. OpenCode wins if your bottleneck is an open, model-agnostic author you can fork and configure. Claude Code wins if your bottleneck is Anthropic’s agent across the surfaces you already pay for.
OpenCode rows follow opencode.ai docs (intro, providers, permissions, agents) as of 16 Aug 2026. Claude Code rows follow code.claude.com overview, quickstart, and enterprise deployment docs on the same date. Features neither project has documented are omitted. OpenCode is not a Critique product. Critique does not own OpenCode.
DimensionOpenCodeClaude Code
JobOpen-source AI coding agent: implement, plan, edit, run tools, share sessions.Anthropic’s agentic coding tool: implement, edit, run commands, manage local git workflows.
Publisheranomalyco / OpenCode at opencode.ai. MIT-licensed source at github.com/anomalyco/opencode. Independent of Critique and independent of Anthropic.Anthropic. Docs at code.claude.com. GitHub companion repo anthropics/claude-code. Not an MIT community harness.
RuntimeTUI in the current directory (opencode), plus documented desktop app and IDE extension. Plan and Build as primary agents. Subagents: General, Explore, Scout.Terminal (claude), VS Code and JetBrains extensions, desktop app, claude.ai/code in the browser, Slack, GitHub Actions, GitLab CI, Remote Control, mobile handoff.
ModelsAny LLM provider via /connect. Official providers docs: 75+ providers through the AI SDK and Models.dev, including local models. OpenCode Zen is a curated catalog the OpenCode team tests for coding agents. Keys stored in ~/.local/share/opencode/auth.json.Claude models through a Claude subscription or Anthropic Console. Enterprise docs cover Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry. Terminal CLI and VS Code also document third-party provider support.
Project memory/init analyzes the repo and writes AGENTS.md in the project root.CLAUDE.md at repo and org paths, plus documented auto memory. Skills and hooks package repeatable workflows.
ReviewYou can add a custom review subagent, Plan mode (edits default off until you switch to Build), and permission rules. Review is optional configuration, not a separate controller the author cannot skip.You can prompt it to review, add a /review-pr skill, or wire GitHub code review in CI. The same product family that wrote the change can still narrate why it is done.
PermissionsDocumented permission config: allow, ask, or deny per tool. Official defaults are permissive: most tools allow. doom_loop and external_directory default to ask. .env reads are denied by default. --auto auto-approves requests that are not denied.Permission prompts in the session, plus org-managed policies that local config cannot overwrite (as Anthropic’s security docs describe). Hooks can run shell before or after actions.
Installcurl -fsSL https://opencode.ai/install | bash, or npm install -g opencode-ai, Homebrew tap anomalyco/tap/opencode, plus Arch, Chocolatey, Scoop, Mise, Docker, and GitHub releases as documented.curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux, and WSL. PowerShell and CMD installers on Windows. Homebrew cask claude-code, WinGet Anthropic.ClaudeCode. npm @anthropic-ai/claude-code is documented as deprecated. Then cd into a project and run claude.
Cost shapeThe MIT tool is free. You pay the provider you /connect, or OpenCode Zen / other billed catalogs if you choose them. Local models are an option the providers docs describe.Claude Pro, Max, Team, or Enterprise subscription, Anthropic Console PAYG, or cloud-provider billing (Bedrock, Vertex-class, Foundry) as documented. The harness is not a free MIT binary you fork.

OpenCode is the open source AI coding agent at opencode.ai. The docs tell you to install, /connect a provider, cd into a project, run opencode, then /init so it can analyze the repo and write AGENTS.md. Plan mode (Tab) disables edits so the model can propose an implementation. Build mode makes the changes. /undo and /redo revert or restore the last agent edits. /share creates a link to the current conversation.

The agents page documents two built-in primary agents (Build and Plan) and three built-in subagents (General, Explore, Scout). You can add your own in opencode.json or markdown under ~/.config/opencode/agents/ and .opencode/agents/. A review-style subagent with edit: deny is a documented pattern. That is useful. It is still the same harness configuring a specialist. It is not an independent controller that fires after every claimed unit of work whether the author wants it or not.

Providers docs say OpenCode uses the AI SDK and Models.dev for 75+ LLM providers and local models. /connect stores keys in ~/.local/share/opencode/auth.json. Zen is optional: a handpicked set of models OpenCode has tested for coding agents, billed through opencode.ai/auth if you choose that path. You can also bring Anthropic, OpenAI, Google, Copilot login, ChatGPT Plus/Pro login, or a custom OpenAI-compatible endpoint. That model-agnostic story is the product’s honest strength, including if you want Claude models without living inside Claude Code.

Permissions default to allow for most tools. The docs are explicit about this. doom_loop (same tool call three times with identical input) and external_directory default to ask. .env files are denied on read unless you override. You can tighten everything to ask, deny git push, or run --auto so non-denied prompts auto-approve. Configure that if you care. Do not assume a fresh install behaves like a locked-down review gate.

Claude Code is Anthropic’s agentic coding tool. The overview is blunt: it reads the codebase, edits files, runs commands, and plugs into development tools. Install with the official script, cd into a project, run claude. First use logs you in unless ANTHROPIC_API_KEY is already set. One-shot tasks use claude "task" or claude -p "query". claude -c continues the most recent conversation in the current directory.

The how-it-works page frames Claude Code as the harness around Claude: models reason, tools act, the loop feeds tool results back into the next step. That is the same category OpenCode occupies. The difference is vendor and surface area. Claude Code is built to follow you from terminal to VS Code, JetBrains, desktop, web, Slack, and CI. Sessions can move: Remote Control, /desktop handoff, claude --teleport from web or mobile into the terminal where those features are documented.

CLAUDE.md is the project instruction file. Anthropic also documents auto memory, skills for repeatable workflows, hooks that run shell around actions, sub-agents, and an Agent SDK. Git workflows are first-class: stage, commit, branch, open a pull request. That depth is why teams that already pay for Claude usually stay. Switching to OpenCode because a blog post used the word “open” is a bad trade if the surfaces you use are Claude Code’s.

Claude Code is not model-agnostic in the OpenCode sense. The default path is Claude. Cloud deployments go through Anthropic or through Bedrock, Vertex-class, and Foundry as the enterprise docs describe. Third-party providers exist on some surfaces. They are not the product’s center of gravity. If your constraint is “I must swap models every week without leaving the same MIT TUI,” OpenCode matches that constraint more honestly.

Stay on Claude Code if you already have a Claude subscription, you like CLAUDE.md plus the IDE and desktop apps, and you want Anthropic to keep shipping the harness. The cost is vendor concentration. The author can still tell you the tests were green.

Move to OpenCode if you need MIT source, a forkable TUI, Plan/Build as documented modes, and /connect across 75+ providers including local models. You can still point OpenCode at Anthropic. You are not required to. Star count is popularity, not a SWE-bench score. You still owe the repo a review step the author did not grade.

If the comparison you actually wanted was another open CLI against Claude Code, read Aider vs Claude Code. Aider is a different open-source terminal author (git-centric, pair-programming style) and should not be collapsed into OpenCode. The comparisons hub lists the other head-to-heads.

OpenCode (typical author loop)
Install and `/connect` a providerRun `opencode` in the repo, optional `/init`Plan then Build, or Build directlyOptional custom review subagent, permissions, `/undo`You decide the change is done
Claude Code (typical author loop)
Install and log in (subscription, Console, or documented cloud path)Run `claude` in the repo, with `CLAUDE.md` if you keep oneAgent reads, edits, runs commands, may use gitOptional skill, hook, or CI review you configuredYou decide the change is done

Both OpenCode and Claude Code are authors. Optional review subagents, Plan mode, skills, and CI bots are still configuration on the same product family. If your actual failure mode is “the writer graded its own homework,” keep the author you like and add an independent finish pass.

That sidecar is the Critique CLI: package @critiquedotsh/cli, binary critique. Install it next to OpenCode or Claude Code. Do not install CritiqueCode as a sidecar. CritiqueCode is @critiquedotsh/harness, binary critique-code. It is an optional author for teams that want Critique to implement in an interactive session, then force local review before promotion. Most people who already like OpenCode or Claude Code should keep that author and use critique. Product split: CritiqueCode docs. Intro: Introducing CritiqueCode.

Author you keep versus optional Critique author
Do not treat OpenCode as a Critique binary. Do not install CritiqueCode by changing the sidecar package. Human merge judgment still sits above every tool on this page.
You already haveInstallBinaryJob
OpenCode or Claude CodeKeep OpenCode or Claude Code as the author@critiquedotsh/clicritiqueSidecar reviewer. Independent finish pass. Not CritiqueCode.
Want Critique to authorNo existing author, or you want Critique’s loop@critiquedotsh/harnesscritique-codeOptional author agent with forced local review. Not a rename of OpenCode.
Keep OpenCode, keep Claude Code, or add review
  1. 1
    Do you already use Claude Code and like the Anthropic surfaces?
    Keep Claude Code. If you need an independent finish pass, install @critiquedotsh/cli (critique). Do not replace Claude Code with OpenCode just to feel more open.
  2. 2
    Do you need MIT source, 75+ providers, Plan/Build, and a forkable TUI?
    Stay on OpenCode. That is what opencode.ai documents. You can still /connect Anthropic if you want Claude models inside OpenCode.
  3. 3
    Were you comparing Aider, not OpenCode?
    Leave this page. Use Aider vs Claude Code and the comparisons index.
  4. 4
    Were you told Critique owns OpenCode?
    Wrong. OpenCode is the anomalyco project. Critique does not own it. CritiqueCode is @critiquedotsh/harness and is optional if you want Critique to author.

Pick the author, then decide if you need a reviewer
Keep Claude Code if Anthropic’s loop already writes well. Keep OpenCode if you want MIT source and model choice. Add critique as the sidecar when the author must not grade its own homework. Switch to critique-code only when you want Critique to implement.