Skip to content

Loading local plugin silently fails in case of an error #21638

Closed as not planned

Description

@michalkvasnicak

Description

I'm working on a plugin and during development I'm using just local version of the plugin by placing it to .opencode/plugins/my-plugin.ts. The issue is that if there is some error in the plugin (e.g. incompatibility between node and bun) the error is just swallowed.

I believe it is because of this line

pkg ?? (source === "npm" ? await readPluginPackage(target) : await readPluginPackage(target).catch(() => undefined))
where error is swallowed in case of local plugin.

Plugins

No response

OpenCode version

1.4.0

Steps to reproduce

  1. import drizzle-orm/node-sqlite in your plugin and use it to create a database
  2. opencode loads the plugin but then it behaves like the plugin doesn't exist and there are no error logs

Screenshot and/or share link

No response

Operating System

macOS 26.3.1

Terminal

Ghostty

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 9, 2026
  2. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  3. 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