opencode-mission-control icon indicating copy to clipboard operation
opencode-mission-control copied to clipboard

bug: detectOMO fails when plugin uses version suffix (e.g. oh-my-opencode@latest)

Open nigel-dev opened this issue 9 months ago • 1 comments

Description

detectOMO() in dist/index.js uses an exact string match (Array.includes("oh-my-opencode")) to check if OMO is installed. This fails when the plugin entry in opencode.json includes a version suffix like "oh-my-opencode@latest".

All MC modes except vanilla (ulw, ralph, plan) fail with:

Error: OMO mode "ulw" requires Oh-My-OpenCode to be installed and detected

Steps to Reproduce

  1. Configure oh-my-opencode@latest in ~/.config/opencode/opencode.json:
    "plugin": [
      "oh-my-opencode@latest",
      "opencode-mission-control"
    ]
    
  2. Run any MC job with a non-vanilla mode:
    mc_plan({ jobs: [{ name: "test", mode: "ulw", prompt: "..." }] })
    
  3. Job fails immediately with the OMO detection error.

Expected Behavior

detectOMO() should recognize "oh-my-opencode@latest", "oh-my-opencode@^1.0.0", or any version-suffixed variant as a valid OMO installation.

Actual Behavior

The check at dist/index.js:31893 does:

const hasOMO = config3.plugin.includes("oh-my-opencode");

This is an exact match. "oh-my-opencode@latest" does not equal "oh-my-opencode", so hasOMO is false and the job throws.

Suggested Fix

Replace the exact match with a prefix check:

const hasOMO = config3.plugin.some(p => p === "oh-my-opencode" || p.startsWith("oh-my-opencode@"));

Environment

  • OS: macOS (Apple Silicon)
  • tmux version: 3.5a
  • opencode version: 1.2.10
  • bun version: 1.2.5
  • opencode-mission-control: latest (as of 2026-02-21)

Additional Context

Workaround: change the plugin entry from "oh-my-opencode@latest" to "oh-my-opencode" in opencode.json. Both resolve to the same package at install time.

nigel-dev avatar Feb 21 '26 10:02 nigel-dev

Closing as obsolete with Mission Control 2.0 (#94): Oh-My-OpenCode modes and detectOMO are removed; jobs take an agent and model instead.

nigel-dev avatar Nov 20 '26 19:11 nigel-dev