[BUG] In-session plugin install (and /reload-plugins) does not refresh the Bash tool PATH — plugin bin/ commands unavailable until a new session
Summary
The plugins reference documents that files in a plugin's bin/ are "invokable as bare commands in any Bash tool call while the plugin is enabled." This holds only for sessions started after the plugin was installed: the Bash tool's PATH (one ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/bin entry per enabled plugin) is computed at session start and never refreshed. Installing a plugin from inside a running session — the natural first-install flow (/plugin → install → try it) — leaves that session unable to run the plugin's executables, with a plain "command not found". /reload-plugins reports success and activates skills/hooks, but does not add the new plugin's bin/ to the tool PATH either.
The failure is confusing to diagnose because everything else works: hooks run fine (they are separate processes launched with fresh config and ${CLAUDE_PLUGIN_ROOT}), the skill loads, /plugin shows the plugin enabled — only the documented bare-command invocation fails, and only in the session the install happened in.
Reproduction
- In a running session (CLI or Desktop), install any plugin that ships
bin/<tool>(e.g. via/plugin), or run/reload-pluginsafter an external install. - In the same session:
<tool>→command not found;echo $PATH | tr ':' '\n' | grep plugins→ no entry for the new plugin. - Start a new session:
<tool>resolves; the PATH entry is present.
The freeze also works in reverse, which confirms the mechanism: in a session started while the plugin was installed, uninstall the plugin (twice, in our test) — the session's PATH keeps the now-stale bin/ entry throughout.
Expected
The session that installs (or reloads) a plugin can run its bin/ executables as bare commands, per the documented behavior — or at minimum, /reload-plugins refreshes the tool PATH along with skills and hooks, and the install flow tells the user a new session is needed.
Environment
- Claude Code 2.1.227 (macOS, native install); also observed in a Claude Desktop session on a second machine, where the first-install-then-use flow produced the "command not found" and the model hand-built a PATH shim to recover.
- Plugin installed from a git marketplace at user scope; versioned cache layout (
~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/).
Workaround
Plugin-side: reference executables as ${CLAUDE_PLUGIN_ROOT}/bin/<tool> in skill content (the placeholder substitutes there), and document "start a new session after installing".
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗