Open CLIs + local models: the fully sovereign coding stack
For the first time, the entire coding-agent stack fits on your desk: an open-source harness, an open-weight coder model, and a local server to run it. No tokens leave the machine, no metered bill, no vendor deciding when your model retires. I have run variants of this stack all year. It works. The question is what it's honestly for.
The components are commodity now. Aider, OpenCode, and Goose all talk to OpenAI-compatible endpoints, and Ollama and llama.cpp both serve one. What isn't commodity is knowing where the ceiling sits.
Assembling the stack
The wiring takes minutes. Aider speaks to Ollama directly: name the model, point at the endpoint, go. OpenCode takes any base URL that speaks the standard API, which llama.cpp's server exposes out of the box. Goose adds MCP-native tooling on top, so a local model gets the same extension ecosystem the frontier ones enjoy.
ollama serve
aider --model ollama_chat/your-coder-model
One gotcha deserves bold type: context window defaults. Local servers often ship with small default context settings, and an agent harness will happily stuff a repo map and ten files into a window the server silently truncates. The symptom is an agent that forgets the file it just read; the cause is configuration, not the model. Set the context length explicitly before you judge anything. My Ollama field notes cover the specifics.
What genuinely works in 2026
- Bounded edits. Single-file changes, small well-described refactors, mechanical API migrations. Give a local coder model a tight brief and a narrow blast radius and it delivers.
- Review and explanation. Summarizing a diff, spotting the obvious bug, explaining unfamiliar code. Read-only work is forgiving: a mediocre suggestion costs you a shrug, not a broken build.
- Boilerplate and tests. Scaffolding, test skeletons, fixtures, docstrings, config plumbing. High-volume, low-ambiguity output is exactly where cheap local tokens shine.
- Code that cannot leave the building. For contractually or legally private repos, cost doesn't factor in: the sovereign stack is the only option.
Model choice matters more than harness choice here. The current crop of open-weight coder models in the tens-of-billions class, quantized to fit, is genuinely good at this tier of work. I keep a running shortlist in best local LLMs for coding.
The local ceiling in 2026 is how many consecutive decisions a model can make before compounding error rates take over.
What still needs a frontier model
Long agentic chains. A multi-file refactor that takes dozens of tool calls exercises everything local models are still weakest at: emitting well-formed tool calls every single time, tracking state across a long session, and recovering from their own mistakes instead of doubling down. Each step is merely pretty reliable, and a forty-step chain compounds pretty reliable into a coin flip.
The failure mode is distinctive once you've seen it. The agent loops, re-reads the same file, mangles a tool call and retries it verbatim, or confidently declares victory on a build it just broke. Vendor-tuned frontier stacks recover from these stumbles; local stacks mostly don't, because nobody tuned the harness prompts for this exact model's quirks.
The pragmatic answer is a cascade: run bounded work locally, escalate anything long-horizon to a frontier model, and make the split deliberate instead of aspirational. That routing discipline is a topic of its own: squeeze the local tier is my playbook.
The hardware reality check
Be honest about the machine. A local model that's useful for coding wants either a unified-memory Mac with plenty of RAM or a workstation GPU with serious VRAM. Quantization stretches what fits, at a cost to reliability that agents feel more sharply than chat does. A slightly degraded model makes slightly worse decisions, and agents make decisions in bulk. My hardware guide has concrete tiers.
Speed is the underrated constraint. Agents are token furnaces: every loop iteration burns a full prompt and completion, so generation speed compounds across a session. A chain a frontier API finishes in two minutes can take a local rig twenty. For interactive pair work that's tolerable; for autonomous runs it quietly changes what you're willing to attempt.
The sovereign stack is a real tool in 2026, not a hobbyist flex, but only if you scope it. Point an open CLI at a local model for the bounded majority: edits, review, boilerplate, anything private. Keep a frontier model on call for long chains, and route deliberately. Then re-test the boundary every few months, because open-weight models keep climbing, and every release moves the ceiling up.