Add OpenCode harness wired to local Qwen 3 (ollama) #278

Closed
opened 2026-06-09 04:16:15 +00:00 by coilysiren · 0 comments
Owner

Add the OpenCode terminal harness to the macOS baseline, wired to the local ollama OpenAI-compatible endpoint so Qwen 3 can drive it.

Scope

  • Install opencode via the anomalyco/tap Homebrew formula (homebrew_taps + homebrew_installed_packages in group_vars/mac.yml).
  • Have the ollama role render ~/.config/opencode/opencode.json, pointing OpenCode at 127.0.0.1:11434/v1 through @ai-sdk/openai-compatible. Default model single-sources from ollama_models via a new ollama_opencode_model default.

Context

Part of the Qwen-3 harness eval spread (coilysiren/inbox#72 - evaluate anomalyco/opencode against Qwen 3). This issue tracks the infrastructure-repo side: the ansible install + config convergence.

Eval finding (open)

The endpoint itself is solid - a direct /v1/chat/completions to qwen3.5:9b-mlx returns cleanly. But headless opencode run (default, --format json, and under a pseudo-TTY) renders only the build agent header and exits 0 with no assistant text. Debug log: under the full build-agent context (large system prompt + 15 tool schemas + Qwen's thinking path), session.prompt step=1 takes ~64s, then exiting loop with no surfaced output. Interactive TUI use still needs hands-on confirmation. Tracking the autonomous-loop viability question back on inbox#72.

Add the OpenCode terminal harness to the macOS baseline, wired to the local ollama OpenAI-compatible endpoint so Qwen 3 can drive it. ## Scope - Install `opencode` via the `anomalyco/tap` Homebrew formula (`homebrew_taps` + `homebrew_installed_packages` in `group_vars/mac.yml`). - Have the `ollama` role render `~/.config/opencode/opencode.json`, pointing OpenCode at `127.0.0.1:11434/v1` through `@ai-sdk/openai-compatible`. Default model single-sources from `ollama_models` via a new `ollama_opencode_model` default. ## Context Part of the Qwen-3 harness eval spread (coilysiren/inbox#72 - evaluate anomalyco/opencode against Qwen 3). This issue tracks the infrastructure-repo side: the ansible install + config convergence. ## Eval finding (open) The endpoint itself is solid - a direct `/v1/chat/completions` to `qwen3.5:9b-mlx` returns cleanly. But headless `opencode run` (default, `--format json`, and under a pseudo-TTY) renders only the `build` agent header and exits 0 with no assistant text. Debug log: under the full build-agent context (large system prompt + 15 tool schemas + Qwen's thinking path), `session.prompt step=1` takes ~64s, then `exiting loop` with no surfaced output. Interactive TUI use still needs hands-on confirmation. Tracking the autonomous-loop viability question back on inbox#72.
Sign in to join this conversation.
No description provided.