Under the hood
Plugin preview cache now cleans up old preview trees instead of accumulating them
What
When Claude Code materializes a preview of a plugin, it now tracks how many previews have been made per source. Once a source passes a cap, the oldest preview trees are moved aside and deleted in the background. The code also guards against a caller trying to read a preview that is being pruned at the same time.
Why
This prevents plugin preview files from piling up on disk indefinitely, while avoiding errors if a preview is read at the same moment it's being cleaned up.