Plugin marketplace creates mangled directory in project root on Windows

Resolved 💬 5 comments Opened Mar 2, 2026 by matteo-michele-bianchini Closed Mar 6, 2026

Bug

Claude Code creates a plugins/marketplaces/claude-plugins-official/ clone inside the project working directory with a mangled Windows absolute path as the folder name:

C:Usersmatte.claudepluginsmarketplacesclaude-plugins-official/

This appears in git status as an untracked directory:

?? "C\357\200\272\357\201\234Users\357\201\234matte\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official/"

The directory contains a full clone of the official plugins repo (.git/, README.md, plugins/, external_plugins/, etc.).

Expected behavior

Plugin marketplace data should be stored in ~/.claude/plugins/marketplaces/, not as a mangled path in the project working directory.

Root cause

The file ~/.claude/plugins/known_marketplaces.json contains an OS-specific absolute Windows path as installLocation:

{
  "claude-plugins-official": {
    "source": {
      "source": "github",
      "repo": "anthropics/claude-plugins-official"
    },
    "installLocation": "C:\Users\matte\.claude\plugins\marketplaces\claude-plugins-official",
    "lastUpdated": "2026-03-20T09:25:04.861Z"
  }
}

This file is written by the VSCode extension (running on Windows) with a Windows absolute path. When Claude Code runs inside a Linux container (where ~/.claude is mounted from the host), it reads that installLocation, doesn't recognize it as an absolute path (no / prefix in Linux), and treats it as relative to the current working directory — creating the mangled folder in the project root.

Suggested fix

Claude Code should not store OS-specific absolute paths in known_marketplaces.json. Instead, it should either:

  • Use a path relative to ~/.claude/ (e.g., plugins/marketplaces/claude-plugins-official)
  • Resolve installLocation relative to the ~/.claude directory at runtime, regardless of what's stored in the file

Context

  • Using a devcontainer setup where ~/.claude inside the container is a Docker volume mounted from the Windows host
  • The VSCode extension (running on Windows) writes the known_marketplaces.json with Windows paths
  • Claude Code inside the Linux container reads those paths and interprets them as relative
  • The directory keeps recreating itself after deletion

Workaround

rm -rf C*/

Or in an entrypoint script, rewrite the paths before launching Claude Code:

sed -i 's|C:\\Users\\matte\\.claude|/home/dev/.claude|g' /home/dev/.claude/plugins/known_marketplaces.json 2>/dev/null

Environment

  • OS: Windows 11 Home 10.0.26200
  • IDE: VSCode with anthropic.claude-code extension
  • Devcontainer: Yes (node:20-slim, Claude Code installed via npm)
  • Date: 2026-03-02

View original on GitHub ↗

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