# OpenCode — Open source AI coding agent for the terminal, desktop app and IDE, with 75+ model providers.

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

OpenCode is an open source AI coding agent that runs in a terminal interface, a desktop app or an IDE extension. It connects to any LLM provider, or to the vendor's own OpenCode Zen model gateway, and processes code locally.

| Fact | Value |
| --- | --- |
| Website | https://opencode.ai/ |
| Price | from $10/month |
| Free tier | Yes |

The agent itself is free and open source with no account needed. On the Zen gateway several models are priced Free for input, output and cached read, but the vendor states each is free 'for a limited time'. Enterprise features and per-seat support are not free.

## What it does

**Writes code** · Yes — Authors new features from a plain description, with a Plan mode first that proposes an approach before any file is written.

> You can ask OpenCode to add new features to your project. Though we first recommend asking it to create a plan.
> — https://opencode.ai/docs/ · Intro page, Usage section, 'Add features'

**Debugs and fixes** · Yes — Documented as fixing issues end to end in GitHub, working on a branch and submitting the change as a pull request.

> Fix and implement: Ask OpenCode to fix an issue or implement a feature. And it will work in a new branch and submits a PR with all the changes.
> — https://opencode.ai/docs/github/ · GitHub page, Features list

**Reviews code** · Yes — A GitHub workflow can trigger it on every pull request for automated review, and line comments pass it the diff context.

> Automatically trigger OpenCode when PRs are opened, synchronized, or reopened. Useful for automated reviews.
> — https://opencode.ai/docs/github/ · Supported Events table, pull_request row

**Whole-codebase work** · Partly — It loads language servers and has a read-only Explore subagent for whole-repo search, but the vendor never claims repository-wide migrations.

> A fast, read-only agent for exploring codebases. Cannot modify files. Use this when you need to quickly find files by patterns, search code for keywords, or answer questions about the codebase.
> — https://opencode.ai/docs/agents/ · Built-in agents, 'Use explore'

**Ships it** · Partly — It stops at a branch and pull request in your GitHub Actions runner; no deployment step is documented anywhere on the site.

> it will work in a new branch and submits a PR with all the changes
> — https://opencode.ai/docs/github/ · GitHub page, Features list, 'Fix and implement'

**Done-for-you service** · No — You run the software yourself; the only human engagement offered is an enterprise sales conversation about pricing and rollout, not delivery work.

> OpenCode is open source and does not store any of your code or context data, so your developers can simply get started and carry out a trial.
> — https://opencode.ai/docs/enterprise/ · Enterprise page, Trial section

_Not established: Writes tests_

## How much it does unattended

**Runs autonomously** · Partly — An --auto flag approves everything not explicitly denied, but the shipped default asks for approval on external directories and repeat loops.

> Start OpenCode with --auto to automatically approve permission requests that are not explicitly denied.
> — https://opencode.ai/docs/permissions/ · Permissions page, Auto mode section

**Multi-agent** · Yes — Primary agents delegate to subagents in child sessions, and the vendor recommends it explicitly for running work in parallel.

> A general-purpose agent for researching complex questions and executing multi-step tasks. Has full tool access (except todo), so it can make file changes when needed. Use this to run multiple units of work in parallel.
> — https://opencode.ai/docs/agents/ · Built-in agents, 'Use general'

**Agent permissions** · Yes — Every tool is gated by an allow/ask/deny rule, with glob-level rules per bash command or file path and per agent overrides.

> OpenCode uses the permission config to decide whether a given action should run automatically, prompt you, or be blocked.
> — https://opencode.ai/docs/permissions/ · Permissions page, opening paragraph

## Which models it runs on

**Claude** · Yes — Anthropic is a first-class provider, and the vendor's own Zen gateway serves several Claude models with published per-token prices.

> Once you've signed up, run the /connect command and select Anthropic.
> — https://opencode.ai/docs/providers/ · Directory, Anthropic section

**GPT** · Yes — GPT models are listed on the Zen gateway endpoint table with their own model IDs, alongside direct OpenAI and Azure provider support.

> Free models included or connect any model from any provider, including Claude, GPT, Gemini and more.
> — https://opencode.ai/ · Homepage hero, sub-headline

**Open models** · Yes — Open-weight families such as Qwen, DeepSeek, GLM and Kimi are served through Zen, and local OpenAI-compatible servers can be configured.

> OpenCode uses the AI SDK and Models.dev to support 75+ LLM providers and it supports running local models.
> — https://opencode.ai/docs/providers/ · Providers page, opening paragraph

**Model choice** · Yes — You choose the provider and model, per agent if you want, and the vendor's own gateway is stated to be optional.

> Zen works like any other provider in OpenCode. You login to OpenCode Zen and get your API key. It's completely optional and you don't need to use it to use OpenCode.
> — https://opencode.ai/docs/zen/ · Zen docs, opening paragraph

## Where you use it

**In your editor** · Yes — A VS Code family extension installs itself on first run and adds selection sharing plus file-reference shortcuts.

> OpenCode integrates with VS Code, Cursor, or any IDE that supports a terminal. Just run opencode in the terminal to get started.
> — https://opencode.ai/docs/ide/ · IDE page, opening paragraph

**On the command line** · Yes — The terminal is the primary surface: a TUI by default, plus scriptable subcommands for one-shot runs and server mode.

> The OpenCode CLI by default starts the TUI when run without any arguments.
> — https://opencode.ai/docs/cli/ · CLI page, opening paragraph

**In your pipeline** · Yes — It runs inside your own GitHub Actions runner, triggered by comments, PR events, cron schedules or manual dispatch.

> OpenCode integrates with your GitHub workflow. Mention /opencode or /oc in your comment, and OpenCode will execute tasks within your GitHub Actions runner.
> — https://opencode.ai/docs/github/ · GitHub page, opening paragraph

**In a browser** · Partly — There is a browser interface, but it is a local server you start yourself rather than a hosted product you log into.

> OpenCode can run as a web application in your browser, providing the same powerful AI coding experience without needing a terminal.
> — https://opencode.ai/docs/web/ · Web page, opening paragraph

## Whose machine it runs on

**Self-hosted** · Yes — The agent runs on your own machine or server and can be pointed exclusively at an internal AI gateway with other providers disabled.

> OpenCode does not store your code or context data. All processing happens locally or through direct API calls to your AI provider.
> — https://opencode.ai/docs/enterprise/ · Enterprise page, Data handling section

**Open source** · Yes — The vendor states it plainly on the enterprise page and publishes the repository, releases and a container image publicly.

> OpenCode is open source and does not store any of your code or context data, so your developers can simply get started and carry out a trial.
> — https://opencode.ai/docs/enterprise/ · Enterprise page, Trial section

## What it costs to run

**How it meters** · Partly — The agent itself is free; inference on the vendor's Zen gateway is metered per token, while the enterprise offer is priced per seat instead.

> We support a pay-as-you-go model. Below are the prices per 1M tokens.
> — https://opencode.ai/docs/zen/ · Zen docs, Pricing section heading

**Free tier** · Yes — The software installs and runs without any purchase, and several gateway models are priced at zero for input and output.

> Free models included or connect any model from any provider, including Claude, GPT, Gemini and more.
> — https://opencode.ai/ · Homepage hero, sub-headline

**API access** · Yes — A headless HTTP server exposes sessions, messages and tools behind an OpenAPI 3.1 spec used to generate its own SDK.

> The opencode serve command runs a headless HTTP server that exposes an OpenAPI endpoint that an opencode client can use.
> — https://opencode.ai/docs/server/ · Server page, opening paragraph

**MCP server** · Partly — It consumes local and remote MCP servers as a client, but the vendor documents no MCP server of its own for other agents to query.

> You can add external tools to OpenCode using the Model Context Protocol, or MCP. OpenCode supports both local and remote servers.
> — https://opencode.ai/docs/mcp-servers/ · MCP servers page, opening paragraph

**Bring your own key** · Yes — You supply provider API keys yourself, stored locally, and can keep using your own OpenAI or Anthropic keys even inside the Zen workspace.

> You can use your own OpenAI or Anthropic API keys while still accessing other models in Zen. When you use your own keys, tokens are billed directly by the provider, not by Zen.
> — https://opencode.ai/docs/zen/ · For Teams, 'Bring your own key'

## Buying it for a team

**A company can buy it** · Yes — An organisation can buy an enterprise seat arrangement, and Zen workspaces let a team be invited and billed together.

> We use a per-seat model for OpenCode Enterprise. If you have your own LLM gateway, we do not charge for tokens used.
> — https://opencode.ai/docs/enterprise/ · Enterprise page, Pricing section

**Seat model** · Partly — Per-seat pricing is confirmed but the seat rate is quote-only, and no seat floor or ceiling is published.

> We offer per-seat enterprise pricing. If you have your own LLM gateway, we do not charge for tokens used.
> — https://opencode.ai/enterprise · FAQ, answer to "How does enterprise pricing work?"

**Pooled budget** · Yes — A Zen workspace shares one balance, with a workspace-wide monthly ceiling and separate per-member limits set by an admin.

> You can also set a monthly usage limit for the entire workspace and for each member of your team.
> — https://opencode.ai/docs/zen/ · Zen docs, Monthly limits section

**Admin controls** · Yes — Config-level permission rules constrain tools and paths, and an enterprise central config can force one gateway and disable other providers.

> With the central config, OpenCode can also be configured to use only your internal AI gateway. You can also disable all other AI providers, ensuring all requests go through your organization's approved infrastructure.
> — https://opencode.ai/docs/enterprise/ · Enterprise page, Internal AI gateway section

**Single sign-on** · Partly — SSO is offered only through the enterprise central config, arranged by contacting sales, and no SAML or OIDC protocol is named.

> Through the central config, OpenCode can integrate with your organization's SSO provider for authentication.
> — https://opencode.ai/docs/enterprise/ · Enterprise page, SSO integration section

_Not established: Audit log_

## What happens to your code

**Opt out of training** · Partly — Zen providers are zero-retention and non-training by default, but named free and contributor models explicitly use your data to improve models.

> Our providers follow a zero-retention policy and do not use your data for model training, with the following exceptions:
> — https://opencode.ai/docs/zen/ · Zen docs, Privacy section

**Data residency** · Partly — Zen inference is stated to be US-hosted only; for other providers residency is whatever your own provider or internal gateway gives you.

> All our models are hosted in the US.
> — https://opencode.ai/docs/zen/ · Zen docs, Privacy section, first line

**Getting out** · Partly — Sessions and code stay on your own disk and the vendor disclaims ownership, but nothing is published about expiry of unused Zen balance.

> You own all code produced by OpenCode. There are no licensing restrictions or ownership claims.
> — https://opencode.ai/docs/enterprise/ · Enterprise page, Code ownership section

**Certifications** · Partly — A SOC 2 Type 2 report is available under NDA through the Trust Center, whose framework list shows SOC 2 Type 1 and Type 2 only.

> Our Trust Center has everything: SOC 2 Type 2 report, security policies, subprocessor list, and answers to common security questions.
> — https://opencode.ai/enterprise · FAQ, answer to "Where can I find your security and compliance documentation?"

## Platform record (as of 2026-08-30)

Reported by the code-hosting platform, not by the vendor.

| Fact | Value |
| --- | --- |
| Licence | MIT |
| Stars | 202501 |
| Forks | 26324 |
| Last push | 2026-08-30 |

## Provenance

1 of 29 sources behind the facts above are independent of the vendor.

## Coverage elsewhere

None recorded. Every fact above comes from the vendor and is not independently corroborated yet.

## What changed

- 2026-09-21 — Capabilities · Commercial terms · Free tier · Price
- 2026-09-02 — Capabilities · Commercial terms · Free tier
- 2026-08-31 — Capabilities · Commercial terms · Free tier · Price
- 2026-08-22 — Alternatives · One-liner · Repository · Summary

## Correcting this record

Anything marked "Not established" is a question we have not answered — it is not a No. If you represent OpenCode, or anything here is wrong or out of date, you can supply it with a source: the operations this site accepts from an agent are listed at https://theagentsindex.com/.well-known/agents.json — that catalogue needs no key to read, and each entry states its own auth.

Supplying evidence is free. Nothing that can be bought here changes what a field says, whether a gap is closed, or how this record is scored.
