Running a coding agent with nothing leaving the machine.
The runtime is easy and the agent is easy. The model is where expectations need managing.
A local setup has three parts. A runtime, usually Ollama, which serves models on an OpenAI-compatible endpoint. A model sized to your hardware, which is the part that decides whether the experience is useful. And an agent that can be pointed at a local endpoint rather than a vendor: Cline, OpenCode and Lucid Train's bundled engine all can, while vendor CLIs such as Claude Code, Codex and Gemini CLI by design talk to their own vendor. The honest constraint is that local models lag frontier models on long agentic tasks, and the gap is largest exactly where agents are most useful.
How to read this
There is no ranking here and no winner, because the honest answer depends on constraints this page cannot see: whether your code may leave the machine, whether anyone will maintain what you write, and whether the diagram has to be reviewed in a pull request. Each entry says what it actually does and when to pick it.
Matching the model to your hardware
Memory decides this more than anything else. Small models in the 4B to 8B range run comfortably on a laptop and are genuinely useful for focused edits, explaining code and routine refactors. Larger local models need a workstation and improve multi-step reasoning noticeably. Below about 4B the model is fine for smoke tests and not for real work, which is worth knowing before concluding that local models do not work.
Which agents can point at a local endpoint
Cline supports Ollama and any OpenAI-compatible API. OpenCode is provider-agnostic. Lucid Train's bundled engine takes an Ollama endpoint or any OpenAI-compatible URL, with no key and no telemetry. Vendor CLIs cannot: driving Claude Code as an engine means talking to Anthropic, which is the point of it, so a genuinely offline setup means the bundled engine rather than a CLI engine.
A split that works well
Nothing forces one model for everything. Where an agent supports routing roles separately, a small local model handles planning and summarising while a stronger model handles the actual diff. That keeps most tokens local and spends only where it changes the output, which is a better cost curve than either extreme.
When local is the only option
Air-gapped environments, regulated industries, and code under an agreement that forbids third-party processing. In those cases the question is not whether local models are as good but what is achievable within the constraint, and the answer is a great deal more than it was a year ago.
When this was checked
Every fact on this page was checked against the vendor's own site or repository on 22 August 2026. Prices and features change without notice, and a roundup is only as good as its last check, so verify anything you are about to make a decision on.
What runs where
| Agent | Local endpoint | Fully offline |
|---|---|---|
| Cline | Ollama, OpenAI-compatible | Yes |
| OpenCode | Provider-agnostic | Yes |
| Lucid Train bundled engine | Ollama, OpenAI-compatible | Yes |
| Claude Code / Codex / Gemini CLI | No | No |
Questions
Related
- Which Architecture Diagram Tool Should You Use?Four approaches, each with a different failure mode. Pick by which failure you can live with.
- Which Diagramming MCP Server Should You Use?The differentiator is not the vendor. It is whether a language model is being asked to do geometry.
- Which Coding Agent for a Large Unfamiliar Codebase?Model quality is table stakes. What separates agents on a big repo is context, review and isolation.
- Which AI Code Security Scanner Should You Use?Three categories, three different blind spots. Most confusion here is a category error rather than a tool choice.
Last updated