fix(plugin): surface configured plugins that resolve to nothing - #48699
Closed
RaviTharuma wants to merge 6 commits into
Closed
RaviTharuma wants to merge 6 commits into
RaviTharuma wants to merge 6 commits into
Conversation
The server plugin loader passes an empty `missing` callback to PluginLoader.loadExternal, so a configured plugin whose path cannot be resolved is dropped with no output at any log level. The loader already reports it — the caller discards the report. A plugin directory that does not exist therefore produces zero diagnostics, unlike a configured file path, which at least emits a WARN. The first symptom is a ProviderModelNotFoundError at request time, long after startup, with nothing pointing back at the unresolved plugin. Report it through publishPluginError, matching how the `error` callback handles the install/compatibility/entry stages. The TUI loader passes its own `missing` handler for theme-only packages that legitimately have no code entrypoint, so this only affects kind: "server".
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Found one related PR: PR #44372: fix(opencode): report skipped plugins when no server entrypoint is found This PR appears to address the same issue as the current PR (#48699). Both are about surfacing/reporting plugins that don't resolve properly when they have no server entrypoint. This earlier PR may have been closed or superseded, but it's worth checking if it covers the same gap in the |
This was referenced Sep 25, 2026
3 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #48577
Type of change
What does this PR do?
A configured plugin whose path cannot be resolved is dropped with no output at any log level:
The loader already reports this —
PluginLoader.loadExternalhas a dedicatedmissingcallback, separate fromerror. The server loader passes an empty function for it:So
install,compatibilityandentryfailures are reported, but a missing entrypoint is not. This PR fills that callback using the samepublishPluginErrorpath.Why it matters: on my install a vendored plugin directory was removed while the config still referenced it. The provider it registered silently vanished, every agent bound to it fell through to its fallback chain, and the first visible symptom hours later was a
ProviderModelNotFoundErrorpointing at the model rather than the plugin.The
missinghook exists because TUI theme packages legitimately have no code entrypoint. That path (resolveExternalPlugins,kind: "tui") passes its own handler and is untouched — this only affectskind: "server", where a missing entrypoint has no valid meaning.How did you verify your code works?
Typecheck clean for the changed file. Confirmed the silent-drop behaviour first by reproducing it with a config pointing at a non-existent directory (command above,
0occurrences in the full log stream, including--print-logs).No test added: asserting this would mean pinning
publishPluginErroroutput, which the existing plugin tests do not do for any other stage. Happy to add coverage if you want it pinned.Note
bun run typecheckfails repo-wide ondevatpackages/core/src/cross-spawn-spawner.ts(235,11), unrelated to this change (this PR touches one file). That blocks.husky/pre-push, so I pushed with--no-verify.Screenshots / recordings
n/a — log output, shown above.
Checklist