Coding Offline in the Himalayas: OpenCode + Ollama Running Qwen3.5 9B on a Laptop

Latent Space · rss · 2026-10-27

A Principal Engineer at Thomson Reuters, now living in the Himalayan foothills with frequent network and power outages, documents a fully offline coding-agent workflow.

Setup: OpenCode (open-source coding agent) + Ollama running Qwen3.5 9B locally (6.6–7.6 GB download, 64k context). OpenCode reads files, proposes edits and runs tests with permission prompts for every command; Ollama serves locally via OLLAMAHOST=127.0.0.1 and OLLAMANOCLOUD=1.

Model choice: Per Qwen's model card, Qwen3.5 9B scores 65.6 on LiveCodeBench v6 and 66.1 on BFCL-V4, beating the 4B variant (55.8/50.3); gpt-oss-20b scores higher on code (74.6) but lacks a reported function-calling score.

Benchmarks cited: The Scaffold Effect preprint shows OpenCode passing 50% of 50 Terminal-Bench Pro tasks (Qwen3.6 Plus), tied with OpenHands-SDK and above Goose (48%), but consuming 40x Goose's tokens per solved task.

Practical lessons: Give the agent existing failing unittest cases as a concrete target; fix a bug where a total is overwritten each loop iteration. Gotcha: the agent proposed pytest instead of unittest — specify the exact test command in the prompt. Full configuration (opencode.json pointing at local Ollama, web tools disabled) is published for readers to reproduce before going offline.

Original post →

More from coding & agent

coding & agent channel →