Skip to content

uninstall does not remove hooks/instructions from .claude/settings.local.json or .claude/CLAUDE.local.md #1731

Closed

Description

@marcoscale98

Description

graphify uninstall (and graphify claude uninstall) only look at .claude/settings.json and CLAUDE.md when removing the PreToolUse hook and the graphify instructions section. If a user has manually moved these into the .local variants — .claude/settings.local.json for the hook and .claude/CLAUDE.local.md for the instructions — so they aren't committed to the shared repo, uninstall silently leaves them in place.

I did this on purpose: I didn't want the graphify hook/instructions checked into the team repo, so I relocated what graphify install had written into the local-only files Claude Code supports. graphify uninstall has no knowledge of this location and doesn't clean it up.

Looking at graphify/__main__.py, _uninstall_claude_hook() only reads/writes project_dir / ".claude" / "settings.json", and claude_uninstall() only reads/writes project_dir / "CLAUDE.md". There's no reference anywhere in the repo to settings.local.json or CLAUDE.local.md, so this isn't a regression in a specific code path — the local-config case isn't handled at all, on either install or uninstall.

Suggested fix

  • graphify install should offer a way to target the .local files directly (e.g. a --local flag), instead of requiring users to relocate the content by hand.
  • graphify uninstall should check both the standard and .local locations for the hook and the instructions section, and clean up whichever is present.

Steps to reproduce

  1. Run graphify claude install in a project.
  2. Manually move the PreToolUse hook block from .claude/settings.json to .claude/settings.local.json, and the ## graphify section from CLAUDE.md to .claude/CLAUDE.local.md.
  3. Run graphify uninstall (or graphify claude uninstall).
  4. Observe: the hook stays in .claude/settings.local.json and the instructions stay in .claude/CLAUDE.local.md — uninstall reports "nothing to do" / removes nothing there.

Environment

  • Claude Code, Windows

Activity

  1. safishamsi commented on Jul 8, 2026

    @safishamsi
    Member

    Fixed on v8 (0d206cb, via #1733) — thanks for the precise repro. uninstall now cleans the hook from .claude/settings.local.json and the ## graphify section from both CLAUDE.local.md and .claude/CLAUDE.local.md, in addition to the standard files, and cleans whichever is present (verified through both graphify claude uninstall and the bare graphify uninstall). Closing the reported uninstall bug. Your other suggestion — an install --local flag to write directly to the local-only files — is a separate enhancement; open a fresh issue for it if you'd like it tracked.

  2. added a commit that references this issue on Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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