{{ message }}
fix(uninstall): remove the mode flag from every host state dir - #788
Open
Soumyadip2003-AI wants to merge 1 commit into
Open
fix(uninstall): remove the mode flag from every host state dir#788Soumyadip2003-AI wants to merge 1 commit into
Soumyadip2003-AI wants to merge 1 commit into
Conversation
hooks/ponytail-runtime.js writes .ponytail-active beside each host's own state — Codex $PLUGIN_DATA, Copilot $COPILOT_PLUGIN_DATA, Qoder ~/.qoder — but scripts/uninstall.js only ever deleted ~/.claude/.ponytail-active. On those hosts the flag survives uninstall, so ponytail is still reported active after the plugin files are gone. Uninstall runs from a plain shell where those host env vars are usually unset, so resolving one path the way the runtime does is not enough: sweep every location ponytail writes to instead. Repro (before this change): QODER_SESSION_ID=x node hooks/ponytail-activate.js # writes ~/.qoder/.ponytail-active node scripts/uninstall.js ls ~/.qoder/.ponytail-active # still there Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T6gVj3n5kq5HFGqw7uvoPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
scripts/uninstall.jsonly deletes~/.claude/.ponytail-active, but that is not where most hosts keep it.hooks/ponytail-runtime.jswrites the flag beside each host's own state:getClaudeDir()(~/.claude)$PLUGIN_DATA$COPILOT_PLUGIN_DATA~/.qoderOn Codex, Copilot and Qoder the mode flag therefore survives uninstall. The statusline still reads it, and a later reinstall picks up a stale mode instead of starting from the configured default.
Repro (before this change)
Same result with
PLUGIN_DATA(Codex) andCOPILOT_PLUGIN_DATA(Copilot).Fix
Sweep every location ponytail writes to, instead of resolving one.
Uninstall runs from a plain shell where
PLUGIN_DATA/COPILOT_PLUGIN_DATA/QODER_SESSION_IDare usually unset, so importing the runtime's already-resolvedstatePathwould just resolve back to~/.claude— it has to check all four.removeIfExistsalready swallowsENOENT, so dirs that don't exist cost nothing.Scope kept deliberately narrow: only
.ponytail-active. The.ponytail-statusline-nudgedflag is the same class of leak but is already covered by #680, so this doesn't touch it.Verification
Full suite is unchanged (
node --test tests/*.test.js): 83 pass, 1 pre-existing failure incsv: correct pandas one-liner passes, which is a local pandas/numpy install issue and is unrelated to this change.The existing test now also seeds a Qoder flag (
~/.qoder) and a Codex flag ($PLUGIN_DATA) and asserts both are gone.