· Harness/ Head to head

Claude Code vs OpenCode

The deciding difference is operational: OpenCode can run on infrastructure you control, Claude Code cannot. If that constraint is real for you, it settles the choice before anything else is considered.

Claude Code

Anthropic's coding agent — terminal, IDE and SDK, with hooks, skills and MCP built in.

Proprietary · paid · hosted service only

Configure via .claude/settings.json; drop reusable procedures in .claude/skills/.

OpenCode

Open-source terminal coding agent, provider-agnostic.

Open source · can be self-hosted

· Side by side/ 5 of 6 differ
Claude CodeOpenCode
LicenceProprietaryOpen source
Pricingpaidopen source
Self-hostableNoYes
LanguagesAny languageAny language
Installnpm install -g @anthropic-ai/claude-codenpm install -g opencode-ai
Keys requiredANTHROPIC_API_KEYNone
· Common questions/ FAQ

What is the difference between Claude Code and OpenCode?

The deciding difference is operational: OpenCode can run on infrastructure you control, Claude Code cannot. If that constraint is real for you, it settles the choice before anything else is considered. Claude Code: Anthropic's coding agent — terminal, IDE and SDK, with hooks, skills and MCP built in. OpenCode: Open-source terminal coding agent, provider-agnostic.

Can Claude Code and OpenCode be self-hosted?

Claude Code is a hosted service only. OpenCode can run on your own infrastructure.

Are Claude Code and OpenCode open source?

Claude Code is proprietary (paid). OpenCode is open source (open source).

Build a stack with Claude CodeAll harness options
· For agents/ This page, machine-readable

Every page here answers to Accept: text/markdown and returns the same content at roughly a tenth the tokens. No separate site, no toggle — same URL.

curl -s -H "Accept: text/markdown" https://newagent.build/compare/claude-code-vs-opencode