# OpenCode vs Cline

_Both are free, open source agents that run almost any model. OpenCode is a terminal agent that allows every action by default. Cline started in the editor and asks before it acts._

OpenCode and Cline are [coding agents](/learn/concepts/ai-engineering/coding-agents) that you pay nothing for. You bring a model provider, or buy a flat subscription from either project. OpenCode is an MIT-licensed terminal agent from Anomaly with a desktop app in beta. Cline is an Apache 2.0 agent that started as a VS Code extension and now also ships a CLI, a desktop app, a JetBrains plugin and cloud agents. Facts on this page were checked against each tool's own docs, pricing page and repository as of December 4, 2026.

## Decision Table

| | OpenCode | Cline |
| --- | --- | --- |
| License | MIT | Apache 2.0 |
| Price | Free. Optional OpenCode Go at $10 per month | Free. Optional ClinePass at $9.99 per month |
| Where it runs | Terminal UI first, plus a desktop app in beta | Editor first, in VS Code, Cursor, Windsurf, JetBrains IDEs and Zed, plus a CLI and a desktop app |
| Default approvals | Allows every action except reading `.env` files | The extension asks before each edit and command until you turn on Auto Approve |
| Undo | Your own git history | Checkpoints in a shadow git repository after each tool use |
| Best for | Terminal users who want few prompts | Editor users who want to approve each step |

## At a Glance

| | OpenCode | Cline |
| --- | --- | --- |
| Models | Any provider in the models.dev catalog, ChatGPT, GitHub Copilot and Claude plan sign-in, local models through Ollama, LM Studio or vLLM | Anthropic, OpenAI, Google, OpenRouter, Bedrock, Vertex and others, any OpenAI-compatible API, local models through Ollama or LM Studio |
| Subscriptions | OpenCode Go $10, Go Plus $40 per month | ClinePass $9.99 per month, or pay-as-you-go Cline credits |
| Permissions | Ordered `allow`, `ask` and `deny` rules per action and resource | Auto Approve toggles per action type, and a YOLO mode that approves everything |
| OS sandbox | None | None documented for local runs |
| Built-in modes | `build` agent, read-only `plan` agent, `general` subagent | Plan and Act modes |
| Project instructions | `AGENTS.md`, falling back to `CLAUDE.md` | `.clinerules/`, `AGENTS.md`, `.cursorrules`, `.windsurfrules` |
| Extensions | Skills, plugins, MCP servers | Skills, plugins, hooks, subagents, MCP servers |
| Headless and CI | `opencode run` | `cline --json`, piped input |
| Parallel work | One session per checkout | Kanban board with a worktree per card |

## Models and Cost

Neither project charges for the agent. With your own key, the bill depends on the model and how many tokens each task uses.

OpenCode reads its provider list from models.dev. It can also sign in with a ChatGPT Plus or Pro plan, a GitHub Copilot account, or a Claude plan through a local Claude Code login. OpenCode Go costs $10 per month for a curated list of models tested for agentic coding, such as Kimi K3, GLM-5.4 and DeepSeek V4 Pro. Go Plus raises the limits for $40.

Cline offers pay-as-you-go credits, ClinePass at $9.99 per month for open coding models such as DeepSeek V4 Pro, GLM 5.3 and Kimi K3, or your own key. It can also run on a Claude Pro or Max plan through the Claude Code provider, or on an OpenAI plan through Codex sign-in. [Best Open-Weight Coding Models](./best-open-weight-coding-models.mdx) covers the open models both subscriptions sell.

## Approvals and Undo

The defaults point in opposite directions. OpenCode's base policy allows every action, including edits and shell commands outside the project. Only reading `.env` files asks first. Its docs warn that shell commands run with your user's filesystem, process and network access.

The Cline extension asks before each file edit and terminal command until you turn on Auto Approve. Its docs recommend starting with only Read project files. The Cline CLI is different: its `--auto-approve` flag defaults to `true`, so check it before you script Cline.

Cline's checkpoints are its safety net. After each tool use, Cline saves your files to a shadow git repository, separate from your real history. You can restore the files, the conversation, or both. OpenCode leaves undo to your own commits, so commit before long runs.

## When to Pick Which

- **Pick OpenCode** if you work in the terminal or over SSH, want fine-grained `deny` and `ask` rules, or already have skills in `.claude/skills`.
- **Pick Cline** if you want the agent in your editor panel, approval before each step, or checkpoints that undo one step at a time.
- **Pick both** if you share one `AGENTS.md`. Both read it, so one repository serves either agent.

## Alternatives

- **Claude Code:** Anthropic's agent for Claude models. See [OpenCode vs Claude Code](./opencode-vs-claude-code.mdx) and [Claude Code vs Cline](./claude-code-vs-cline.mdx).
- **Codex:** OpenAI's Apache 2.0 agent with a sandbox on by default. See [Codex vs OpenCode](./codex-vs-opencode.mdx) and [Codex vs Cline](./codex-vs-cline.mdx).
- **Roo Code:** a Cline fork that shut down on May 15, 2026. See [Cline vs Roo Code](./cline-vs-roo-code.mdx).

## Running Several Agents at Once

Cline's Kanban board gives each card its own [git worktree](/learn/concepts/git/git-worktrees). OpenCode runs one session per checkout, so you create the worktrees yourself. Treq runs either agent in an isolated [workspace](/docs/concepts/workspaces) and lets you review the results side by side.

## Sources

Checked December 4, 2026:

- [OpenCode repository](https://github.com/anomalyco/opencode), [OpenCode Go](https://opencode.ai/go), [Providers](https://opencode.ai/docs/providers/), [Permissions](https://opencode.ai/docs/permissions/), [Instructions](https://opencode.ai/docs/instructions/), [Skills](https://opencode.ai/docs/skills/), [CLI](https://opencode.ai/docs/cli/)
- [Cline repository](https://github.com/cline/cline), [Cline overview](https://docs.cline.bot/cline-overview), [ClinePass](https://docs.cline.bot/getting-started/clinepass), [Auto Approve](https://docs.cline.bot/features/auto-approve), [Checkpoints](https://docs.cline.bot/core-workflows/checkpoints), [Rules](https://docs.cline.bot/customization/cline-rules), [CLI overview](https://docs.cline.bot/usage/cli-overview), [Claude Code provider](https://docs.cline.bot/provider-config/anthropic), [OpenAI Codex provider](https://docs.cline.bot/provider-config/openai)

## Next Steps

- [Best Coding Agent CLIs](./best-coding-agent-clis.mdx): every current terminal agent in one table
- [OpenCode Alternatives](./opencode-alternatives.mdx): other agents and their safety defaults
- [Parallel Coding Agents](/learn/parallel-coding-agents): why agents need separate workspaces
