OPENCODE
OpenCode: The Leading Open-Source AI Coding Agent
OpenCode is the MIT-licensed, bring-your-own-key terminal AI coding agent that puts model freedom and cost control in your hands. With 197K+ GitHub stars and support for 75+ LLM providers, OpenCode lets you run any model—including local models via Ollama—without vendor lock-in or subscription fees.
Why OpenCode?
While closed-source agents like Claude Code offer deep integration, OpenCode wins on flexibility and accessibility:
Model Freedom
Bring your own API key (BYOK) and switch between Anthropic, OpenAI, Google, xAI, or local models with a single config change. No vendor lock-in.
True $0 Floor
The tool itself is free and open source. Pay only for the model tokens you actually use, or run fully local via Ollama for a $0/month harness.
Built for Developers
Features like AGENTS.md project config, built-in LSP for ~32 languages, JS/TS plugin ecosystem, and Scout research agent make OpenCode powerful yet lightweight for daily coding workflows.
Head-to-head: OpenCode vs Claude Code (September 2026)
Verified against both projects' docs, the GitHub API, and pricing pages this month.
| Dimension | OpenCode | Claude Code |
|---|---|---|
| License | MIT — open source, forkable, self-hostable | Closed source, Anthropic-controlled |
| Models | Any provider via BYOK: Anthropic, OpenAI, Google, xAI, Ollama local, or the Zen gateway | Claude models only (Fable 5, Opus 5, Sonnet 5, Haiku 4.5); gateway proxies via ANTHROPIC_BASE_URL |
| Tool cost | $0 — no subscription, no markup, no quota | $0 to install; needs a Claude plan to run |
| Model cost floor | $0 (Zen free models, Ollama local) | $20/mo Pro ($17 annual) — no free tier |
| Per-agent model routing | Yes — per-agent model in config, change one string | Tuned for Claude models first |
| Local / offline | Yes — Ollama streaming v2, no vendor in the loop | No local model support |
| Project config | AGENTS.md (open standard, 25+ tools) + opencode.json | CLAUDE.md + .claude/ hierarchy (@AGENTS.md bridges) |
| Skills | SKILL.md compatible; JS/TS plugin ecosystem with npm access | SKILL.md in .claude/skills/ — the format's origin, deepest support |
| LSP | Built-in, ~32 languages, no MCP wiring | Via MCP servers per language |
| Autonomy | Plan/build modes, background subagents, Scout research agent | /goal, Agent View, hooks, checkpoint rewind (Esc×2) |
| Headless / CI | opencode run --format json, opencode serve, GitHub installer | claude -p headless + Agent SDK (separate credit pool since June 15, 2026) |
| Desktop / surfaces | Terminal TUI + Tauri desktop (macOS/Windows/Linux) + IDE extension | Terminal CLI + VS Code/JetBrains + desktop + web |
| GitHub stars | ~197K (anomalyco/opencode, Sep 2026) | ~135K (Jun 2026, last public read) |
| Usage | ~7.5M monthly devs; 7,000+ open issues (rough edges) | 10%+ of public GitHub commits, projected 20%+ by year-end |
Two details most ranking comparisons still get wrong. First, the quiet rename: the repo shipped as sst/opencode — that URL now redirects to anomalyco/opencode after SST rebranded to Anomaly, and several currently-ranking posts still cite the old org. Second, the OpenRouter data point that reframes "lock-in": on OpenRouter's 30-day app data, the single most-used model inside Claude Code is GLM 5.2 — 3.14T tokens against 1.98T for Anthropic's own four models combined. Developers are already swapping the model under Claude Code via compatible proxies; OpenCode just makes it a config line instead of a workaround.
On measured quality: in a same-model Builder.io benchmark Claude Code finished four tasks in 9m09s versus OpenCode's 16m20s, though OpenCode wrote more tests (94 vs 73); a published 38-task comparison scored Claude Code 82% vs OpenCode's 74%; Composio's June 2026 review called it a 3-3 tie and closed "pick by temperament, not by the tally." With models now interchangeable, harness behavior — the loop, the tool gating, the recovery — is the differentiator, and it is exactly what our harness engineering guide breaks down.
Pricing decoded: the $0 floor vs the flat bill
Verified against OpenCode's Zen docs and Anthropic's pricing pages, September 2026:
| Route | OpenCode | Claude Code |
|---|---|---|
| Tool | $0 — MIT, no paid edition, no seat count | $0 — bundled with Claude plans |
| Entry | BYOK: your provider's rates, OpenCode takes no cut | Pro $20/mo ($17 annual), 5-hour windows |
| Gateway | Zen pay-as-you-go, no markup; Go $10/mo open-weight models; Black $200/mo (sold out) | — |
| Free models | Zen lists real $0 entries (DeepSeek V4 Flash Free, Big Pickle, MiMo-V2.5 Free, North Mini Code Free, Nemotron 3 Ultra Free) — beta promotions | None |
| Mid / heavy | Whatever your model costs — Zen spans $0 to $180/1M output | Max 5x $100/mo, Max 20x $200/mo |
| Hard cap | Turn off Zen auto-reload → your balance is the ceiling | Plan windows; API metering otherwise |
The mechanics matter more than the sticker. Zen is a curated gateway with published per-token rates and no markup on requests (it passes through a 4.4% + $0.30 card-processing fee on top-ups, which is an argument for larger, less frequent top-ups). Auto-reload tops up $20 when your balance drops below $5 — turn it off and your balance becomes a hard cap, the cost control no subscription CLI offers. The catalogue's spread is the single most useful thing to understand: routine work on a free or $0.30-in model, frontier reasoning at $30/$180 per million tokens — a 150x range that makes model choice the whole cost story, not a micro-optimization.
The cautionary tale cuts the other way, and it is worth stating honestly: using Claude models through raw API billing — in either tool — can spike hard. One r/ClaudeCode developer reported burning $200 of tokens in three hours of unattended looping at frontier rates. Claude Code's subscription exists precisely to absorb that: flat $20-200/mo with no meter anxiety. OpenCode's counter is the floor, not the ceiling: quiet weeks cost $0, evaluation costs $0, and a CI pipeline can run open-weight models on Go ($10/mo) without dying on a personal quota. Bursty use favors OpenCode; steady heavy daily use on a frontier model favors the subscription.
The OAuth split, and running Claude in either tool
January 2026: Anthropic blocked third-party tools from using Claude consumer subscription OAuth tokens. OpenCode removed Claude Pro/Max sign-in in February, citing Anthropic's legal request. The practical result is the wrinkle most comparisons miss: Claude's models still run in both tools — billed differently. In OpenCode you attach an Anthropic API key or route through Zen's curated Claude tier (metered per token, from Haiku 4.5 at $1/$5 up to Fable 5 at $10/$50 per million). In Claude Code, subscription usage is bundled; ANTHROPIC_BASE_URL proxies and gateway /v1/models endpoints give it some provider flexibility too — which is how GLM 5.2 became its most-used model on OpenRouter.
The local-model gap has no workaround: OpenCode points at Ollama (or any local runtime) with no vendor in the loop at all, and Claude Code has no equivalent. If your employer won't let code leave the building, that single row decides the comparison. It is the same local-first principle behind our local voice stack: the transcription equivalent runs entirely on your machine, so the sensitive audio never uploads either.
Skills, config, and the loop: more portable than you think
The two agents share more configuration DNA than any other pair. Both speak SKILL.md — the skills standard that started in Claude Code — so the same skill folder works in ~/.claude/skills/ or OpenCode's skill paths.
Both speak MCP. Both auto-load project memory: OpenCode reads AGENTS.md natively (the cross-tool standard that Cursor, Copilot, Gemini CLI, Devin, Zed, and 25+ tools also read), while Claude Code auto-loads CLAUDE.md — the bridge is one line, a CLAUDE.md containing @AGENTS.md. Our AGENTS.md template shows what belongs in the shared file. Divergences: OpenCode ships built-in LSP for ~32 languages (no per-language MCP wiring), a JS/TS plugin ecosystem with npm access, and ~100 documented keybind actions; Claude Code counters with the deeper skills + hooks lifecycle, subagents in .claude/agents/, and an inter-agent SendMessage primitive OpenCode has no equivalent for.
Both ecosystems have converged on the same 2026 insight: stop prompting, start running loops. Claude Code's creator put it directly — "I don't prompt Claude anymore. I have loops that are running" — and the pattern generalizes across agents, as our loop engineering guide documents. A well-specified loop works in either tool; that portability is why config discipline (AGENTS.md, stop conditions, verifier steps) outlasts any single vendor choice.
Running both — the harness that makes it practical
The community's real answer is "both" — subscription CLI for daily work, OpenCode for overflow, local-only jobs, and cost-capped automation. Managing two config formats, two billing models, and two terminal windows is the friction that stops people. That is the problem a harness solves.
VibeFuse is the first ever free widget-based AI harness: Claude Code, OpenCode (and Codex CLI), Gemini, Cursor Agent, and Qwen as live widgets on one Windows canvas — sessions named and resumable, parallel agents on separate worktrees, MCP tools attached, local Whisper voice control, all processing local/offline. The harness is $0; you pay only the model vendors you already chose.
The open-source marketplace layer is what neither project offers: sell your widgets, SKILL.md skills, and styling packs with 80% payouts to creators via Stripe Connect. An OpenCode model-routing widget or a CLAUDE.md-to-AGENTS.md migration skill you build for yourself becomes a product. Works in any app you already use.
FREE VIBEFUSE · FIRST WIDGET · VS CLOUD · CREATOR CHALLENGE · FOR AGENTS · START · BUILD IN PUBLIC · EARN · NO $100 PAYWALL
Join agentic developers who ship widgets, post on the forum, and sell on the marketplace — free VibeFuse license on every account. Create a free account · For Agents · Start · Build in Public · First Widget · vs Cloud Computers · Creator Challenge · Earn · Creator Playbook · FAQ.
Widget Wars: publish a free custom widget the agent can drive, open a forum build thread with install steps, earn Founders-track perks while seats remain — public rubric, no purchased votes.
- ✓ OpenCode + Claude Code + Gemini widgets
- ✓ Named resumable sessions
- ✓ Local Whisper + Piper
- ✓ 80% creator payouts
Explore VibeFuse & harness guides
- Harness Guide
- Free Coding Tools
- AI Coding Agent Desktop
- Free Voice Transcription
- Free Text to Speech
- VibeFuse Product
- Widget Marketplace
- Download Free
- VibeFuse Docs
- Shareable AI Widgets
- Shareable AI Skills
- MCP Tools
- AI Agent Harness
- Harness Engineering
- HyperFrames Video
- Skill Seekers
- Sell AI Skills
- AI Skills Marketplace Compared
- Cursor Alternative
- Local Whisper + Piper
- Custom AI Dashboard
- Founders 50
- For Agents
- Start in 5 Minutes
- Build in Public
- First Widget HowTo
- VibeFuse vs Cloud Computers
- Creator Challenge
- Earn with AI Content
- Creator Playbook
- FAQ
- Widget Wars
- Community Forum
- Creator Community
- Publish & Sell Widgets
- Custom AI Widgets
- Computer-use agents
- Grok Bot alternative
- Perplexity Computer alternative
- ChatGPT agent alternative
OpenCode FAQ
What is OpenCode?
OpenCode is an MIT-licensed, bring-your-own-key terminal AI coding agent. It is model-agnostic across 75+ providers (including local Ollama), free to download, and one of the most-starred open-source coding agents on GitHub (~197K stars as of 2026).
Is OpenCode free?
The OpenCode tool itself is free and open source. You pay only the model tokens you use via BYOK, OpenCode Zen's pay-as-you-go gateway, or run local models through Ollama for a true $0 floor. There is no OpenCode seat subscription.
How does OpenCode compare to Claude Code?
OpenCode wins on license (MIT), provider freedom, and the $0 cost floor with local models. Claude Code wins on default polish and Claude-tuned workflows, but requires a Claude Pro/Max plan. Many teams run both — subscriptions for daily Claude work and OpenCode for overflow, local jobs, and audit-friendly open source.
Can OpenCode use local models?
Yes. Point OpenCode at Ollama or other local OpenAI-compatible endpoints for offline or zero-token-cost coding. You can also mix providers per agent — local for drafts, frontier APIs for hard refactors.
How do I run OpenCode inside VibeFuse?
Download free VibeFuse for Windows, add an OpenCode terminal widget on the canvas, and keep Claude Code, Codex, or Gemini widgets beside it. Your repos stay local; model spend stays on your own keys.