claude-code - 💡(How to fix) Fix Desktop app generates a new plugin hash dir on every remote SSH connection — plugins re-upload each time and accumulate indefinitely [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55977Fetched 2026-05-05 06:01:22
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

Error Message

Error Messages/Logs

Root Cause

  1. Slow handshake on every connect — UI sits at "Setting up plugins…" while the same plugin tarball uploads again.
  2. Plugin dir growth is unbounded — naive cleanup is not safe because the live CLI process holds the most recent dir open.
  3. Stacked --serve processes — when a reconnect happens before the previous server's connection cleanup, multiple ~/.claude/remote/server --serve processes stack up trying to bind the same rpc.sock. Saw 3 simultaneously after rapid reconnects; the desktop app's handshake then hung indefinitely.
  4. Stalled uploads leave partial tarballs — partial tar.gz files sit in the plugins dir after a failed handshake; nothing cleans them up.
  5. CLI re-download — on first install, the 247MB CLI archive downloaded from downloads.claude.ai repeatedly because the install logic didn't recognize the cached file as valid. Three concurrent --install processes ran for 5–16 minutes each.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Summary

When using the Claude Code Windows desktop app to connect to a remote SSH server, the app creates a fresh hash-named directory under ~/.claude/remote/plugins/ on every single connection — even when reconnecting to the same workspace path. Each new dir triggers a full re-upload of the same plugin tarballs and a fresh "Setting up plugins…" step. Over a single day's worth of normal reconnects this accumulated to 30 identical copies of [email protected] in my remote plugins dir.

Environment

  • Desktop app: Claude Code for Windows (please add your version — Settings → About)
  • Remote server CLI: 2.1.121 (from ~/.claude/remote/ccd-cli/)
  • Remote OS: CloudLinux 8.10, kernel 4.18.0-553.111.1.lve.el8.x86_64, x86_64
  • CloudLinux CageFS: present (per-user filesystem isolation)
  • Connection: standard OpenSSH with key auth as user claudeadmin
  • Workspace: same folder on every reconnect (/home/<sitename>/public_html)

Steps to reproduce

  1. From the Windows desktop app, open a remote workspace at a path on the SSH server.
  2. Wait for plugins setup to complete and the CLI session to start.
  3. Disconnect the desktop app.
  4. Reconnect to the same folder.
  5. Observe ~/.claude/remote/plugins/ on the server.

Expected

  • Plugin install location is keyed deterministically (e.g., on workspace path or plugin identity) so reconnections reuse the existing dir and skip "Setting up plugins…".

Actual

  • Each reconnect creates a brand-new hash dir, e.g. (real hashes from one user's day):

ad26ee25d8e8af15 [email protected] 2026-05-04 19:48 53f66aa16b83d141 [email protected] 2026-05-04 20:22 440ab60d659c62c9 [email protected] 2026-05-04 20:25 (partial — failed) 327c7c5d80e50417 [email protected] 2026-05-04 20:29

  • All four were created reconnecting to the same workspace path.
  • Each new connect causes a fresh ~516KB plugin tarball upload + extraction.
  • Over hours of normal use, ~30 duplicate dirs accumulated, all containing the same anthropic-skills v1.0.0.

Downstream issues observed

  1. Slow handshake on every connect — UI sits at "Setting up plugins…" while the same plugin tarball uploads again.
  2. Plugin dir growth is unbounded — naive cleanup is not safe because the live CLI process holds the most recent dir open.
  3. Stacked --serve processes — when a reconnect happens before the previous server's connection cleanup, multiple ~/.claude/remote/server --serve processes stack up trying to bind the same rpc.sock. Saw 3 simultaneously after rapid reconnects; the desktop app's handshake then hung indefinitely.
  4. Stalled uploads leave partial tarballs — partial tar.gz files sit in the plugins dir after a failed handshake; nothing cleans them up.
  5. CLI re-download — on first install, the 247MB CLI archive downloaded from downloads.claude.ai repeatedly because the install logic didn't recognize the cached file as valid. Three concurrent --install processes ran for 5–16 minutes each.

Suggested fix direction

  • Hash plugin install dirs by (plugin_source, version) (or workspace + plugin), not by per-connection state.
  • Before spawning a new --serve, check for and reuse an existing one.
  • After successful install, clean stale partial tarballs and dirs older than the active one.

What Should Happen?

  • Hash plugin install dirs by (plugin_source, version) (or workspace + plugin), not by per-connection state.
  • Before spawning a new --serve, check for and reuse an existing one.
  • After successful install, clean stale partial tarballs and dirs older than the active one.

Error Messages/Logs

Steps to Reproduce

see summary

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

latest

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be resolved by modifying the plugin installation directory hashing to use a deterministic key, such as the plugin source and version, instead of per-connection state.

Guidance

  • Modify the plugin installation directory hashing to use a deterministic key, such as (plugin_source, version) or (workspace + plugin), to prevent the creation of duplicate directories on each reconnect.
  • Implement a check to reuse an existing --serve process before spawning a new one to prevent stacked processes and indefinite hangs.
  • Clean up stale partial tarballs and directories older than the active one after a successful install to prevent unbounded directory growth and stalled uploads.

Example

No code snippet is provided as the issue does not contain sufficient information about the codebase.

Notes

The suggested fix direction provided in the issue report is a good starting point, but the actual implementation may vary depending on the codebase and requirements. Additionally, the issue report mentions that this was a regression, but the last working version is not specified.

Recommendation

Apply the suggested fix direction to modify the plugin installation directory hashing and implement the necessary checks and cleanups to prevent the observed issues. This should resolve the problem and prevent future occurrences.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Desktop app generates a new plugin hash dir on every remote SSH connection — plugins re-upload each time and accumulate indefinitely [2 comments, 2 participants]