What
When Claude Code removes plugins, whether by removing a whole marketplace or uninstalling plugins by author, it now checks whether a removed plugin's name (matched case-insensitively) is also used by another still-installed plugin in a different scope. Those plugin ids are collected into a new sharedDataDirPluginIds set and returned alongside the usual orphaned paths and removed plugin ids.
Previously, every removed plugin's on-disk data directory was deleted unconditionally. Now, if a removed plugin's id is in sharedDataDirPluginIds, its data directory is left alone instead of being deleted.
Why
Two plugins with the same name in different scopes could previously lose their shared data when only one of them was removed. This change avoids destroying data that another still-installed, same-named plugin still needs.