Skip to content

plugins: all user plugins fail to load with SchemaError after V1→V2 upgrade #39345

Description

@adamcjm

Summary

After upgrading to V2 (@opencode-ai/cli@next), all configured user plugins fail to load with SchemaError. The plugins export V1-style async functions instead of V2's Plugin.define() objects.

Environment

  • opencode version: 0.0.0-next-16381
  • OS: Darwin 24.6.0 (darwin arm64)
  • Terminal: Ghostty (xterm-ghostty, truecolor)
  • Shell: /bin/zsh
  • Install/channel: npm next tag
  • Active plugins: None (all 3 configured plugins failed)

Reproduction

  1. Install @opencode-ai/cli@next globally
  2. Configure plugins in opencode.json:
    "plugin": [
      "@mohak34/opencode-notifier@latest",
      "superpowers@git+https://github.com/obra/superpowers.git",
      "@dietrichgebert/ponytail"
    ]
  3. Start opencode2
  4. Check logs: ~/.local/share/opencode/log/opencode.log

Expected Behavior

Plugins load and register their tools/commands/skills, or V2 provides a backward-compatible shim for V1-style plugin exports during migration.

Actual Behavior

All 3 plugins fail with SchemaError:

@dietrichgebert/ponytail:

SchemaError(Expected object, got async ({ client } = {}) => { ... } at ["default"])

@mohak34/opencode-notifier@latest:

SchemaError(Expected object, got async ({ client, directory }) => { ... } at ["default"])

superpowers:

SchemaError(Missing key at ["default"])

The /api/plugin endpoint returns only built-in plugins; none of the user plugins appear.

Additional Context

  • Config uses V1 format ("plugin" singular, "provider" with npm/options). V2 translates the config entry automatically, but plugin implementation code must also be ported.
  • These are third-party npm packages — end users cannot port them. Plugin authors need to update for V2.
  • Could V2 provide backward-compatible loading for V1-style plugin exports during the beta? The migration guide mentions "OpenCode should be able to migrate the majority of V1 plugins while keeping related local modules and dependencies together" once the API is finalized.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions