Skip to content

Add OpenCode agent backend - #40

Open
simbo1905 wants to merge 5 commits into
unclebob:mainfrom
simbo1905:simbo1905
Open

Add OpenCode agent backend#40
simbo1905 wants to merge 5 commits into
unclebob:mainfrom
simbo1905:simbo1905

Conversation

@simbo1905

@simbo1905 simbo1905 commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Adds an optional opencode agent backend, with its provider/model selection passed as ordinary role arguments.

Also included:

  • an opt-in, smoke-only role instruction profile for bounded diagnostics;
  • SWARMFORGE_CONFIG selection of an alternate project-local configuration; and
  • a handoff-daemon detachment fix so the daemon follows its explicit stop-file lifecycle rather than being torn down with the terminal bridge.

Closes #39.

Scope change

This PR previously also carried the Mistral Vibe backend. Vibe has been split out into #46 and its own PR so that each backend can be reviewed independently. This branch no longer references Vibe at all.

Validation

bb test on this branch, compared against unmodified main on the same host:

Branch Tests Assertions Failures Errors
main 24 87 0 2
this branch 26 94 0 2

The two errors are close-swarm-kills-tmux-sessions-and-stops-daemon and swarmforge-detects-nonzero-pane-base-index, which both require tmux and error identically on unmodified main in this tmux-less host environment. No new failures are introduced. The full suite previously passed in a mountless aarch64 Lima guest.

New coverage:

  • opencode-launch-command-passes-model-and-initial-prompt
  • swarmforge-role-only-instruction-profile-is-explicit-and-bounded

Scope and security

No credentials, telemetry, or benchmark artifacts are included. OpenCode must be installed and authenticated by the runtime owner.

@simbo1905

Copy link
Copy Markdown
Author

Hey @unclebob

This one is a little half baked so far as is making some arbitrary decisions such as it picking run this open model to keep my token costs down while I am trying things out myself

"--model opencode-go/qwen3.7-plus --auto"

I think there is an case to be made that I split out mistral.ai as its a mono provider backend; so it has its own standard model defaults. So that can probably get onto main faster.

On the question of what is the default provider for OpenCode (Go at $10 a month, or Zen with pay-as-you-go), and the default models. There are Deepseek, Kimi and others hosted in US, EU and Singapore on OpenCode. That makes things more complex but a ton of fun https://opencode.ai/docs/zen/#pricing

It could be fun to come up with some swarm-forge benchmark tasks and to then different mix and matches of open and proprietary models perhaps a "Swarm Bench"...

Give me a thumbs up if you want me to pursue this.

Simon

@simbo1905 simbo1905 changed the title Add OpenCode and Mistral Vibe agent backends Add OpenCode agent backend Aug 10, 2026
@simbo1905
simbo1905 marked this pull request as ready for review August 10, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OpenCode agent backend

1 participant