[BUG] Plugin GUI installer fails with EEXIST when ~/.claude/plugins/cache already exists
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
- Install any plugin via the Claude Code GUI (e.g.
serenafromclaude-plugins-official) - Successfully install —
~/.claude/plugins/cacheis created - Try to install any other plugin via GUI
- 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
~/.claudeis 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗