[BUG] can not add marketplace on windows
Resolved 💬 16 comments Opened Nov 23, 2025 by beinimaliesi Closed Jun 25, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
when I add https://github.com/anthropics/skills to marketplace,
Whether it is administrative or non-administrative privileges,it show
Failed to finalize marketplace cache. Please manually delete the directory at │
│ C:\Users\user\.claude\plugins\marketplaces\anthropic-agent-skills if it exists and try again. │
│ │
│ Technical details: EPERM: operation not permitted, rename │
│ 'C:\Users\user\.claude\plugins\marketplaces\temp_1763871766120' -> │
│ 'C:\Users\user\.claude\plugins\marketplaces\anthropic-agent-skills'
What Should Happen?
success install marketplace
Error Messages/Logs
│
│ Failed to finalize marketplace cache. Please manually delete the directory at C:\Users\user\.claude\plugins\marketplaces\anthropic-agent-skills if it exists and try again. │
│ │
│ Technical details: EPERM: operation not permitted, rename 'C:\Users\user\.claude\plugins\marketplaces\temp_1763872315800' -> 'C:\Users\user\.claude\plugins\marketplaces\anthropic-agent-skills'
Steps to Reproduce
env
Cludea Version: 2.0.50 (Claude Code)
Machine: Windows 11 Professional 25H2
Powershell
- claude
- /plugin
- Addmarket Plauce
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.50 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
16 Comments
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
yes its still occuring
yes, the issue still exists in the newest version
it's still occuring in claude code v2.1.23
but only when installing superpowers plugin in claude-plugins-official marketplace
Open PowerShell in
C:\Users\<user>\.claude\plugins, run claude to enter the Claude interface, then perform the operation.I'm getting a similar issue, but only in Cowork for some reason
version2.1.62, This problem still exists.
2.1.68 (Claude Code) still exists
It still occurs (v2.1.70 ) when adding the superpowers marketing place.
#31433
Yes, just need to trust the folder.
This issue still occurs on Windows 11 Pro (10.0.26200) with Claude Code latest version (April 2026).
Tried:
.claudefolder to Windows Defender exclusion (Add-MpPreference -ExclusionPath)~/.claude/pluginsdirectoryThe root cause seems to be the
renameoperation on Windows NTFS. A possible fix could be to usecopy + deleteinstead ofrename, or clone directly to the final directory name to avoid the rename step entirely.Additional root cause details from independent investigation
I hit this same bug on Windows 10 + CC 2.1.101 and traced it further. There are actually two layered failure modes in the rename dance:
1. EPERM: stale
.bak/blocking rename (same as reported here)The updater does: live → .bak, staging → live. If
.bak/already exists from a prior failed attempt, Windowsfs.rename()returns EPERM (can't rename over existing directory). The rollback path also fails for the same reason. Once wedged, every subsequent update fails permanently.Fix: Delete the stale
.bak/directory manually.2. EACCES: read-only git pack files blocking
fs.rm()Even after fixing #1, the next session re-wedges because the updater can't
rmthe live marketplace directory. The shallow git clone creates pack files with read-only permissions (-r--r--r--):Node's
fs.rm()fails with EACCES on read-only files on Windows unless called with{ recursive: true, force: true }. Bashrm -rfhandles this fine (it strips the read-only attribute first).Fix: Delete the
.git/directory inside the marketplace dir before running update, OR fix the Node code to usefs.rm(path, { recursive: true, force: true }).Permanent workaround
Filed separately as #46830 before finding this issue — that one has the full trace and a second comment with the EACCES details.
Adding a data point from Windows 11 Enterprise 25H2 with corporate endpoint protection (Carbon Black), Claude Code 2.x, April 2026 — same error as the original report:
Still reproducing on latest. Manual
rm -rfon the stagingtemp_*+ target dir + retry is currently the only workaround for enterprise users.Failure mode not yet called out in this thread: corporate AV real-time scanners
Prior analysis in the thread (and in #46830) covers persistent-state failures — stale
.bak/, read-only git pack files, existing destination dir. But there's a distinct transient-lock class that appears to be the reason this bug is roughly 100% reproducible on enterprise Windows workstations and near-0% on home dev machines (which may explain why it's been hard to repro internally):Corporate EDR/AV scanners — Carbon Black, CrowdStrike, SentinelOne, Defender for Endpoint with real-time protection on — open handles on every newly-written file during their post-write scan. When Claude Code writes a marketplace staging dir full of small JSON/manifest files and then immediately calls
fs.renameSync()to finalize, Windows returnsEPERMbecause the scanner still has one of those files open — even though the destination path is clean and nothing else is competing.Symptoms specific to this class:
Add-MpPreference -ExclusionPath "$env:USERPROFILE\.claude"often doesn't fix it (many corporate AVs either don't honor user exclusions or scan the source of the copy anyway).Suggested fix
Defense in depth, in order of effort:
1. Retry with exponential backoff on
EPERM/EBUSYrename (smallest change, biggest coverage — locks clear within 2–3s):2. Clean up orphan
temp_*staging dirs on everymarketplace add/updateinvocation. Prevents the "each retry creates temp_N+1 while temp_1..N are still there" spiral multiple commenters in this thread have documented. Cleanup is safe unconditionally — temp dirs are never valid between runs.3. Use
forceand retry on the pre-rename target removal (handles the EACCES read-only-pack-files angle from #46830 simultaneously):4. (Bigger refactor) Skip the rename dance entirely. Download directly to the final target with a
.installingsentinel; atomic-delete the sentinel to promote. Avoids the Windows-vs-POSIXrenamesemantic mismatch at the source. Larger change but makes this whole class of issue go away.(1) + (2) + (3) together should fix the vast majority of reports on this thread without a structural refactor. Happy to PR if a maintainer can point at the marketplace finalize logic in the tree.
I hit what looks like same Windows marketplace-finalize bug while adding .
Environment:
Repro command:
Adding marketplace…✔ Marketplace 'context-mode' already on disk — declared in user settings
Observed error:
What I checked before retrying:
Important detail: after the CLI failure, neither directory was left behind on disk.
Even after terminal restart and full machine reboot, the error reproduced several times.
Then later, after another terminal restart, the exact same command succeeded:
So this may be a transient Windows race/locking bug in marketplace cache finalization, not only a stale-directory condition.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.