anthropics / anthropics/claude-code

[BUG] Orphaned plugin marketplace git clone busy-loops at ~80% CPU for days after the session exits (Linux)

Open
#95,344 1 comment 0 reactions 0 assignees View on GitHub
area:plugins bug platform:linux
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?

A background `git clone` of the official plugin marketplace was left orphaned (its parent became `systemd --user`) after the Claude Code session that started it exited. It busy-looped at ~80% CPU for 3 days, keeping one CPU core at 100°C and the laptop fan near max the whole time. SIGTERM was ignored; it needed `kill -9`.

- Started Sep 15 14:05, still running on Sep 18.
- Its `git index-pack --stdin` child was idle in `pipe_read` while the parent `git` spun in state R.
- The clone target folder `anthropics-claude-plugins-official` doesn't exist. The marketplace is actually installed at `~/.claude/plugins/marketplaces/claude-plugins-official` (per `known_marketplaces.json`) and had updated normally, so this clone was a leftover.

### What Should Happen?

Marketplace git operations should have a timeout, and background git processes should be killed when the session that started them exits instead of running forever.

### Error Messages/Logs

```shell
PID %CPU ELAPSED STARTED STAT
3972130 78.8 3-01:02:49 Tue Sep 15 14:05:30 2026 Rl (parent PID: systemd --user)

/usr/bin/git -c core.fsmonitor= -c core.hooksPath=/dev/null -c core.askPass= -c submodule.recurse=false -c log.showSignature=false -c gc.auto=0 -c maintenance.auto=false -c core.sshCommand=ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -c protocol.ext.allow=never -c protocol.fd.allow=never -c protocol.git.allow=never -c protocol.ftp.allow=never -c protocol.ftps.allow=never clone --depth 1 --recurse-submodules --shallow-submodules -- git@github.com:anthropics/claude-plugins-official.git ~/.claude/plugins/marketplaces/anthropics-claude-plugins-official

child: /usr/lib/git-core/git --shallow-file .../anthropics-claude-plugins-official/.git/shallow.lock index-pack --stdin --fix-thin --keep=fetch-pack (State: S, wchan: pipe_read, 0% CPU)
```

### Steps to Reproduce

I couldn't reproduce it on purpose. What I observed:
1. Use Claude Code normally on Linux with the official plugin marketplace installed (several sessions open over a few days).
2. At some point a background marketplace `git clone` (over SSH) starts, and the session that launched it exits.
3. The orphaned `git clone` keeps running at ~80% CPU indefinitely (3+ days in my case) until killed with `kill -9`.
4.
Check with: ps -eo pid,etime,pcpu,args | grep "[g]it .*clone.*claude-plugins-official"

### Claude Model

None

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.1.276 (Claude Code)

### Platform

Anthropic API

### Operating System

Ubuntu/Debian Linux

### Terminal/Shell

Other

### Additional Information

Ubuntu 24.04, kernel 6.8, Intel Core Ultra 5 135H (Dell Precision 3591). I noticed it only because the fan never stopped for days; CPU temp dropped from 101°C to 66°C within 2 minutes of killing the process.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the background git clone shown in the report and compare its target with ~/.claude/plugins/marketplaces/claude-plugins-official and known_marketplaces.json. Use the provided ps command to inspect orphaned processes on Ubuntu/Debian Linux. Done means marketplace git operations time out and background processes stop when their launching session exits.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, linux
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.