Skip to content

Plugin install fails with 'Invalid Version: latest' in v1.3.6 #19956

Closed as not planned

Description

@maciejmalysz

Description

OpenCode v1.3.6 fails to load third-party plugins (e.g. oh-my-opencode) with the error:

ERROR service=plugin pkg=oh-my-opencode version=latest error=Invalid Version: latest failed to install plugin

The plugin dynamic installer resolves the version as the string "latest" and then passes it to a semver parser, which rejects it because "latest" is not valid semver — it's an npm dist-tag.

Steps to Reproduce

  1. Install OpenCode v1.3.6
  2. Configure a plugin in ~/.config/opencode/opencode.json:
    {
      "plugin": ["oh-my-opencode"]
    }
  3. Start a new session: opencode
  4. Check logs at ~/.local/share/opencode/log/

Expected Behavior

The plugin should be installed and loaded successfully. The "latest" dist-tag should be resolved to an actual semver version before validation.

Actual Behavior

Plugin fails to load entirely:

INFO  service=plugin path=oh-my-opencode loading plugin
ERROR service=plugin pkg=oh-my-opencode version=latest error=Invalid Version: latest failed to install plugin

This means all plugin-provided features are unavailable (agents, built-in MCPs, tools, hooks).

Workaround

Use an absolute path to a pre-installed plugin instead of the package name:

{
  "plugin": [
    "/Users/<username>/.opencode/node_modules/oh-my-opencode"
  ]
}

After manually installing the plugin:

cd ~/.opencode
# Add oh-my-opencode to package.json dependencies
bun install
bun pm trust oh-my-opencode @ast-grep/cli @code-yeongyu/comment-checker

Environment

  • OpenCode version: 1.3.6
  • OS: macOS (arm64)
  • Bun version: 1.3.10 / 1.3.11 (both affected — issue is in OpenCode's semver parser, not bun)
  • Plugin: [email protected] (but affects any plugin using default latest resolution)

Suggested Fix

In the plugin install code path, resolve the "latest" npm dist-tag to an actual semver version string (e.g. via npm view <pkg> version or registry API) before passing it to the semver parser.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 29, 2026
  2. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is covered by one of these, please add a reaction or comment there instead so discussion stays consolidated.

  3. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions