Skip to content

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

@nigel-dev

Description

@nigel-dev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions