This article was originally published on aicoderscope.com
After Roo Code shut down in May, the "best free open-source AI coding agent" search took off again — and three names keep surfacing: Kilo Code, OpenCode, and Cline. All three are open source. All three cost $0 for the tool itself; you pay only for model tokens, or nothing at all if you point them at a local model. None of them locks you into one provider.
So the choice isn't about money. It's about where you want the agent to live — your editor or your terminal — and which one has the least friction for the thing you actually do all day.
TL;DR: All three are free and bring-your-own-key. Cline is the safest in-editor pick (battle-tested, MCP ecosystem, step-by-step approval). OpenCode is the terminal power-user's agent (180K stars, 75+ providers, cleanest local path). Kilo Code is the VS Code agent for people who want automatic model routing across 500+ models without leaving the sidebar.
| Kilo Code | OpenCode | Cline | |
|---|---|---|---|
| Surface | VS Code + JetBrains + CLI | Terminal (TUI) + desktop beta | VS Code + JetBrains + Cursor/Windsurf + CLI |
| License | MIT | MIT | Apache 2.0 |
| GitHub stars (Jun 2026) | ~25K | ~180K | ~64K |
| Base cost | $0 (BYOK) | $0 (BYOK) | $0 (BYOK) |
| Models / providers | 500+ via Kilo Gateway | 75+ providers | Anthropic, OpenAI, Google, OpenRouter 200+, local |
| Local LLM (Ollama/LM Studio) | Yes, OpenAI-compatible | Yes, native ollama launch
|
Yes, first-class |
| Standout feature | Auto Model routing + Orchestrator | Daily releases, terminal-native | Plan/Act + MCP marketplace |
| The catch | Routing quality depends on task detection | Fewer local how-tos than Cline | No auto model selection |
Honest take: For most developers who live in VS Code, install Cline — it's the most stable, has the deepest tutorial ecosystem, and its step-by-step approval keeps you in control. Reach for OpenCode if you work in the terminal or want the cleanest local-Ollama setup. Pick Kilo Code if you want intelligent per-task model routing inside your editor and don't mind a younger codebase.
The architectural split that decides everything
These three tools answer the same job — read your code, edit files, run commands — from three different seats.
Cline lives in your editor sidebar. It runs as a VS Code extension, a JetBrains plugin, and inside Cursor and Windsurf, plus a CLI. The defining trait is its approval loop: every file edit and terminal command surfaces for your sign-off before it runs, via Plan mode (explore and strategize) and Act mode (execute). That makes it the natural fit for teams that need an audit trail. The Cline review covers the approval cadence in detail.
OpenCode lives in your terminal. It's a TUI agent (a desktop app is in beta) with two built-in agents: a build agent with full access and a read-only plan agent. It has no sidebar — you drive it from the command line, which is exactly what terminal-first developers want and exactly what GUI-first developers will bounce off. The OpenCode review goes deeper on the TUI workflow.
Kilo Code also lives in VS Code (and JetBrains, and a CLI), so on the surface it looks like a Cline competitor. The difference is what happens under the hood: Kilo routes each subtask to a different model automatically, and its Orchestrator mode can break a big task into pieces handled by separate sub-agents.
That seat — editor vs terminal — cascades into everything else: how you invoke the agent, how local models plug in, and who each one is actually for.
Lineage: they're more related than they look
This matters because it explains why the feature sets overlap so heavily. The family tree:
- Cline (originally "Claude Dev") is the upstream project, started mid-2024.
- Roo Code forked Cline, then went its own way before shutting down in May 2026.
- Kilo Code forked Roo Code in 2025 — explicitly to merge the best of Cline and Roo Code into one polished extension. It was co-founded by GitLab co-founder Sid Sijbrandij and raised $8M in seed funding.
- The newer Kilo CLI is a separate fork of OpenCode. (Yes — Kilo's editor side descends from Cline, and its terminal side descends from OpenCode.)
So if Cline's Plan/Act and Kilo's modes feel similar, that's because they share DNA. The differentiation is in what each team built after the fork.
Local LLM: the path that actually matters
For a lot of readers the real question is "which one runs a local model with the least pain?" All three support Ollama, LM Studio, and any OpenAI-compatible endpoint. The difference is how much typing — and how many community guides — stand between you and a working setup.
OpenCode has the cleanest path. Ollama ships a launcher that wires an inline config for you:
$ ollama launch opencode
# starts OpenCode pre-configured with the selected Ollama model
If you'd rather configure it by hand, point a provider at the local server's OpenAI-compatible endpoint:
// opencode.jsonc
{
"provider": {
"ollama": {
"options": { "baseURL": "http://localhost:11434/v1" }
}
}
}
The /v1 suffix is not optional — drop it and OpenCode won't speak the OpenAI-compatible protocol Ollama exposes. Our OpenCode + Ollama guide walks through the full setup and the file-write bug to watch for.
Cline has the most community how-tos and a first-class local picker. In the settings panel you select Ollama or LM Studio, enter the base URL, and pick a model — no JSON editing required. The catch is the context window: Ollama defaults to a small num_ctx, and a coding agent that silently truncates your project context produces confident garbage. Our Cline + LM Studio setup covers the 32K-context trap, and the privacy-first Cline build covers the fully-offline workflow.
Kilo Code supports local models through the same BYOK mechanism — add an OpenAI-compatible provider pointed at http://localhost:11434/v1 and select it. Its twist is Auto Model routing: in principle you can route cheap planning to a local model and expensive coding to a cloud one, balancing cost against capability. In practice that only helps if its task-type detection is accurate (more on that below).
Whichever you pick, the hardware floor is the same. A 7B–14B coding model at Q4 needs roughly 8–16GB of VRAM to be useful; jumping to 32B-class models for genuinely agentic work wants 24GB+. See the runaihome.com local-LLM hardware guide for the VRAM-by-model breakdown before you buy a GPU.
Kilo Code's Auto Model routing — the headline feature
This is what Kilo bets its differentiation on. Auto Model is a routing system that picks the underlying model per request based on the task type — planning, coding, debugging, explanation — and a configured budget tier. The pitch is real: a planning step doesn't need a $50/M-token frontier model, and routing it to something cheaper saves money without hurting the result.
The honest caveat: routing quality is only as good as the task-type detection. When it misfires — sending a gnarly multi-file refactor to a fast-but-shallow model because it read the prompt as "simple" — you get a worse result and have to re-run on a stronger model anyway, which costs more than if you'd just picked the model yourself. It's a genuine convenience when it works, and a silent tax when it doesn't. Kilo's Orchestrator mode (breaking a task across sub-agents) compounds both the upside and the risk.
Kilo connects to 500+ models through its Kilo Gateway at provider pricing with zero markup, and BYOK works through any OpenAI-compatible endpoint, so you're never locked into the gateway.
Top comments (0)