OpenCode 2.4 shipped on November 23, 2026 with a persistent browser in its desktop app and a way to schedule tasks. You can still start a terminal coding session with a downloaded Ollama model and no paid inference API. This walkthrough shows how to keep agent browser calls and automations off, check the model is running locally and try one read-only task before opening a real project.

What changed in OpenCode 2.4?

The desktop app now includes a browser with a persistent profile and optional import of browser history and signed-in sessions. Version 2.4 also adds automations for prompts and commands. Leave the browser profile empty if you only want help reading code. Check existing automations in the terminal with /automation before changing what can run in the background. The release notes document an automation off switch and a separate permission for agent browser calls.

The update also changes the terminal theme and introduces video generation when a connected provider offers a video model. The local Qwen model in this guide is for code and text. Media generation through a separate provider has its own account and cost.

Install OpenCode 2.4 and check your version

Pick the OpenCode 2 installation route that matches your system. The maintainer documents a Homebrew tap for macOS and the scoped @opencode/cli package for npm. Use the original package manager when updating an installed OpenCode 2 client. If the version check still reports 1.x, check which binary your shell resolves with command -v opencode and read the official V1 migration guide before swapping installations. Back up your configuration before upgrading an existing setup.

Install Ollama from its official Mac download and launch the app once to make its CLI available. Ollama’s Mac documentation lists Apple silicon with GPU support and Intel with CPU-only support. This walkthrough focuses on Apple silicon. The Homebrew commands below assume you already use Homebrew.

Terminal commands for a fresh OpenCode 2 installation with Homebrew

brew install anomalyco/tap/opencode-v2
opencode --version

Download a local model and check memory

With the Ollama app running, pull the explicit qwen3.5:9b tag. The Ollama library lists downloads of about 6.6 GB and 7.6 GB for its different backends. Those are download sizes. Model memory and context add to the working set. The Qwen publisher lists Apache 2.0 for these weights. OpenCode itself uses the MIT license.

Ollama recommends a context window of at least 64,000 tokens for coding tools. In the Ollama app settings, check the context setting before starting a large task. Higher context increases memory use. Start with one short file and inspect the running model with ollama ps. If your Mac slows down or begins using heavy swap, try a smaller tool-capable model and keep tasks short. Verify that it handles the tools you need before trusting it with larger edits. Models and updates require a download. Once the weights are on disk, local inference uses your own hardware, storage and electricity.

Download the model and check that it answers

ollama pull qwen3.5:9b
ollama run qwen3.5:9b

Turn off automations and deny agent browser calls

Use an empty practice folder containing one README you wrote. Put the example in that folder’s opencode.jsonc, or merge the settings into an existing file. The example blocks agent web search, browser calls, shell commands, edits and access outside the project for the first session. OpenCode 2 uses ordered permission rules, and later matching rules or agent-specific settings can override an earlier decision. Review inherited configuration and start without extra plugins or MCP connections. Leave browser import unused if you have the desktop app.

These app settings control specific actions. For the strictest check, run the sample offline with disposable files. Ollama’s own cloud switch is independent. Set disable_ollama_cloud to true in ~/.ollama/server.json, preserving other settings, and restart Ollama. Its logs show whether the cloud switch took effect.

Starter opencode.jsonc for a read-only practice project

{
  "$schema": "https://opencode.ai/config.json",
  "automations": false,
  "permissions": [
    { "action": "browser", "resource": "*", "effect": "deny" },
    { "action": "webfetch", "resource": "*", "effect": "deny" },
    { "action": "websearch", "resource": "*", "effect": "deny" },
    { "action": "external_directory", "resource": "*", "effect": "deny" },
    { "action": "shell", "resource": "*", "effect": "deny" },
    { "action": "edit", "resource": "*", "effect": "deny" }
  ]
}

Select Ollama and verify your first request

Run opencode from the practice folder. Its provider documentation says it checks the local Ollama endpoint at 127.0.0.1:11434 and adds compatible models without an account connection. Open /models inside OpenCode and choose the downloaded Qwen model under Ollama. If you previously connected other providers, check the provider name and the exact model tag before sending a prompt.

Ask it to read README.md and list three things a new contributor needs to know. Keep the response short and check each point against the file. In a second terminal, run ollama ps during or just after the request to inspect the active model and its processor and context. For an extra check, turn off network connectivity after downloading everything and repeat with dummy text. A successful offline response and the active Ollama process confirm the local inference path for that test.

Fix a missing model, slow replies or unexpected access

If Ollama’s model does not appear in /models, open the Ollama app and check ollama list first. Make sure the model answers in ollama run, then return to OpenCode and re-open the chooser. If you see unexpected account sign-in or a request for an API key, reselect the local Ollama provider. A remote Ollama endpoint or cloud model changes where prompts are processed. Keep Ollama on its default local address for this walkthrough.

If replies are slow, check the processor split and allocated context with ollama ps. A CPU-heavy run or a context too large for available memory can slow a laptop substantially. If an action you expected to be denied is offered or runs, stop the session and review global rules, project rules, agent overrides and connected plugins. Try the same read-only prompt on your sample project before using private files again.

When is this a free Claude Code alternative?

For a short explanation, a code review or a tightly scoped edit, OpenCode with a downloaded Ollama model can work without a subscription or paid inference API. The quality depends on the model, context and task. Start with reviewable changes and inspect the diff yourself. If you need an editor-first workflow, compare Cline. If you want Git-focused terminal edits, compare Aider. Hosted model subscriptions, paid APIs and video-generation services are optional choices and have separate terms. AltStack verified the release and setup documentation for this guide. We did not benchmark the model or repeat these steps on every Mac configuration.

Official instructions and sources

OpenCode 2.4 release notesOpenCode 2 installation and packagesOpenCode migration from version 1OpenCode 2 ordered permission rulesOpenCode’s local Ollama providerOpenCode 2.4 MIT licenseOllama Mac setupOllama local mode and cloud controlsOllama context and memory guidanceOllama’s Qwen3.5 9B package and licenseQwen publisher’s model card and license

Original AltStack guide by Sushil Kumar Sah. Installation steps follow provider documentation; they do not imply testing on every supported device.