Multiple processes span with 100 %CPU usage in activity monitor

Status Closed — not planned
Reported on v2.1.29
Maintainer reply None cached
Activity 14 comments · opened Jan 31, 2026 · closed Mar 5, 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?

I opened VS Code and left my computer for some time. The fan started going on and I checked Activity Monitor to see what could be causing a brand new M5 Macbook pro to overheat if I had literally nothing open except the VS Code app with no activity at all.

The activity monitor registered 4 Claude processes with 100% CPU use. I killed them all. I restarted VS Code and the Claude Code extension was irresponsive. I created a session in the teminal and it spawned 2 processes with 100 %CPU usage.

I restarted my computer, VS Code opened up and 2 claude 100 %CPU processes started, but claude remained unresponsive in VS Code. I closed VS Code, started a claude session in terminal and I currently have 4 claude PIDs all with 100 %CPU usage.

<img width="941" height="180" alt="Image" src="https://github.com/user-attachments/assets/7a971b0c-8952-4f82-9962-7723f96adb30" />

Claude version: 2.1.29 (Claude Code)
MacOS Tahoe Version 26.2
Apple M5 16 GB - 1TBSSD

What Should Happen?

Nothing should ever require 100 %CPU usage of a brand new M5 Macbook Pro

Error Messages/Logs

Steps to Reproduce

Just open the terminal and write claude or just open VS Code and activate the Claude Code extension

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.29 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

14 Comments

QualityCopperShovel · 7 months ago

!Image

not just macos - this is my linux server

oh, and I'm not using VSCode - so maybe not specific to that either

<img width="1346" height="457" alt="Image" src="https://github.com/user-attachments/assets/10262b9c-3c8b-4182-9423-54566ad3aaed" />

All of these claude instances are idle yet churning CPU

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/18532
  2. https://github.com/anthropics/claude-code/issues/17219
  3. https://github.com/anthropics/claude-code/issues/17148

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

blizkyone · 7 months ago

Related to the mentioned issues, but slightly different. My VS Code claude became completely irresponsive even after disabling and enabling it again. And the ghost processes spawn on startup, maybe caused by VS Code, but every session started in terminal spawns 2 10%CPU usage processes

QualityCopperShovel · 7 months ago

I think this is not a dupe and was introduced with v2.1.29 or v2.1.28. I just updated today from v2.1.27 and saw the CPU surge.

QualityCopperShovel · 7 months ago
● Bash(sudo strace -p 1326707 -c 2>&1 &
      STRACE_PID=$!…)
  ⎿  Error: Exit code 143
     Command timed out after 15s
     strace: Process 1326707 attached
     strace: Process 1326707 detached
     % time     seconds  usecs/call     calls    errors syscall
     ------ ----------- ----------- --------- --------- ----------------
      43.16    0.073961           8      8559           munmap
      30.77    0.052731           6      8568           mmap
      13.09    0.022426          14      1498        18 futex
       4.27    0.007311          36       202           sched_yield
     … +27 lines (ctrl+o to see all)

● There it is. In 5 seconds: 8,559 munmap + 8,568 mmap calls — that's ~3,400 mmap/munmap cycles per second. The process is in a tight memory allocation/deallocation
  loop. Plus 1,498 futex calls and 202 sched_yields.

  This is garbage collection thrashing — the Bun/V8 runtime is continuously allocating and freeing memory even while idle. That's the bug. It's not polling for input; it's GC churning. The HeapHelper threads we saw earlier in the per-thread view confirm this — V8's heap management is running hot.

  This is definitely a Claude Code bug worth reporting if it isn't already covered by that issue.

I don't know what this means but it is the result of a claude code self investigation.

Xexr · 7 months ago

Agreed, seeing the same and still high mem usage on 2.1.29, I don't think the issue is as fixed as they claimed.

Xexr · 7 months ago

Strangely, on subsequent runs mem usage seems back under control. Strange was definitely high on first run of .29.

Will keep monitoring.

QualityCopperShovel · 7 months ago

Dowgraded with claude install 2.1.27 and cpu usage is back to normal.

Edit: never mind idle claudes started eating cpu again after a while, even on 2.1.27

<img width="1381" height="272" alt="Image" src="https://github.com/user-attachments/assets/c711889a-bc1a-4eed-b4ee-9cab0c3c4396" />

<img width="664" height="265" alt="Image" src="https://github.com/user-attachments/assets/9ec26002-e00e-4719-8fd9-874ffd2e5a01" />

blizkyone · 7 months ago

I just ran claude install 2.1.27 and the terminal usage was working fine. I opened up VS Code with the claude extension on, and it once again activated the two expensive processes and is still thinking the answer to the prompt "what version of claude code are you" (I wanted to make sure it was also using 2.1.27, won't get an answer since I'm killing this process now)

Edit: I realized in the Extension page itself it says it uses 2.1.29, so it once again points to being an issue with that version or with the VS Code extension. I'll wait for a next version to update before using the extension again

QualityCopperShovel · 7 months ago

Oh I was on latest, so I guess claude upgraded itself back to 2.1.29 and that's why the cpu bug came back.
Switched to stable in my settings.

● Update(.claude/settings.json)
  ⎿  Added 1 line, removed 1 line
      1  {
      2 -  "autoUpdatesChannel": "latest"
      2 +  "autoUpdatesChannel": "stable"
      3  }
vibejockey · 7 months ago

Possible version mismatch trigger

I experienced similar symptoms today (startup freeze, orphaned processes at 100% CPU ignoring SIGTERM).

Timeline in my case:

  • VS Code extension auto-updated to 2.1.27 at 09:01
  • CLI was already at 2.1.29
  • Problems started around 15:58 (startup freezes, ~20 failed session attempts)
  • VS Code extension updated to 2.1.29 at 23:38
  • After both were on 2.1.29, CLI sessions started working normally

Not certain this was the root cause, but the version mismatch (CLI ahead at 2.1.29, VS Code behind at 2.1.27) correlates with the problem window. Once they matched, the issue resolved.

Worth investigating whether shared state in ~/.claude/ has version-dependent schemas that might cause conflicts.

Environment: macOS Tahoe 26 (Apple Silicon), Node 24.9.0

terrylica · 6 months ago

Cross-reference: /clear as immediate workaround

I've posted detailed diagnostic data in #22509 showing the same issue on macOS M3 Max with 10 concurrent idle sessions consuming 667% CPU total.

Key finding: Running /clear in a session immediately drops CPU from ~98% to 0% and reduces memory from 2GB to 160MB. This strongly suggests the root cause is accumulated session state triggering continuous GC activity, not a polling/event-loop issue.

The workaround for users with multiple long-running sessions:

  1. Run /clear in each high-CPU session
  2. Or terminate and restart sessions that have been running > 24h

See #22509 for full environment details, thread analysis, and session age vs CPU correlation data.

github-actions[bot] · 5 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.