Skip to content

mgrep watch runs after uninstalling claude code plugin #147

@andrewsanchez

Description

@andrewsanchez

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

  1. Install mgrep as a Claude Code plugin
  2. Run mgrep uninstall-claude-code
  3. Start a new Claude Code session
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions