# OpenCode vs Kilo Code

_Kilo Code's CLI is a fork of OpenCode, so the two share a config format. Kilo adds editor extensions, an optional sandbox and stricter defaults. OpenCode stays terminal first._

OpenCode and Kilo Code are MIT-licensed [coding agents](/learn/concepts/ai-engineering/coding-agents) that run almost any model. OpenCode is Anomaly's terminal agent with a desktop app in beta. Kilo Code runs in VS Code, JetBrains IDEs, the terminal and the cloud. Its CLI is a fork of OpenCode, and in April 2026 its VS Code extension was rebuilt on one open source core shared with the CLI 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 | Kilo Code |
| --- | --- | --- |
| License | MIT | MIT |
| Where it runs | Terminal UI, plus a desktop app in beta | VS Code, JetBrains IDEs, the `kilo` CLI and Cloud Agents |
| Price | Free. Optional OpenCode Go at $10 per month | Free. Optional Kilo Pass from $19 per month, Teams at $15 per user per month |
| Default permissions | Allows every action except reading `.env` files | Allows most actions. Asks for `.env` reads and files outside the project |
| OS sandbox | None | Optional, off by default, on macOS and Linux |
| Best for | Terminal users who want the upstream project | Teams who want the same agent in the editor, terminal and cloud |

## At a Glance

| | OpenCode | Kilo Code |
| --- | --- | --- |
| Models | Any provider in the models.dev catalog, local models through Ollama, LM Studio or vLLM | 500+ models through Kilo Gateway, your own keys, or local models |
| Subscriptions | OpenCode Go $10, Go Plus $40 per month. ChatGPT, GitHub Copilot and Claude plan sign-in | Kilo Pass Starter $19, Pro $49, Expert $199 per month, paid out as usage credits |
| Permissions | Ordered `allow`, `ask` and `deny` rules per action and resource | Allow, Ask or Deny per tool, plus a shield toggle that approves pending prompts |
| Built-in agents | `build`, read-only `plan`, `general` subagent | Code, Plan, Ask and Debug, plus custom agents |
| Project instructions | `AGENTS.md`, falling back to `CLAUDE.md` | `AGENTS.md`, plus files listed under `instructions` |
| Undo | Your own git history | Git-based snapshots before and after agent edits |
| Parallel work | One session per checkout | Agent Manager runs several agents side by side |
| Headless and CI | `opencode run` | `kilo run`, with `--auto` to skip prompts |

## The Fork Relationship

Kilo's docs say the CLI "is a fork of OpenCode" and supports the same configuration options. Its license file carries both a 2026 Kilo Code copyright and a 2025 opencode copyright. If you already have an OpenCode setup, most of it carries over to the Kilo CLI.

Kilo then builds on that core. The same engine runs its VS Code extension, its JetBrains plugin and its Cloud Agents. The VS Code extension adds an Agent Manager for running several agents side by side and a diff reviewer that shows changes file by file.

## Models and Cost

Neither project charges for the agent. OpenCode signs 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.

Kilo Gateway bills model usage at the provider's rate with no markup, and Kilo adds a 5% processing fee when you buy credits. Kilo Pass prepays credits with a bonus: Starter costs $19 and gives up to $26.60 in credits per month. You can also bring your own keys or run local models at no charge from Kilo. Kilo's Teams plan costs $15 per user per month, and cloud agents bill compute per second on top of model usage.

## Permissions and Sandboxing

The defaults are close, since Kilo started from OpenCode. Both allow most tools and ask before reading `.env` files. OpenCode lets the agent read and edit outside the project without a prompt. Kilo asks before it touches files outside the project, and it asks before edits in the JetBrains plugin. Kilo also prompts when the agent repeats the same failing step, which it calls a doom loop.

Kilo adds an optional OS sandbox that OpenCode lacks. It uses Seatbelt on macOS and Bubblewrap on Linux, and it is not available on Windows. When you turn it on with `sandbox.enabled`, it limits where commands can write and denies network access unless a host is on `sandbox.allowed_hosts`. OpenCode's docs warn that shell commands run with your user's full filesystem, process and network access.

## When to Pick Which

- **Pick OpenCode** if you work in the terminal, want the upstream project, or want to sign in with a ChatGPT, Copilot or Claude plan.
- **Pick Kilo Code** if you want one agent across VS Code, JetBrains and the terminal, an optional sandbox, or a team plan with shared billing.
- **Pick both** if you share config. Kilo's CLI reads the same configuration options as OpenCode.

## Alternatives

- **Cline:** an Apache 2.0 agent for VS Code, JetBrains and the terminal that asks before each step. See [OpenCode vs Cline](./opencode-vs-cline.mdx) and [Cline vs Kilo Code](./cline-vs-kilo-code.mdx).
- **Goose:** an Apache 2.0 agent with a desktop app first. See [OpenCode vs Goose](./opencode-vs-goose.mdx).
- **Roo Code:** shut down on May 15, 2026. See [Roo Code vs Kilo Code](./roo-code-vs-kilo-code.mdx) and [OpenCode vs Roo Code](./opencode-vs-roo-code.mdx) for its replacements.

## Running Several Agents at Once

Kilo's Agent Manager runs agents side by side in the editor. OpenCode runs one session per checkout, so give each session its own [git worktree](/learn/concepts/git/git-worktrees). Treq runs either agent in an isolated [workspace](/docs/concepts/workspaces) and stacks dependent changes for review.

## 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/), [CLI](https://opencode.ai/docs/cli/)
- [Kilo Code repository](https://github.com/Kilo-Org/kilocode), [Kilo license](https://github.com/Kilo-Org/kilocode/blob/main/LICENSE), [Kilo pricing](https://kilo.ai/pricing), [Kilo CLI](https://kilo.ai/docs/code-with-ai/platforms/cli), [Auto-approving actions](https://kilo.ai/docs/getting-started/settings/auto-approving-actions), [Sandboxing](https://kilo.ai/docs/getting-started/settings/sandboxing), [What's new in VS Code](https://kilo.ai/docs/code-with-ai/platforms/vscode/whats-new)

## Next Steps

- [OpenCode Alternatives](./opencode-alternatives.mdx): other agents and their safety defaults
- [Best Coding Agent CLIs](./best-coding-agent-clis.mdx): every current terminal agent in one table
- [Sandbox Providers for Coding Agents](./sandbox-providers-for-coding-agents.mdx): cloud machines for unattended agents
