Marketplace installation doesn't clone git submodules
Status Fixed / completed
Reported on v2.1.3
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 5 comments · opened Jan 10, 2026 · closed Mar 3, 2026
When installing a marketplace that uses git submodules to include multiple plugins, Claude Code clones the repository but doesn't initialize or update submodules. This leaves empty placeholder directories where the plugin content should be.
Steps to Reproduce
- Create a marketplace repo that uses git submodules (e.g., to include multiple independent plugin repos)
- Install the marketplace via Claude Code
- Check the installed directory at
~/.claude/plugins/marketplaces/<name>/
Expected Behavior
Submodules should be cloned along with the main repo, equivalent to:
git clone --recurse-submodules <repo-url>
# or
git clone <repo-url> && git submodule update --init --recursive
Actual Behavior
Submodule directories exist but are empty. Running git submodule status shows all submodules with - prefix (uninitialized):
-640fa097d878e015d8547e89ab788211064b6b58 hiivmind-corpus
-821b2331131bed6fbf870856b95aee5b874383ca hiivmind-corpus-airtable
-c0d30fe4d4a366ec7237875bb18b519e8f4fb7d3 hiivmind-corpus-atproto
...
Environment
- Claude Code version: 2.1.3
- OS: Ubuntu 25.10
- Marketplace: https://github.com/hiivmind/hiivmind-marketplace (16 submodules)
Workaround
Manually initialize submodules after installation:
cd ~/.claude/plugins/marketplaces/<name>
git submodule update --init --recursive
5 Comments
Why This Matters
Without submodule support, marketplaces are effectively forced to be monorepos. This limits the plugin ecosystem in several ways:
Submodule support enables a federated model where:
For example, this is how the
hiivmind-marketplaceis structured - 16 independent plugin repos composed into a single installable marketplace.---
Investigation Findings
I investigated this issue by examining the bundled CLI at
cli.jsin the@anthropic-ai/claude-codenpm package.Root Cause Identified
There are two git clone functions in the codebase that handle repository cloning:
| Function | Type | Used For | Error Message |
|----------|------|----------|---------------|
|
ru8| SSH clone | Marketplace installation | "Failed to clone marketplace repository" ||
Bm8| HTTPS clone | Plugin installation (github/url sources) | "Failed to clone repository" |Marketplace clone (SSH):
Called from:
Plugin clone (HTTPS):
Called from plugin installation switch:
Neither function includes
--recurse-submodules, so submodules are left uninitialized.Suggested Fix
Add
--recurse-submodulesto both clone commands. With--depth 1, you may also want--shallow-submodulesfor efficiency:Alternatively, run
git submodule update --init --recursiveafter cloning, though this would require an additional process spawn.Workaround
Until fixed, users can manually initialize submodules after installation:
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This is still a required feature. Hopefully part of a broader support of git-based deployment patterns in CC, as also requested by https://github.com/anthropics/claude-code/issues/18659
Seems this was implemented in v2.1.7, according to #27251
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.