An offline coding agent: OpenCode + Ollama + Qwen3.5 9B

A detailed guide from Latent Space on working with a coding agent entirely offline on a laptop. Handy on a plane or when the network goes down.

How to try it

  1. While you're still online, start Ollama: OLLAMA_HOST=127.0.0.1:11434 OLLAMA_NO_CLOUD=1 OLLAMA_CONTEXT_LENGTH=65536 ollama serve
  2. In another terminal, download the model: ollama pull qwen3.5:9b (about 6.6–7.6 GB; plan for 12–16 GB of RAM).
  3. Follow the guide's README for OpenCode 1.19.4 and an opencode.json that points to local Ollama.
  4. Turn off Wi-Fi and give the agent a small, clearly defined task, with the exact test command.

Price: free

Official link

More new tools