[BUG] Plugin source missing error on every startup with marketplace plugins
Bug Report: "Plugin source missing" error on every startup
Description
Claude Code throws an error "Error: Plugin source missing" on every startup when the Superpowers plugin is installed from a marketplace, even though the plugin loads and functions correctly.
Environment
- Claude Code Version: 2.0.14
- Platform: macOS (Darwin 24.6.0)
- Plugin: superpowers@superpowers-marketplace
- Installation Method:
/plugin marketplace add obra/superpowers-marketplacefollowed by/plugin install superpowers@superpowers-marketplace
Steps to Reproduce
- Install the Superpowers marketplace:
/plugin marketplace add obra/superpowers-marketplace - Install the Superpowers plugin:
/plugin install superpowers@superpowers-marketplace - Restart Claude Code
- Observe error in debug logs and startup message
Expected Behavior
Plugin should install and load without errors on startup.
Actual Behavior
Every startup shows:
[ERROR] Error: Error: Plugin source missing
at K8G (/$bunfs/root/claude:512:37104)
at K8G (/$bunfs/root/claude:512:37791)
at ke9 (/$bunfs/root/claude:513:4097)
at ke9 (/$bunfs/root/claude:513:4162)
at je9 (/$bunfs/root/claude:513:1612)
at je9 (/$bunfs/root/claude:513:1919)
at <anonymous> (/$bunfs/root/claude:514:2848)
at <anonymous> (/$bunfs/root/claude:514:3043)
at processTicksAndRejections (native:7:39)
However, immediately after this error, the log shows:
[DEBUG] Loaded plugins - Enabled: 1, Disabled: 0, Commands: 4, Agents: 0, Errors: 0
And the plugin commands (/superpowers:execute-plan, /superpowers:write-plan, /superpowers:brainstorm) work perfectly.
Root Cause Analysis
The issue occurs during performBackgroundPluginInstallations at startup. Investigation reveals:
- The marketplace definition is correct -
/Users/mel/.claude/plugins/marketplaces/superpowers-marketplace/.claude-plugin/marketplace.jsoncontains:
{
"plugins": [
{
"name": "superpowers",
"source": {
"source": "url",
"url": "https://github.com/obra/superpowers.git"
},
...
}
]
}
- The cached plugin metadata is missing the source field -
/Users/mel/.claude/plugins/cache/superpowers/.claude-plugin/plugin.jsoncontains:
{
"name": "superpowers",
"description": "...",
"version": "1.0.0",
"author": {...},
"homepage": "...",
"repository": "...",
"license": "MIT",
"keywords": [...],
"category": "productivity"
// ❌ NO SOURCE FIELD
}
- The source field doesn't persist - Even when manually added, Claude Code overwrites the cached
plugin.jsonfile without thesourcefield, then immediately complains it's missing during the background update check.
Impact
- ❌ User sees an alarming error message on every startup (without full context of what the error is)
- ❌ Creates confusion about whether the plugin is working correctly
- ✅ Plugin actually works fine (the error is cosmetic)
Suggested Fix
When installing a plugin from a marketplace, the plugin installation process should copy/generate the source field into the cached plugin's metadata at ~/.claude/plugins/cache/{plugin-name}/.claude-plugin/plugin.json. This would allow the background update checker to find updates without throwing errors.
Alternatively, the background update checker should handle missing source fields gracefully (perhaps by looking up the source from the enabled plugins registry).
Logs
Debug logs from startup (from ~/.claude/debug/):
[DEBUG] performStartupChecks called, ENABLE_PLUGINS=true
[DEBUG] Starting background plugin installations
[DEBUG] performBackgroundPluginInstallations called
[DEBUG] Found 1 enabled plugins
[ERROR] Error: Error: Plugin source missing
...
[DEBUG] Loaded plugins - Enabled: 1, Disabled: 0, Commands: 4, Agents: 0, Errors: 0
Additional Context
- Settings file (
~/.claude/settings.json) correctly contains:
{
"enabledPlugins": {
"superpowers@superpowers-marketplace": true
}
}
- Known marketplaces file is correct
- Plugin cache directory structure is correct
- The error does NOT prevent the plugin from working
- The error happens AFTER plugin loading succeeds
- Manually removing and reinstalling the plugin doesn't fix the issue
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗