# 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.

> Source: The Agents Index — https://theagentsindex.com/opencode (structured, researched, re-verified)
> Facts last verified: 2026-07-23

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.

| Fact | Value |
| --- | --- |
| Website | https://opencode.ai/ |
| API | Yes |
| Best for | Developers 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. |
| Not for | Teams that want a single vendor’s fully-managed, zero-setup hosted service with a traditional support contract, or anyone who needs to run OpenCode’s local server on a shared or untrusted network without extra hardening given its disclosed 2026 security history. |

## 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. 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.

## Strengths and weaknesses

- ✓ 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.
- ✗ 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.
- ⚠ 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.

## 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.

## 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.

## Integrations

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

## Sources

- https://opencode.ai/
- https://opencode.ai/docs/
- https://opencode.ai/docs/go/
- https://opencode.ai/docs/zen/
- https://opencode.ai/docs/providers/
- https://github.com/anomalyco/opencode
- https://github.com/anomalyco/opencode/security-advisories
- https://github.com/anomalyco/opencode/issues/20695
- https://github.com/opencode-ai/opencode
- https://news.ycombinator.com/item?id=47460525
