Skip to content
 
 

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

OMOC Swarm (OpenCode Plugin)

Codebuff-style multi-agent swarms for OpenCode:

  • one swarm = multiple OpenCode sessions (planner/researcher/coder/reviewer)
  • agent-to-agent messaging (swarm.send)
  • parallel fan-out with basic model-collision gating (swarm.parallel)
  • auto-discovery from session titles (swarm.discover)

Install (per project)

Copy (or symlink) the plugin into your repo so plain opencode auto-loads it:

mkdir -p .opencode/plugins
cp /path/to/opencode-omoc-swarm/plugins/omoc-swarm.ts .opencode/plugins/omoc-swarm.ts

Then run OpenCode as usual:

opencode

Tools

  • swarm.create — create a swarm (child sessions)
  • swarm.discover — discover/register a swarm from existing session titles
  • swarm.status — show members + session IDs
  • swarm.parallel — run a prompt across members (parallel where possible)
  • swarm.send — message another member (routes as a prompt)
  • swarm.forget — forget local swarm mapping (sessions remain)
  • swarm.max — MAX mode: parallel editor tries in isolated git worktrees + selector picks winner (optional apply)
  • swarm.jam — collaborative run in the same worktree (no isolation)
  • swarm.loop — queue runner: read .omoc-queue.json and execute tasks via swarm.jam / swarm.max

Side-by-side tmux UI

This repo ships a launcher:

./bin/oc-swarm --dir /path/to/your/project

Requirements: tmux, curl, jq, lsof, and opencode on PATH.

Always side-by-side (direnv)

If you want opencode to always start in the side-by-side tmux UI inside a project, use direnv to prepend that project's bin/ to PATH, and ship a tiny bin/opencode wrapper that launches bin/oc-swarm.

One-time setup

  1. Install direnv:
brew install direnv
  1. Enable the direnv hook once for your shell (example: zsh):
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc
exec zsh

Project setup (recommended)

In your target project repo:

mkdir -p bin
cp /path/to/opencode-omoc-swarm/bin/oc-swarm bin/oc-swarm
cp /path/to/opencode-omoc-swarm/templates/bin/opencode bin/opencode
cp /path/to/opencode-omoc-swarm/templates/.envrc .envrc
chmod +x bin/oc-swarm bin/opencode
direnv allow

Now opencode (without subcommands) will always open the side-by-side tmux UI.

Escape hatch

OMOC_NO_TMUX=1 opencode
# or
opencode --no-tmux

About

Multi-agent swarm runtime for OpenCode with parallel execution, delegation patterns, and best-of-n selection. Orchestrates Sisyphus agents for complex coding tasks.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages