extraKnownMarketplaces with directory source does not resolve relative paths

Resolved 💬 3 comments Opened Feb 7, 2026 by jpicklyk Closed Feb 11, 2026

Bug Description

extraKnownMarketplaces in .claude/settings.json with "source": "directory" does not resolve relative paths to absolute paths. The relative path is passed through literally to known_marketplaces.json, causing plugin resolution to fail at runtime.

Steps to Reproduce

  1. Create a plugin marketplace in a git repo with .claude-plugin/marketplace.json at the repo root
  2. Add to .claude/settings.json (checked into the repo):
{
  "extraKnownMarketplaces": {
    "my-marketplace": {
      "source": {
        "source": "directory",
        "path": "./"
      }
    }
  },
  "enabledPlugins": {
    "my-plugin@my-marketplace": true
  }
}
  1. Start Claude Code in the project directory
  2. Run /doctor

Expected Behavior

Claude Code should resolve "./" to the absolute project root path (e.g., D:\Projects\my-project) when populating known_marketplaces.json, similar to how /plugin marketplace add ./ resolves it.

Actual Behavior

  • /doctor reports: Plugin my-plugin not found in marketplace my-marketplace
  • known_marketplaces.json stores the path literally as "./" instead of resolving it
  • The marketplace appears in /plugin list but the plugin fails to load (skills, hooks, output-styles not registered)

Evidence

When using /plugin marketplace add ./ (interactive command), known_marketplaces.json correctly stores:

{
  "my-marketplace": {
    "source": {
      "source": "directory",
      "path": "D:\Projects\my-project"
    },
    "installLocation": "D:\Projects\my-project"
  }
}

When using extraKnownMarketplaces in settings.json, the same file stores the unresolved relative path:

{
  "my-marketplace": {
    "source": {
      "source": "directory",
      "path": "./"
    },
    "installLocation": "./"
  }
}

Impact

This prevents plugin authors from shipping a fully auto-discoverable local marketplace with their repos. The checked-in settings.json cannot use absolute paths (not portable), and relative paths don't resolve. The workaround is requiring cloners to manually run /plugin marketplace add ./ after cloning.

Environment

  • Claude Code on Windows (MSYS_NT-10.0-26100 / Git Bash)
  • Plugin marketplace at repo root with .claude-plugin/marketplace.json

Workaround

Users must manually run /plugin marketplace add ./ after cloning the repo. The checked-in settings.json can pre-set enabledPlugins so the plugin auto-enables once the marketplace is added manually.

View original on GitHub ↗

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