Plugin installation fails with EXDEV error when /tmp and /home are on different filesystems
Resolved 💬 3 comments Opened Jan 23, 2026 by shacea Closed Jan 26, 2026
Bug Description
Plugin installation fails with EXDEV: cross-device link not permitted error when /tmp and /home directories are mounted on different filesystems/partitions.
Error Message
Error: Failed to install: EXDEV: cross-device link not permitted, rename '/home/work/.claude/plugins/cache/claude-ultimate-hud' -> '/tmp/claude-plugin-temp-1769151835954'
Environment
- OS: Linux 5.15.0-124-generic (Ubuntu)
- Claude Code Version: Latest
- Filesystem Setup:
/tmpand/homeare on separate partitions
Steps to Reproduce
- Have a Linux system where
/tmpand/homeare on different filesystems - Run
/plugin install claude-ultimate-hud(or any plugin) - Observe the EXDEV error
Root Cause
The rename() system call in Linux only works within the same filesystem. When attempting to move files between /home/work/.claude/plugins/cache/ and /tmp/, the operation fails because they're on different mount points.
Suggested Fix
Instead of using rename() directly, implement a fallback mechanism:
- Try
rename()first (fast path for same filesystem) - If
EXDEVerror occurs, fall back tocopy + deleteoperation
Example pseudocode:
try {
await fs.rename(src, dest);
} catch (err) {
if (err.code === 'EXDEV') {
await fs.copyFile(src, dest);
await fs.unlink(src);
} else {
throw err;
}
}
Current Workaround
Setting TMPDIR environment variable to a directory on the same filesystem as ~/.claude:
mkdir -p ~/.cache/tmp
export TMPDIR="$HOME/.cache/tmp"
claude
Impact
This affects users with:
- Separate
/tmppartition (common security practice) /tmpmounted as tmpfs- Enterprise Linux setups with separate partition layouts
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗