[Bug] Project-scoped plugins active outside projectPath directory
Bug Description
Title: Plugins with scope: "project" are active outside their projectPath
Description:
Plugins installed with scope: "project" (or scope: "local") and a specific projectPath are
loaded and active even when Claude Code is launched from a directory that is not a
subdirectory of projectPath.
Steps to reproduce:
- cd ~/movie-ratings
- Install a plugin with project scope (e.g. supabase, vercel) via the /mcp plugin manager
dialog
- Verify in ~/.claude/plugins/installed_plugins.json that the plugin has "scope": "project"
and "projectPath": "/Users/<user>/movie-ratings"
- cd ~ (home directory, which is the parent of movie-ratings)
- Launch claude
- Observe that the plugin's MCP server is running and all its tools are available
Expected behavior:
Plugins with scope: "project" and projectPath: "/Users/<user>/movie-ratings" should only be
active when the working directory is /Users/<user>/movie-ratings or its subdirectories.
Actual behavior:
The MCP servers are started and all tools are callable from any directory, including parent
directories. This means:
- Unnecessary MCP server processes are running
- Extra tools are loaded into the context window
- Risk of accidentally invoking project-specific actions (e.g. database migrations,
deployments) from the wrong directory
Example from installed_plugins.json:
"supabase@claude-plugins-official": [
{
"scope": "project",
"projectPath": "/Users/user/movie-ratings",
...
}
],
"vercel@claude-plugins-official": [
{
"scope": "project",
"projectPath": "/Users/user/movie-ratings",
...
}
]
Both are active when working directory is /Users/user (home).
Environment Info
- Platform: darwin
- Terminal: tmux
- Version: 2.1.87
- Feedback ID: 2e7ba3bb-ed00-406b-9d22-5e9378649d11
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/t.basuev/.local/share/claude/versions/2.1.87 (expected in multi-process scenarios)\n at _p_ (/$bunfs/root/src/entrypoints/cli.js:2851:2138)\n at Vn6 (/$bunfs/root/src/entrypoints/cli.js:2851:1218)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-31T14:46:35.011Z"},{"error":"Error: ripgrep exited with code null\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:648:2638)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-31T14:46:46.304Z"},{"error":"Error: ripgrep exited with code null\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:648:2638)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-31T14:47:05.167Z"},{"error":"MaxFileReadTokenExceededError: File content (14210 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at gK9 (/$bunfs/root/src/entrypoints/cli.js:4281:5251)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-31T14:48:14.278Z"},{"error":"Error: ripgrep exited with code null\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:648:2638)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-31T14:49:07.769Z"},{"error":"Error: ripgrep exited with code null\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:648:2638)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-31T14:50:06.290Z"},{"error":"Error: ripgrep exited with code null\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:648:2638)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-31T14:52:40.377Z"},{"error":"Error: ripgrep exited with code null\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:648:2638)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-31T14:56:00.677Z"}]This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗