[BUG] Plugin source missing error on every startup with marketplace plugins

Resolved 💬 4 comments Opened Oct 12, 2025 by MissaDavid Closed Jan 12, 2026

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-marketplace followed by /plugin install superpowers@superpowers-marketplace

Steps to Reproduce

  1. Install the Superpowers marketplace: /plugin marketplace add obra/superpowers-marketplace
  2. Install the Superpowers plugin: /plugin install superpowers@superpowers-marketplace
  3. Restart Claude Code
  4. 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:

  1. The marketplace definition is correct - /Users/mel/.claude/plugins/marketplaces/superpowers-marketplace/.claude-plugin/marketplace.json contains:
{
  "plugins": [
    {
      "name": "superpowers",
      "source": {
        "source": "url",
        "url": "https://github.com/obra/superpowers.git"
      },
      ...
    }
  ]
}
  1. The cached plugin metadata is missing the source field - /Users/mel/.claude/plugins/cache/superpowers/.claude-plugin/plugin.json contains:
{
  "name": "superpowers",
  "description": "...",
  "version": "1.0.0",
  "author": {...},
  "homepage": "...",
  "repository": "...",
  "license": "MIT",
  "keywords": [...],
  "category": "productivity"
  // ❌ NO SOURCE FIELD
}
  1. The source field doesn't persist - Even when manually added, Claude Code overwrites the cached plugin.json file without the source field, 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

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗