OpenCode

A free, open-source (MIT) AI coding agent for the terminal, desktop and IDE, bring any of 75+ model providers, including your own local Ollama models.

Best forDevelopers who want a genuinely free, fully open-source coding agent that works with any model provider — including their own local models — without being locked into one vendor’s terminal tool.

Visit OpenCode Compare

Our verdict

OpenCode’s core pitch is real: it costs nothing to run, is genuinely open-source under MIT, and connects to essentially any model — 75+ cloud providers plus local Ollama — rather than betting on one vendor the way Claude Code or Cursor do.

A genuinely free, actively-shipped, model-agnostic agent with real open-source credibility, 187k+ stars and a release every few days, but its two early-2026 security advisories (both patched) and an unresolved memory-growth issue are worth reading before you adopt it for anything sensitive.

The Agents Index digest

New agents, fresh verdicts, and who's earning the top spots. One short email.

Screenshot of OpenCode
OpenCode, captured at verification, . Click to enlarge.

What's great

  • Genuinely free at the core and MIT-licensed — 188,976 GitHub stars, 23,868 forks, and a release shipped just 3 days before this listing was re-researched (v1.18.4, 2026-07-20), among the most active open-source coding agents by commit volume.
  • Model-agnostic by design: 75+ providers through Models.dev plus local Ollama models, with built-in login for GitHub Copilot and ChatGPT Plus/Pro so an existing subscription can drive it without a separate API key.
  • Two distinct ways to pay for hosted models without juggling separate providers’ billing — OpenCode Zen’s per-token marketplace or OpenCode Go’s flat $10/month subscription — while the core tool itself stays free either way.
  • A Hacker News commenter with roughly six months of daily use called it "much more stable" than Claude Code over that period, and a separate four-month daily user said the built-in feature set provides "just enough for a complete workflow" without needing plugins.

Watch-outs

  • Two GitHub Security Advisories were published against it on 2026-01-12 — one critical (an XSS in the web UI chainable into local command execution via the /pty/ endpoints) and one high-severity (an unauthenticated local HTTP server allowing arbitrary shell command execution). Both are patched (v1.1.10 and v1.0.216 respectively) and the current release is six months newer, but it is a real disclosed history worth knowing before exposing the local server on a shared network.
  • An open "Memory Megathread" GitHub issue tracking real, ongoing reports of the terminal UI’s memory growing past 1-2GB is still active as of this listing’s research date (119 comments, last updated the day before) — the maintainers are actively collecting heap snapshots, but it is not yet resolved.
  • A separate, unrelated project also called "opencode" (github.com/opencode-ai/opencode) is easy to confuse with this one — it has its own 13,000+ stars but has been archived and unmaintained since September 2025, so searching by name alone risks landing on the dead repo instead of the actively developed anomalyco/opencode.
  • OpenCode Go’s usage caps are tight for heavy daily use — $12 per 5-hour window, $30/week, $60/month — and the real request budget that buys varies enormously by model (roughly 31,650 requests per 5 hours on DeepSeek V4 Flash versus about 120 on Grok 4.5), so effective value depends heavily on which model you pick.

Also note: The web UI’s server-URL-override feature and local HTTP server have a real, disclosed 2026 security history (two now-patched advisories), running it on a shared or untrusted network needs care. · A currently open GitHub issue documents real, unresolved memory-growth reports in the terminal UI.

What is OpenCode?

OpenCode is an open source, MIT-licensed AI coding agent that runs in your terminal, a native desktop app, or a VS Code extension, connecting to any of 75+ LLM providers, including Claude, GPT, Gemini and local Ollama models, through a single tool. Development happens on GitHub under anomalyco/opencode (formerly sst/opencode), not the similarly-named opencode-ai/opencode repository, which is a separate, now-archived project that stopped shipping in September 2025. The core tool is free to run: supply your own provider API keys, or use one of two optional paid add-ons, OpenCode Zen or OpenCode Go.

What does OpenCode do?

Point OpenCode at a project and it reads the codebase, plans changes, edits files across a multi-file diff, and runs real shell commands, automatically loading the right Language Server Protocol integration for whatever languages it finds. Multiple agent sessions can run in parallel on the same project, and any session can be shared via a link for reference or debugging. Login support for GitHub Copilot and ChatGPT Plus/Pro accounts is built in, so a user with either subscription can drive the agent on models included there instead of a separate API key. Model choice is unrestricted beyond that: any of 75+ providers reachable through Models.dev, plus local models via Ollama, can be wired in through the /connect command, with credentials stored locally rather than passed through OpenCode’s own servers. For provider access without managing keys, OpenCode Zen offers a curated, pre-tested model marketplace billed per token, while OpenCode Go is a flat-rate subscription ($5 the first month, $10 a month after) with tiered usage caps. Custom agent skills, an MCP-server integration layer, and a Plan/Build-style workflow round out the tool for teams standardizing their own conventions on top of it.

Key features

  • Multi-provider model access: 75+ LLM providers via Models.dev plus local Ollama models, switchable per session with no code changes.
  • Multi-session + shareable links: Run several agent sessions in parallel on the same project, and share any session as a link for reference or debugging.
  • Zero-config LSP: Automatically loads the right Language Server Protocol integration for whatever languages the project uses, giving the agent real-time structural awareness.
  • Built-in subscription login: Log in with an existing GitHub Copilot or ChatGPT Plus/Pro account to drive the agent on models already included in that subscription.
  • MCP + custom skills: Connect external tools via the Model Context Protocol and package reusable agent behaviors as custom, shareable skills.

What are OpenCode's use cases?

  • BYOK terminal coding with an existing model subscription: A developer with a Claude or ChatGPT Plus subscription logs into OpenCode with that account and drives the agent from the terminal without paying for a second tool.
  • Multi-model comparison work: A team wants to compare how the same coding task performs across Claude, GPT and a local Ollama model, switching providers per session without changing tools.
  • Cost-capped hosted access without key management: A developer who does not want to manage individual provider API keys subscribes to OpenCode Go for flat-rate, capped access to a set of hosted open models.

What does OpenCode integrate with?

  • GitHub Copilot login (use an existing subscription)
  • ChatGPT Plus/Pro login (use an existing subscription)
  • 75+ LLM providers via Models.dev
  • Ollama (local models)
  • MCP servers (external tool connections)
  • VS Code extension

Why use OpenCode?

  • Genuinely free and open-source at the core (MIT licence), with no subscription required to start using it.
  • Works with essentially any model, 75+ cloud providers plus local Ollama models, instead of locking you into one vendor’s lineup.
  • Runs the same agent across terminal, desktop app and IDE extension, so you are not tied to one interface.
  • Very active development: a release roughly every few days and one of the largest open-source followings in the coding-agent category.

Pros & cons

Pros

  • Genuinely free at the core and MIT-licensed — 188,976 GitHub stars, 23,868 forks, and a release shipped just 3 days before this listing was re-researched (v1.18.4, 2026-07-20), among the most active open-source coding agents by commit volume.
  • Model-agnostic by design: 75+ providers through Models.dev plus local Ollama models, with built-in login for GitHub Copilot and ChatGPT Plus/Pro so an existing subscription can drive it without a separate API key.
  • Two distinct ways to pay for hosted models without juggling separate providers’ billing — OpenCode Zen’s per-token marketplace or OpenCode Go’s flat $10/month subscription — while the core tool itself stays free either way.
  • A Hacker News commenter with roughly six months of daily use called it "much more stable" than Claude Code over that period, and a separate four-month daily user said the built-in feature set provides "just enough for a complete workflow" without needing plugins.

Cons

  • Two GitHub Security Advisories were published against it on 2026-01-12 — one critical (an XSS in the web UI chainable into local command execution via the /pty/ endpoints) and one high-severity (an unauthenticated local HTTP server allowing arbitrary shell command execution). Both are patched (v1.1.10 and v1.0.216 respectively) and the current release is six months newer, but it is a real disclosed history worth knowing before exposing the local server on a shared network.
  • An open "Memory Megathread" GitHub issue tracking real, ongoing reports of the terminal UI’s memory growing past 1-2GB is still active as of this listing’s research date (119 comments, last updated the day before) — the maintainers are actively collecting heap snapshots, but it is not yet resolved.
  • A separate, unrelated project also called "opencode" (github.com/opencode-ai/opencode) is easy to confuse with this one — it has its own 13,000+ stars but has been archived and unmaintained since September 2025, so searching by name alone risks landing on the dead repo instead of the actively developed anomalyco/opencode.
  • OpenCode Go’s usage caps are tight for heavy daily use — $12 per 5-hour window, $30/week, $60/month — and the real request budget that buys varies enormously by model (roughly 31,650 requests per 5 hours on DeepSeek V4 Flash versus about 120 on Grok 4.5), so effective value depends heavily on which model you pick.

Limitations

  • The web UI’s server-URL-override feature and local HTTP server have a real, disclosed 2026 security history (two now-patched advisories), running it on a shared or untrusted network needs care.
  • A currently open GitHub issue documents real, unresolved memory-growth reports in the terminal UI.

OpenCode pricing

  • Free (BYOK)Free
  • OpenCode ZenPay-as-you-go / per token
  • OpenCode Go$5 / first month, then $10/month

See current pricing on opencode.ai ↗Compare OpenCode alternatives →

OpenCode specs

Pricing

Pricing model
freemium
Free tier
✓ Yes

Capabilities

Model / LLM
75+ providers via Models.dev (Claude, GPT, Gemini, local Ollama, etc.), plus OpenCode Zen/Go hosted options
Interface
CLI
Public API
✓ Yes
Open source
✓ Yes

Deployment

Deployment
Local

OpenCode review

OpenCode’s core pitch is real: it costs nothing to run, is genuinely open-source under MIT, and connects to essentially any model — 75+ cloud providers plus local Ollama — rather than betting on one vendor the way Claude Code or Cursor do. That flexibility, combined with a very fast release cadence (a new version roughly every few days) and a large, active GitHub community (188,976 stars as of this listing’s research date), makes it a credible pick for developers who already have a preferred model or subscription and do not want a second bill. The honest catches: its disclosed 2026-01-12 security history includes one critical and one high-severity advisory (both patched, but real), an open GitHub issue is still tracking real memory-growth complaints as of this listing’s research date, and a dead, similarly-named repository (opencode-ai/opencode) makes it easy to land on the wrong project by accident. Pick OpenCode if free, open-source and model flexibility matter more to you than a single polished vendor experience; pick Claude Code or Cursor instead if you would rather pay for one vendor’s managed reliability and support.

A genuinely free, actively-shipped, model-agnostic agent with real open-source credibility, 187k+ stars and a release every few days, but its two early-2026 security advisories (both patched) and an unresolved memory-growth issue are worth reading before you adopt it for anything sensitive.

Frequently asked questions

Is OpenCode free?
The core agent is free and open-source (MIT licence) — bring your own API key to any supported provider, including no-cost local models via Ollama. Two optional paid add-ons exist if you would rather not manage your own keys: OpenCode Zen (pay-as-you-go per token) and OpenCode Go ($5 the first month, then $10/month with usage caps).
Is opencode-ai/opencode the same project as OpenCode?
No. The actively developed project (187,000+ GitHub stars as of mid-2026, still shipping releases every few days) lives at github.com/anomalyco/opencode, the repo opencode.ai itself links to. github.com/opencode-ai/opencode is a separate, similarly-named repository that was archived and stopped receiving updates in September 2025 — do not confuse the two when searching.
Does OpenCode have any known security issues?
It has a disclosed history: two GitHub Security Advisories were published on 2026-01-12, a critical XSS-to-command-execution bug in the web UI and a high-severity unauthenticated local HTTP server issue. Both were patched (in v1.1.10 and v1.0.216) and the current release is several versions newer, but it is worth knowing before exposing OpenCode’s local server on a shared network.
What is the difference between OpenCode Zen and OpenCode Go?
Zen is a pay-as-you-go marketplace of pre-tested models billed per token (for example, Claude Sonnet 5 at $2 per 1M input tokens); Go is a flat-rate subscription ($5 the first month, $10/month after) to a set of hosted open models with fixed usage caps. Both are optional — you can also just bring your own API key to any of the 75+ supported providers for free.
Can OpenCode use local models?
Yes — it connects to Ollama for fully local model inference in addition to its 75+ cloud providers, and the vendor states OpenCode does not store your code or context data on its own servers regardless of which provider you use.

Get a quote from OpenCode

Tell us what you need. We make the introduction to OpenCode.

OpenCode

from Free

Visit ↗