Plugin install fails with EXDEV on systems where /home and /tmp are on different filesystems

Resolved 💬 3 comments Opened Jan 23, 2026 by selcukcift Closed Jan 27, 2026

Bug Description

Plugin installation fails with EXDEV: cross-device link not permitted when the user's home directory and /tmp reside on different filesystems. The installer attempts to rename() a directory from the plugin cache (~/.claude/plugins/cache/) to /tmp/, which fails because rename() cannot operate across mount points.

Steps to Reproduce

  1. Use a system where /home and /tmp are on different filesystems (e.g., /home on btrfs/ext4, /tmp on tmpfs)
  2. Run: /plugin install everything-claude-code@everything-claude-code

Error Output

Error: Failed to install: EXDEV: cross-device link not permitted, rename
'/home/user/.claude/plugins/cache/everything-claude-code' ->
'/tmp/claude-plugin-temp-1769161541016'

Expected Behavior

Plugin installation should succeed regardless of filesystem layout. The installer should handle cross-device moves gracefully (e.g., copy + delete instead of rename()).

Environment

  • OS: Fedora Kinoite / Aurora (ublue-os), immutable OSTree-based
  • Filesystem layout:
  • /home → btrfs (physical disk, /dev/nvme0n1p3)
  • /tmp → tmpfs (RAM-based)
  • Claude Code version: Latest (installed via npm)
  • Architecture: x86-64

Affected Systems

This likely affects all Linux distributions where /tmp is a tmpfs mount, which is common on:

  • Fedora (all variants, immutable and traditional)
  • Arch Linux (default systemd tmpfs)
  • NixOS
  • Any system using tmp.mount systemd unit

Workaround

Set TMPDIR to a path on the same filesystem as ~/.claude/ before starting Claude Code:

mkdir -p ~/.cache/claude-tmp
export TMPDIR=~/.cache/claude-tmp
claude

Root Cause

Node.js fs.rename() uses the POSIX rename() syscall which returns EXDEV when source and destination are on different devices. The fix is to detect this error and fall back to a copy-then-remove strategy (e.g., using fs-extra's move() or manual recursive copy + rmdir).

View original on GitHub ↗

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