I noticed mgrep logs in /tmp after uninstalling the plugin. I had Claude code investigate:
Bug
After running mgrep uninstall-claude-code, the plugin's cached hooks at ~/.claude/plugins/cache/Mixedbread-Grep/ are not removed. This causes mgrep_watch.py to keep firing on every new Claude Code session, spawning mgrep watch processes and accumulating log files in /tmp/mgrep-watch-command-{session_id}.log.
Root Cause
src/install/claude-code.ts only calls claude plugin uninstall mgrep, which removes the plugin from the active config but does not delete the cached hook files. Compare with droid.ts which properly cleans up its hooks directory and settings during uninstall.
Steps to Reproduce
- Install mgrep as a Claude Code plugin
- Run
mgrep uninstall-claude-code
- Start a new Claude Code session
- Observe
/tmp/mgrep-watch-command-*.log files still being created
Expected Behavior
Uninstall should remove ~/.claude/plugins/cache/Mixedbread-Grep/ (or equivalent) so hooks stop firing.
Suggested Fix
Add cache directory cleanup to the Claude Code uninstall function in src/install/claude-code.ts, similar to how droid.ts handles its cleanup.
I noticed mgrep logs in
/tmpafter uninstalling the plugin. I had Claude code investigate:Bug
After running
mgrep uninstall-claude-code, the plugin's cached hooks at~/.claude/plugins/cache/Mixedbread-Grep/are not removed. This causesmgrep_watch.pyto keep firing on every new Claude Code session, spawningmgrep watchprocesses and accumulating log files in/tmp/mgrep-watch-command-{session_id}.log.Root Cause
src/install/claude-code.tsonly callsclaude plugin uninstall mgrep, which removes the plugin from the active config but does not delete the cached hook files. Compare withdroid.tswhich properly cleans up its hooks directory and settings during uninstall.Steps to Reproduce
mgrep uninstall-claude-code/tmp/mgrep-watch-command-*.logfiles still being createdExpected Behavior
Uninstall should remove
~/.claude/plugins/cache/Mixedbread-Grep/(or equivalent) so hooks stop firing.Suggested Fix
Add cache directory cleanup to the Claude Code uninstall function in
src/install/claude-code.ts, similar to howdroid.tshandles its cleanup.