Plugin install fails with EXDEV when ~/.claude and /tmp are on different filesystems

Status Open
Maintainer reply None cached
Activity 6 comments · opened Jan 14, 2026

Description

When installing a plugin from a marketplace, the installation fails with an EXDEV: cross-device link not permitted error if the user's ~/.claude directory and /tmp are on different mount points/filesystems.

Steps to Reproduce

  1. Have a system where ~/.claude and /tmp are on different filesystems (e.g., /tmp on tmpfs, home on ext4/btrfs)
  2. Add a marketplace: /plugin marketplace add pmatos/badminton-cli
  3. Install a plugin: /plugin install badminton-cli@badminton-cli

Expected Behavior

Plugin installs successfully.

Actual Behavior

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

Environment

  • OS: Linux (Arch Linux 6.18.1)
  • Shell: zsh

Analysis

The error occurs because rename() syscall cannot move files across different filesystems. The code likely uses fs.rename() which fails with EXDEV in this case.

The fix would be to fall back to copy + delete when EXDEV is encountered, or use a temp directory on the same filesystem as the target.

Workaround

Users can work around this by cloning the repo locally and installing from the local path:

git clone https://github.com/user/plugin-repo.git /tmp/plugin

Then in Claude Code:

/plugin install /tmp/plugin/claude-plugin --scope user

View original on GitHub ↗

6 Comments

dlecan · 7 months ago

Same issue here
Thank you @pmatos for the workaround

bendavis78 · 7 months ago

The suggested workaround /plugin installl <path> does not work b/c you get the error "Marketplace <path> not found"

dannycoates · 6 months ago

If you name your marketplace something different than the plugin itself in marketplace.json that should also fix this problem. Something like:

{
  "name":"badminton-cli-dev",
 //...
}
dlecan · 6 months ago

I found this workaround:

Set TMPDIR to a directory on the same filesystem as ~/.claude just when installing a plugin:

mkdir -p ~/.claude/tmp
TMPDIR="$HOME/.claude/tmp" claude plugin install <marketplace>@<plugin>

Note: CLAUDE_CODE_TMPDIR does not work for this — the plugin installer doesn't use it.

reski-rukmantiyo · 5 months ago

hi all, does it works with claude desktop for mac?

psohm · 2 months ago

For those on WSL (or any system where /tmp is on a different filesystem than ~), the TMPDIR workaround gets past the EXDEV error, but the plugin still silently fails to load because installPath points into the cache and Claude Code doesn't pick it up from there.

Two-step fix that worked for me:

1. Set TMPDIR before installing

mkdir -p ~/.claude/tmp
export TMPDIR="$HOME/.claude/tmp"
claude

Then in the Claude Code session:

/plugin install understand-anything

2. Create a symlink so Claude Code finds the plugin

mkdir -p ~/.claude/plugins/understand-anything
ln -s ~/.claude/plugins/cache/understand-anything/understand-anything/2.7.7 ~/.claude/plugins/understand-anything/understand-anything