[BUG] Plugin GUI installer fails with EEXIST when ~/.claude/plugins/cache already exists

Resolved 💬 3 comments Opened Mar 11, 2026 by MELSAID888 Closed Mar 14, 2026

Summary

Plugin installation via the GUI always fails with EEXIST: file already exists, mkdir 'C:\Users\<user>\.claude\plugins\cache' when the cache directory already exists from a previous install.

Root Cause

The installer calls fs.mkdirSync(cacheDir) without { recursive: true }. This throws EEXIST if the directory already exists, instead of silently succeeding.

One-line fix:

// Current (broken):
fs.mkdirSync(cacheDir)

// Fixed:
fs.mkdirSync(cacheDir, { recursive: true })

Steps to Reproduce

  1. Install any plugin via the Claude Code GUI (e.g. serena from claude-plugins-official)
  2. Successfully install — ~/.claude/plugins/cache is created
  3. Try to install any other plugin via GUI
  4. Error: Failed to install: EEXIST: file already exists, mkdir '...\.claude\plugins\cache'

This means the GUI plugin installer permanently breaks after the first install. Every subsequent install fails.

Environment

  • Claude Code version: 2.1.63
  • OS: Windows 11 (MSYS/bash shell)
  • Affected: All users where ~/.claude is on a synced drive (e.g. OneDrive) that recreates deleted directories immediately — but also reproducible on any system after the first plugin install

Verified

Reproduced the exact error in Node.js (same runtime):

const fs = require('fs');
const path = require('path');
const os = require('os');
const cacheDir = path.join(os.homedir(), '.claude', 'plugins', 'cache');
fs.mkdirSync(cacheDir); // → EEXIST if dir already exists
mkdir error: EEXIST EEXIST: file already exists, mkdir 'C:\Users\mahmo\.claude\plugins\cache'

Workaround

Users can delete ~/.claude/plugins/cache before each GUI install, but this is impractical (especially on OneDrive where the directory is immediately re-synced). MCP servers can be installed via claude mcp add CLI which is unaffected.

View original on GitHub ↗

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