OpenCode Review: The Open-Source AI Coding Agent
OpenCode is an open-source AI coding agent that connects to 75+ model providers and runs in your terminal, desktop, or IDE. This review covers features, pricing, and security.

OpenCode is an open-source AI coding agent that connects to 75+ model providers and runs in your terminal, desktop, or IDE. This review covers features, pricing, and security.

The name OpenCode has been appearing in a lot of AI coding conversations, and for good reason. It's an open-source agent that runs from your terminal and connects to whichever model provider you prefer — Anthropic, OpenAI, Google, Groq, a local Ollama instance, or any of more than 75 providers. The core idea is simple: the model behind your coding assistant should be a swappable component, not a product lock-in.
This review covers what it actually does, where it falls short, and why its security model is the thing you should understand before installing it.
At its core, it's an open-source AI coding agent available as a terminal interface, a desktop app, and an IDE extension. Instead of autocomplete-style suggestions, it works as an agentic workflow: you describe a task in a project and the agent reads files, plans the work, edits across files, runs commands and tests, and iterates on the result. The GitHub repository is MIT licensed, meaning anyone can read, fork, or extend the source.
The terminal is where this tool feels most natural. That's where it started, and it's still the primary interface. But the desktop app and IDE extension cover developers who prefer an editor or standalone window.
Under the hood it uses the AI SDK and Models.dev to connect providers. You can sign in with an existing GitHub Copilot or ChatGPT Plus/Pro account, point it at a local model through Ollama or llama.cpp, or connect an API key from Anthropic, OpenAI, Bedrock, Groq, or many others. There's no vendor lock-in by design.
This is a coding agent, not a text completer. Here's what it handles well:
@ key to fuzzy-search for it, and it answers with the whole project as context./undo and /redo commands revert or redo changes.Two features stand out in daily work. First, LSP integration — it's off by default, but once enabled the right language servers start automatically and feed live diagnostics back to the model. Second, share links: /share creates a link to any session so a teammate can review the conversation or help debug. Sessions aren't shared by default.
Multi-session support lets you run several agents in parallel on different parts of a project, and MCP servers let you connect external tools and services.
Budget a few minutes for first setup — this is where it differs most from a zero-configuration tool.
curl -fsSL https://opencode.ai/install | bash) or a package manager like npm, Homebrew, Arch, Chocolatey, or Scoop. On Windows, WSL is recommended for full feature compatibility./connect and pick a provider — OpenCode Zen for a curated starting point, an existing subscription like GitHub Copilot or ChatGPT Plus, or your own API key.opencode in your project directory, then /init to generate an AGENTS.md file the agent uses for structure and conventions.The day-to-day loop is mostly two modes. Plan mode produces a plan without touching files. Build mode makes the changes. For big features, plan first; for small ones, skip straight to building.
The strongest case for this agent is provider freedom. Few coding agents let you bring any model from any provider, run a local model, and still have a first-class agentic workflow. For teams that switch models or developers who want to spend on an existing subscription, that flexibility is the whole point.
Being open source is a real advantage. You can read the code, understand exactly what happens with your prompts, and contribute. The terminal experience is genuinely good — a proper TUI, responsive and keyboard-driven, with Plan/Build mode giving you a lightweight guardrail before changes hit disk.
The privacy posture is notable: the official site says the tool doesn't store your code or context data, and sessions aren't shared unless you explicitly run /share. For privacy-sensitive environments, that matters.
First, it's not zero-configuration. Between installing, choosing a provider, entering API keys, setting up a config file, and running /init, the path to first session is real work. If you want the least possible setup, this will feel like more than you bargained for.
Second, quality is model-dependent. The agent is only as capable as the model powering it. A frontier model through a good provider gives noticeably different results than a cheaper local one.
Third, costs are usage-based. The agent is free, but agentic coding burns tokens fast. Heavy sessions on paid frontier models add up. OpenCode Go ($10/month for open models with defined usage limits) and Zen pay-as-you-go with monthly caps offer ways to manage this, but you do have to think about it.
Fourth, and most important: it is not sandboxed. The official security documentation is explicit — more on that next.
"Free and open source" and "zero cost" aren't the same thing. The layers:
Zen pricing is per-token and changes by model, so check the official pricing page rather than relying on a snapshot number.
This is the question to ask before installing any coding agent. The answer from the official security documentation is direct and worth quoting: the tool "does not sandbox the agent." The permission system "exists as a UX feature to help users stay aware of what actions the agent is taking" and "is not designed to provide security isolation." If you need true isolation, run it in a Docker container or VM.
Each action gets allow, ask, or deny, configured in the config file globally, per tool, or per path. Defaults are permissive — most actions allow — with three key exceptions: external_directory (paths outside your project) defaults to ask, doom_loop (same tool call repeating) defaults to ask, and .env files are denied by default. Auto mode (--auto) removes the guardrail for trusted environments.
The agent runs with your user privileges. It can read and edit anything you can. Giving it access to a sensitive codebase is the same as giving any tool with your permissions that access — only point it at repositories you own or trust.
Keys added through /connect are stored locally in ~/.local/share/opencode/auth.json. MCP OAuth tokens go in ~/.local/share/opencode/mcp-auth.json. Treat those like any credential store: back them up when switching machines, don't share them, and review your config in secrets-heavy repos.
Each MCP server you add expands the actions and data the agent can reach. The official docs warn that servers add context tokens and recommend being selective. This isn't a claim that MCP is dangerous — it's a scope problem. The more surfaces you connect, the more you're trusting the agent to act safely across all of them. Keep the list short and enable only what you need.
The broader point in the security docs: LLM provider data handling is governed by that provider's policies, and external MCP servers sit outside the tool's trust boundary. "Safe" depends on your whole chain — the model, the servers, and the credentials — not just the agent.
One more layer: server mode is opt-in, and per the security docs it runs unauthenticated (with a warning, not a blocker) unless you set OPENCODE_SERVER_PASSWORD. Secure it before exposing it beyond your machine.
Claude Code is the closest relative — Anthropic's own terminal agent with a similar workflow. The difference: Claude Code is built around Claude models, while this tool is built around provider choice. If you're all-in on Anthropic, Claude Code is tighter; if you want flexibility, this wins by design.
Cursor is an agentic IDE with visual diffs and a familiar editor, making it more approachable for many developers. This tool is terminal-first with no visual editor — lighter, scriptable, and not locked to one editor, but less accessible if you want a GUI. If you prefer an editor-integrated agent, Cursor fits better.
GitHub Copilot is the enterprise default with governance, breadth, and deep GitHub integration. Interestingly, you can log in to this agent with your existing Copilot subscription rather than competing with it.
For a deeper understanding of MCP, see our guide to MCP servers. You can also browse the full AI coding tools category to compare more options.
The agent suits developers who:
Who should be cautious: developers wanting zero setup, teams needing strict blast-radius isolation (use Docker or a VM), and anyone who prefers visual diffs in an IDE — Cursor is the better fit there.
/connect and choose a provider./init.A final note that applies to any AI coding agent: treat its output as a draft. Review the diff, run your own tests, never approve what you don't understand. The agent is a very fast engineer on your team, not a substitute for your judgment.
What is OpenCode?
It's an open-source AI coding agent available as a terminal interface, desktop app, and IDE extension. You describe a task and it reads the codebase, edits files, runs commands and tests, and iterates until the job is done.
Is OpenCode open source?
Yes. The repository on GitHub is MIT licensed, so you can read the source, inspect how it works, fork it, and extend it yourself.
Is OpenCode free?
The tool itself is free and open source. You pay for the models you use — there are free models through OpenCode Zen, or you connect an existing provider or subscription with your own key. OpenCode Go is an optional $10/month subscription for open coding models.
Is OpenCode safe to use?
It is not sandboxed, according to its official security documentation. The permission system helps you review and approve actions, but it is a UX feature rather than a security-isolation boundary. Run it only on repositories you trust.
Can OpenCode use different AI models?
Yes. It supports 75+ LLM providers through Models.dev, including Anthropic, OpenAI, Google, Groq, Bedrock, and local models via Ollama or llama.cpp. You can also sign in with a GitHub Copilot or ChatGPT Plus/Pro account.
Does OpenCode work in the terminal?
Yes, the terminal is its primary interface, but it also ships as a desktop app and IDE extension so you aren't forced to live in the terminal full-time.
Is OpenCode an alternative to Claude Code?
The two are similar terminal-first agents, but OpenCode is designed around provider choice rather than being tied to one model family. Claude Code is built around Anthropic's models; this tool lets you swap providers freely.
Does OpenCode support MCP?
Yes, both local and remote MCP servers. Because each server expands what the agent can access, the official docs recommend being selective about which ones you enable.
Get our best AI tool reviews and guides delivered to your inbox each week. No spam, unsubscribe anytime.
Written by
Editorial Team
The AI Tools Vault editorial team researches, tests, and reviews the best AI tools across every category.
More reading on tool reviews
A practical DealSize.ai review: what the AI trading analysis assistant does, how its AI-Nalysis and ChartDS features work, what it costs, its limits, and who it is for.
Tool ReviewsAI chatbot aggregators let you use ChatGPT, Claude, Gemini, and more in one subscription. Here are the best multi-model platforms compared.
Tool ReviewsThe 10 best AI tools in 2026 you should be using — tested hands-on across chatbots, image, video, coding, and writing, with pricing and value verdicts.