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.
More from coding & agent
- LMArena launches Code Arena WebDev leaderboard for model coding comparisons — arena · 2026-10-28
- A monthly Patentable Discoveries agent that scans biotech research for IP — nlarusstone · 2026-10-28
- Garry Tan: Agent swarms are a big unlock over single agents — garrytan · 2026-10-28
- GPT images + Opus 5.5 HTML layering: a replicable YouTube thumbnail workflow with virality scoring — RichardsonDx · 2026-10-28
- Box explains its Deep Agent architecture: parent-child agents over a LangGraph orchestrator — LangChain · 2026-10-28
- How do you inject instructions mid-run? Dev struggles with stage summaries agents don't trust — tinker_bob · 2026-10-28