Originally created by: QY-25123
doberman setup / doberman install-hooks wires Claude Code's settings.json (project
.claude/settings.json and/or global ~/.claude/settings.json) with PreToolUse,
PostToolUse, and SessionStart hooks that shell out directly to the doberman binary, e.g.:
{ "type": "command", "command": "doberman hook pre" }
pip uninstall doberman-core removes the binary from PATH but has no mechanism to also strip
those hook entries — pip has no supported post-uninstall hook for arbitrary cleanup. The result:
every subsequent tool call in Claude Code tries to run doberman hook pre/post/
session-summary, the shell can't find it, and Claude Code reports command not found on
every single tool call, indefinitely, until the stale entries are removed by hand.
The documented fix (doberman uninstall-hooks) only works if you remember to run it before
uninstalling the package — once the binary is gone, so is the only command that can clean up
after it, and nothing warns the user this order matters.
pip install doberman-coredoberman setup (or doberman install-hooks)pip uninstall doberman-core (without first running doberman uninstall-hooks)doberman: command not found — permanently,settings.json.README.md and docs/SETUP.md thatdoberman uninstall-hooks must be run before pip uninstall doberman-core, since there isdoberman install-hooks/doberman setup detect and offer tocommand matches the doberman hook */doberman session-summary pattern but resolve toPATH), so re-installing repairs the settings file automatically instead ofdoberman doctor could detect this state (hook entries present, binary healthy)Related to [#250] (which is about gating a new doberman uninstall command behind auth) but
distinct: this is about the existing, undocumented ordering requirement between
doberman uninstall-hooks and pip uninstall, which currently has no guardrail and no clear
warning.
install-hooks must only ever remove Doberman's own previouslyuninstall-hooks) — never touch other tools'install-hooks run against a settings.json containing stale/orphaned Doberman hook entriesREADME.md/docs/SETUP.md.
Ticket changed by: fu351
Originally posted by: fu351
Status after today's merges: the docs half shipped in [#373] and the gated
doberman uninstallcommand shipped in [#375], both yours. Thanks again for a bug report that arrived with its own fix plan attached.What stays open here is the third piece of your proposal, the self-healing path:
install-hooks/setupdetecting orphaneddoberman hook *entries left by a broken uninstall and offering to clean them up, plusdoctorflagging the state. Relabeling this issue to that remainder. It's well-shaped follow-up work, and nobody knows this surface better than you right now.Related
Tickets:
#373Tickets:
#375