Silent crash on Windows when plugin autoupdate hits an orphaned installed_plugins.json entry
Summary
Claude Code crashes silently on Windows when the background plugin autoupdate hits an orphaned entry in installed_plugins.json whose cache directory has been removed. No error is printed to the terminal, no Windows Error Reporting event fires, and the crash repeats every 2-3 minutes for the lifetime of the orphan.
I hit this consistently for a full day before identifying it. Every fresh claude launch died within 2-3 minutes of activity (sometimes immediately on launch if the autoupdate timer was already due). Switching to claude --bare worked, which pointed at the plugin/skills layer.
Reproduction
- Install a plugin via the UI (any plugin from the official marketplace; I had
code-simplifier@claude-plugins-official) - Uninstall the plugin via the UI
- Manually delete the plugin's cache directory:
~/.claude/plugins/cache/<marketplace>/<plugin-name>/<version>/— this is the trigger. If the cache dir is gone but the registry entry in~/.claude/plugins/installed_plugins.jsonstill references that path, you have an orphan. (My orphan dir was already auto-marked with a.orphaned_atfile, suggesting Claude Code knew the dir was stale but kept the registry entry.) - Launch
claude --debug - Within ~2-3 minutes, the autoupdate timer fires
- Claude Code exits silently. Terminal is often left in a mangled state (mouse/focus escape codes printed as text).
Death signature in the debug log
The last lines before silence are exactly:
[API REQUEST] /v1/messages source=repl_main_thread ← user mid-task
Zip extraction completed: 358 files, 3766KB uncompressed ← autoupdate fired
Plugin autoupdate: checking installed plugins
← log ends, process exits
No exception, no [ERROR], no Node uncaught-rejection trace in the log file. Whatever throws during checking installed plugins propagates up uncaught and Node exits.
Workaround
Clear the orphan reference from all three locations:
~/.claude/plugins/installed_plugins.json— set"plugins"to{}~/.claude/settings.json— clear"enabledPlugins"to{}~/.claude.json— set"officialMarketplaceAutoInstalled"and"officialMarketplaceAutoInstallAttempted"tofalse(belt-and-suspenders so the autoupdate doesn't try to re-install the marketplace bundle)
After clearing, the same claude --debug runs cleanly indefinitely (verified ~24 hours stable).
Suggested fix
The plugin-check loop should treat a missing installPath (or a directory containing .orphaned_at) as skip + log warning, not an exception path. The current behavior turns user-side cleanup gaps into hard crashes.
A secondary improvement: when the autoupdate process detects an orphan, it could remove the registry entry automatically (or surface a one-line warning to the TUI on next render).
Environment
- OS: Windows 11 ARM64 (10.0.26200)
- Shell: PowerShell 7.6.1 inside Windows Terminal
- Node: v20.19.2 (x64, running under Windows ARM64 x64-emulation)
- Claude Code: 2.1.131 (npm-global at
~/AppData/Roaming/npm) - Plugins: all manually installed plugins were uninstalled via UI; only the marketplace bundle was auto-installed; one orphan registry entry remained
I had a stale Claude Code 2.1.19 install in a separate Node tree (nvm-for-windows) shadowing the newer one — but that wasn't related to the crash, just confusion. Cleaning up to a single 2.1.131 install made the diagnosis cleaner; didn't fix the crash.
Why this is worth fixing
The combination of "silent exit" + "fires every 2-3 minutes" + "no Windows event" + "intermittent recovery (orphan timer is fuzzy)" makes this look like a network/account/installation issue from the user's perspective. I went through 4 hours of network checks, version chasing, settings resets, and PowerShell upgrades before getting to the actual cause. A single warning log line at the orphan-detection step would have ended the investigation immediately.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗