Skip to content

Server plugins that fail to load are silently dropped (no stderr output) #34742

Closed as not planned

Description

@zaninime

Description

When a configured server plugin (the plugin key in config) fails to load, opencode drops it with no visible diagnostic. The failure only surfaces as a session Error event (easy to miss), and the "no entrypoint" case is swallowed entirely by a no-op missing reporter. The result: a plugin that is present and correctly resolved but throws at import() time looks exactly like a plugin that was ignored.

This makes plugin problems very hard to diagnose. In my case a file:// plugin appeared to be "ignored" while npm plugins worked, which led me to suspect the file:// resolution logic. It was actually fine - the plugin's module threw ENOENT during evaluation (a top-level readFileSync of an asset that was missing from the package). Nothing was printed to stderr, so there was no signal pointing at the real cause.

Plugins

No response

OpenCode version

1.17.12

Steps to reproduce

  1. Configure a file:// (or npm) server plugin whose module throws during evaluation — e.g. a top-level readFileSync/import of a file that doesn't exist at runtime.
  2. Start opencode.
  3. Observe: the plugin's hooks never run, and there is no error on stderr indicating why.

Screenshot and/or share link

No response

Operating System

macOS 26.5.1

Terminal

No response

Activity

  1. github-actions commented on Jul 1, 2026

    @github-actions
    Contributor

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

  2. github-actions commented on Aug 31, 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