Plugin marketplace updater creates stray directory in CWD on WSL2 due to Windows-style path in git clone
Summary
When Claude Code updates the plugin marketplace on WSL2, it runs git clone with a Windows-style backslash path as the destination. Since WSL2 uses Linux path semantics (where \ is not a path separator), git interprets the Windows path as a literal directory name and creates it relative to the current working directory instead of at the intended absolute location.
Environment
- OS: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
- Platform: Windows + WSL2
What happened
A directory named literally C:\Users\jwa\.claude\plugins\marketplaces\claude-plugins-official was created inside my project directory (~/task-system/) — wherever Claude Code happened to be running at the time.
The directory was a full git clone of git@github.com:anthropics/claude-plugins-official.git, identical to the correctly-placed clone at ~/.claude/plugins/marketplaces/claude-plugins-official/.
Root cause
The plugin marketplace updater constructs the destination path using Windows path semantics (C:\Users\...\claude-plugins-official), then passes it to git clone executed in a WSL bash shell. In Linux, \ is a valid filename character, so git treats the entire Windows path string as a relative directory name and creates it under the current working directory.
Steps to reproduce
- Run Claude Code in WSL2 with plugins enabled (e.g.,
superpowers@claude-plugins-official) - Trigger a marketplace update (e.g., on session start)
- Observe a directory named
C:\Users\<username>\.claude\plugins\marketplaces\claude-plugins-officialcreated in whatever directory Claude Code was launched from
Expected behavior
The marketplace repo should be cloned to ~/.claude/plugins/marketplaces/claude-plugins-official (using the Linux path), not to a Windows-style path interpreted as a relative directory name.
Suggested fix
When running on WSL2, path construction for plugin/marketplace directories should use Linux-style paths (e.g., via wslpath conversion or by detecting the WSL environment and using $HOME instead of C:\Users\...).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗