feat: add OpenCode as a first-class harness client#42
Open
Ram-Pavith wants to merge 3 commits into
Open
Conversation
added 2 commits
July 19, 2026 20:17
Add an OpenCode CLI harness adapter, setup target, model validation, and docs/tests so build/ingest/garden can run through `opencode run`.
Add SQLite discovery/runtime for OpenCode sessions, responsive setup wizard cards/brand/SIGWINCH polish, and almanac docs for native OpenCode.
3 tasks
Stage lifecycle agents under runtime_root/opencode via OPENCODE_CONFIG_DIR so jobs do not dirty the project tree. Refresh harness/guides/decision wiki for native OpenCode and dual on-ramps.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds OpenCode as a first-class CodeAlmanac harness client so build / ingest / garden run through the OpenCode CLI (
opencode run), alongside Codex and Claude via Yoke.Also covers transcript sync, setup UI polish, and almanac wiki — while keeping a native OpenCode harness (not Yoke).
Closes #41
Why not Yoke for OpenCode
OpenCode is a model router, not a single provider. Users already connect OpenRouter, native provider APIs, Zen free models, and other OpenAI-compatible endpoints in the OpenCode TUI. Whatever shows up in
opencode modelsis what they can run interactively.A Yoke OpenCode path would:
Provider.OPENCODE.openrouter/...).This PR calls
opencode run --model <provider/model>with the user’s normal OpenCode install. Config only checks id shape (provider/model; nested segments allowed). Setup prefers the liveopencode modelslist. Result: lifecycle jobs can use the same connected models as the OpenCode TUI (OpenRouter and everything else OpenCode is logged into), without a second allowlist or Yoke pin.Contrast: #28 wires OpenCode through Yoke — better if the product wants every harness only via Yoke; worse for “use my OpenCode accounts/models now.”
What changed
Harness
integrations/harnesses/opencode/)runtime_root/opencode/via additiveOPENCODE_CONFIG_DIR(not the user repo’s.opencode/)provider/modelconfig validation + READMETranscript sync
TranscriptApp.OPENCODE~/.local/share/opencode/opencode.db(session/parent_id IS NULL)opencode-session:<id>message/part(before generic transcript runtime)query_readonly_or_emptyfor foreign SQLitesync --fromdefaults to all transcript appsSetup UI polish
Almanac wiki
opencode-harness.md, dual on-ramp guide, controlled-model decision carve-out for OpenCode, event-shape/sync docsTest plan
uv run pytest tests/test_opencode_*.py tests/test_setup_wizard_*.py tests/test_cli.py -quv run pytest/uv run ruff check .config set harness.default opencode+harness.modelto an OpenRouter id fromopencode modelscodealmanac sync status --from opencodeRelated