/plugin install fails with "source type your Claude Code version does not support" for a marketplace plugin whose source is "." (reproduces on latest)
Summary
Installing a plugin whose marketplace marketplace.json entry declares"source": "." (the standard "the plugin is the marketplace repo root"
declaration) fails with:
Failed to install: This plugin uses a source type your Claude Code version does not support. Update Claude Code and try again.
The "update" advice is a dead end: this reproduces on 2.1.159, which is the
current npm latest. The relative "." plugin source is normalized into a
remote source object whose discriminant is not one of the four cases the
installer's fetch switch handles, so it hits default: throw. It fails the
same way whether the marketplace is added as a github source or a localdirectory source.
Environment
- Claude Code: 2.1.159 (installed ==
npm view @anthropic-ai/claude-code version) - Platform: Linux x64 (native binary build)
- Node: v22.x
Reproduction
A minimal public marketplace that triggers it:github.com/jackson-video-resources/markov-hedge-fund-method, whose.claude-plugin/marketplace.json is:
{
"name": "markov-hedge-fund-method",
"owner": { "name": "..." },
"metadata": { "version": "1.0.0" },
"plugins": [
{
"name": "markov-hedge-fund-method",
"source": ".",
"description": "..."
}
]
}
Steps:
/plugin marketplace add jackson-video-resources/markov-hedge-fund-method
/plugin install markov-hedge-fund-method@markov-hedge-fund-method
The plugin detail pane shows · Component summary not available for remote, and selecting any install scope (user/project/local) yields:
plugin
Failed to install: This plugin uses a source type your Claude Code version
does not support. Update Claude Code and try again.
Also tried, with identical failure:
git clone https://github.com/jackson-video-resources/markov-hedge-fund-method.git ~/mp
/plugin marketplace remove markov-hedge-fund-method
/plugin marketplace add ~/mp # registers as {source:"directory", path:"~/mp"}
/plugin install markov-hedge-fund-method@markov-hedge-fund-method
i.e. converting the marketplace from github to directory does not avoid
it — the install preview still classifies the plugin as a "remote plugin"
(object source) and throws.
Root cause (from the 2.1.159 bundled binary)
The remote-plugin fetch step is a switch over the resolved plugin source's
discriminant with only four cases:
// caching a plugin from a remote source object
switch (H.source) {
case "npm": await ZJ7(H.package, _, { registry: H.registry, version: H.version }); break;
case "github": await $x5(H.repo, _, H.ref, H.sha); break;
case "url": await TJ7(H.url, _, H.ref, H.sha); break;
case "git-subdir": A = await VJ7(H.url, _, H.path, H.ref, H.sha); break;
default: throw Error("This plugin uses a source type your Claude Code version does not support");
}
But the marketplace/plugin source schema accepts a wider set of
discriminants than this switch handles:
directory, file, git, github, git-subdir, npm, settings, skills-dir, url, unsupported
A plugin with the relative string source "." is resolved/normalized into a
remote source object (the install UI's "remote plugin" branch is literallytypeof source === "object"), and that object's discriminant is one of the
schema-valid-but-not-installable types (e.g. git — note there is nocase "git" in the fetch switch, only git-subdir). It therefore falls
through to default: throw.
So the parser accepts a source type that the installer cannot fetch — a gap
between the schema and the fetch switch, not an actually-unsupported feature.
Expected behavior
A plugin declared with "source": "." in a marketplace should install:
- For a
directory/filemarketplace: resolve"."to the local plugin
directory (path.join(marketplaceLocation, ".")) and install from disk. (The
loader Yx5 already does exactly this when reached — its
EB(src) = src==="file" || src==="directory" branch joins the local path —
but the install action does not take that path; it goes through the
object-source fetch switch and throws.)
- For a
githubmarketplace: resolve"."to a fetch-supported remote source
(github with the marketplace repo, or git-subdir with path: "."), not a
type the switch lacks a case for.
At minimum, the schema and the fetch switch should agree: either add the
missing cases (e.g. git) to the fetch switch, or normalize relative plugin
sources only to discriminants the switch supports.
Impact
Any marketplace that declares its single plugin at the repo root via"source": "." (a common pattern) is uninstallable on 2.1.159, with an error
that misleadingly tells the user to update to a version that doesn't exist yet.
Workaround (for other users hitting this)
The plugin payload (if it's just skills/scripts/agents) can be copied directly
into ~/.claude/skills/ (or the project's .claude/) and used without the
plugin installer. ${CLAUDE_PLUGIN_ROOT} references in the skill must be
rewritten to the concrete install path, since that variable is only set for
plugin-loaded skills.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗