Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save another-guy/0efef0278efb3f2d068e1a89a2ef6bcd to your computer and use it in GitHub Desktop.

Select an option

Save another-guy/0efef0278efb3f2d068e1a89a2ef6bcd to your computer and use it in GitHub Desktop.
Prompt: diagnose the macOS plugin-does-not-persist issue
# Prompt: diagnose the macOS plugin-does-not-persist issue
Paste everything below the line into Claude Code on the macOS machine.
---
The kyrio plugin does not survive a restart on this Mac. Every time I quit Claude Code
and reopen it, the plugin is gone or switched off. The same plugin, from the same
marketplace, stays installed and enabled across restarts on two Windows machines.
Find the root cause and fix it for good.
Do not guess and do not just reinstall. Diagnose from evidence: compare the on-disk
state before and after a restart, and tell me which file changed.
HOW PLUGIN STATE IS STORED (verified on a working Windows machine)
~/.claude/settings.json enabledPlugins["kyrio@kyrio"]: true,
and extraKnownMarketplaces.kyrio
~/.claude/plugins/known_marketplaces.json the marketplace + its installLocation
~/.claude/plugins/installed_plugins.json installPath, version, gitCommitSha
~/.claude/plugins/marketplaces/kyrio/ git checkout of the marketplace
~/.claude/plugins/cache/kyrio/kyrio/<ver>/ the plugin files actually loaded
~/.claude/plugins/blocklist.json plugins Claude Code refuses to load
~/.claude/plugins/.last_inuse_sweep the sweep that deletes unused caches
On the working machine the marketplace source is:
{ "source": "git", "url": "https://github.com/another-guy/kyrio.git" }
If this Mac has a local filesystem path there instead, say so.
Enablement and installation are different failures. settings.json is enablement.
installed_plugins.json plus cache/ is installation. Tell me which one I lose.
STEP 1 - SNAPSHOT
Write ~/kyrio-plugin-snapshot.sh that prints, with no interpretation:
- full contents of settings.json, known_marketplaces.json, installed_plugins.json,
blocklist.json; and the size and mtime of ~/.claude.json
- ls -la@ of ~/.claude, ~/.claude/plugins, ~/.claude/plugins/cache/kyrio,
~/.claude/plugins/marketplaces/kyrio
- for each of those paths: is it a symlink, and where does it point
- owner, group, mode of ~/.claude/settings.json and ~/.claude/plugins/*.json
- xattr -l ~/.claude/settings.json (iCloud and quarantine attrs show up here)
- echo $CLAUDE_CONFIG_DIR ; echo $HOME ; which -a claude ; claude --version
- whether /Library/Application Support/ClaudeCode/managed-settings.json or
~/Library/Application Support/ClaudeCode/managed-settings.json exists, plus contents
- git -C ~/.claude/plugins/marketplaces/kyrio log --oneline -1
- git -C ~/.claude/plugins/marketplaces/kyrio status --short
- whether the gitCommitSha in installed_plugins.json is reachable in that checkout
Run it into ~/kyrio-snap-A.txt.
STEP 2 - RESTART
Stop. Tell me to quit Claude Code completely and reopen it. Do not continue until I
confirm I have.
STEP 3 - SNAPSHOT AGAIN AND DIFF
Run the same script into ~/kyrio-snap-B.txt, then diff A against B. The diff is the
finding. If nothing changed on disk, then the state is fine and the problem is in what
Claude Code reads, not what it writes - check $HOME, $CLAUDE_CONFIG_DIR, and which
claude binary actually launched.
RULE IN OR OUT EXPLICITLY (these are the macOS-only candidates)
- ~/.claude/settings.json is a symlink into a dotfiles repo, and stow / chezmoi / a
shell profile rewrites it
- CLAUDE_CONFIG_DIR or HOME differ depending on how I launch Claude Code (Terminal
vs iTerm vs VS Code vs Spotlight). GUI launches do not read ~/.zshrc
- more than one claude binary installed (npm global, Homebrew, native installer)
- managed-settings.json overriding enabledPlugins
- ~/.claude sits inside iCloud Drive or another synced folder, so files are evicted
or reverted
- the in-use sweep is deleting cache/kyrio/kyrio/<version>
- ~/.claude was copied from a Windows machine, so installed_plugins.json holds
Windows paths that do not exist here
- settings.json is invalid JSON at startup, so it is ignored and rewritten
- the recorded gitCommitSha is no longer reachable in the marketplace checkout
STEP 4 - FIX
Fix the cause you proved, not the symptom. If the fix is a change to this machine (a
path, a permission, a shell profile, a launcher), tell me exactly what you changed and
why. If the fix belongs in the kyrio repository itself, say so and stop - I will make
that change there.
STEP 5 - PROVE IT
Have me quit and reopen once more. Re-run the snapshot and confirm: kyrio is present in
installed_plugins.json, true in settings.json, and `kyrio help` answers.
FINAL REPORT
Which file lost the plugin, what wrote or deleted it, why it happens only on macOS, and
what you changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment