claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] claude doctor hangs indefinitely, uses 100% CPU, and soft locks terminal session

Open marty0678 opened this issue 1 year ago • 20 comments

Environment

  • Platform (select one):
    • [x] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: 1.0.95
  • Operating System: Windows 11 and Ubuntu WSL
  • Terminal: PowerShell and bash

Bug Description

Running 1.0.93 from a fresh terminal window, running the command claude doctor worked successfully. Once Claude is updated to 1.0.95, the same command soft locks your computer. As your CPU is 100% utilized, the terminal will not respond to anything, and the command seems to hang indefinitely, as if it's in a recursive loop.

If you run it while inside Claude using the /command, it appears to work. It's only when you run it outside a running Claude session.

Can reproduce in both WSL and Windows, and node 20 and 22.

Steps to Reproduce

  1. Update to 1.0.95
  2. Run claude doctor

Expected Behavior

It to return the results of doctor.

Actual Behavior

Hangs forever, CPU jumps to 100%, terminal soft locks.

Additional Context

Can confirm it was fine with 93 as it ran correctly on 93, right before I updated to 95.

marty0678 avatar Aug 28 '25 03:08 marty0678

I have the same problem, and the command fails: Last login: Thu Aug 28 11:29:37 on ttys002 /etc/zprofile:7: fork failed: resource temporarily unavailable /Users/bytedance/.zprofile:2: fork failed: resource temporarily unavailable /etc/zshrc:7: fork failed: resource temporarily unavailable /Users/bytedance/.oh-my-zsh/oh-my-zsh.sh:43: fork failed: resource temporarily unavailable nvm_auto:13: fork failed: resource temporarily unavailable compdef:95: fork failed: resource temporarily unavailable /Users/bytedance/.zshrc:124: fork failed: resource temporarily unavailable WK0M2R63WP%

kotot avatar Aug 28 '25 03:08 kotot

I'm currently experiencing the same issues, and it will crash my entire computer due to insufficient memory. The quick escape right now is: pkill -f claude (from another tab, as the first one will be busy), hopefully we're getting a fix soon

etsraphael avatar Aug 28 '25 05:08 etsraphael

The same on my side, OS: Mac OS 15.6 on M1 Pro, terminal oh my zsh

sgordeychuk avatar Aug 28 '25 07:08 sgordeychuk

Same problem. Just tried to run doctor and had to hard restart my laptop, event mouse cursor was laggy.

"Checking installation status…"

mds_store process raised to hundreds of CPU.

MacOS 15.4.1 (24E263) 1.0.95 (Claude Code)

IAkumaI avatar Aug 28 '25 07:08 IAkumaI

Have observed the same on both Wndows and Linux. On Linux I noticed a large amount of "which" processes.

lab1702 avatar Aug 28 '25 13:08 lab1702

Have observed the same on both Wndows and Linux. On Linux I noticed a large amount of "which" processes.

On MacOs it "feels" like overloading filesystem. Maybe it tries to checm content of node_modules somehow and got into a blackhole.

IAkumaI avatar Aug 28 '25 13:08 IAkumaI

Same issue here.

mtebele avatar Aug 28 '25 16:08 mtebele

Same issue with 1.0.96 on macOS 15.6.1 in Terminal.app.

Terminal hangs, shell scripts stop working across the board, there is a process named 1.0.96 using ~100% CPU in Activity Monitor. Computer just becomes slow across the board. Trying to create a new Terminal tab yields:

[forkpty: Resource temporarily unavailable]
[Could not create a new process and open a pseudo-tty.]

rben01 avatar Aug 28 '25 19:08 rben01

Same issue here (same configuration as what @rben01 posted above).

srikanthrc avatar Aug 28 '25 22:08 srikanthrc

Same issue here. MacOS 15.4.1 (24E263) 1.0.95 (Claude Code)

jthopson avatar Aug 28 '25 23:08 jthopson

same issue here

Xpectuer avatar Aug 29 '25 01:08 Xpectuer

same issue here Windows 10 1.0.96

Norsninja avatar Aug 29 '25 01:08 Norsninja

Same here on Linux/NixOS. It seems to get stuck in an infinite loop spawning thousands upon thousands of npm processes:

m0ar      341452 52.2  0.9 33077428 601380 pts/36 Rl+ 09:48   1:02                  |   |   \_ claude
m0ar      341464  0.0  0.0      0     0 pts/36   Z+   09:48   0:00                  |   |       \_ [npm config get ] <defunct>
m0ar      341471  0.0  0.0      0     0 pts/36   Z+   09:48   0:00                  |   |       \_ [npm config get ] <defunct>
m0ar      341472  0.0  0.0      0     0 pts/36   Z+   09:48   0:00                  |   |       \_ [npm config get ] <defunct>
m0ar      341478  0.0  0.0      0     0 pts/36   Z+   09:48   0:00                  |   |       \_ [npm config get ] <defunct>
[ ... thousands of processes removed for brevity ... ]
m0ar      436566  0.0  0.0      0     0 pts/36   R+   09:50   0:00                  |   |       \_ [npm config get ]
m0ar      436581  0.0  0.0 1053340 59152 pts/36  Rl+  09:50   0:00                  |   |       \_ npm
m0ar      436587  0.0  0.0 1053088 58220 pts/36  Rl+  09:50   0:00                  |   |       \_ npm
m0ar      436597  0.0  0.0 1020148 57824 pts/36  Rl+  09:50   0:00                  |   |       \_ npm
m0ar      436605  0.0  0.0 1016736 54216 pts/36  Rl+  09:50   0:00                  |   |       \_ npm

m0ar avatar Aug 29 '25 07:08 m0ar

same here, as reported, Ubuntu 20

IJOL avatar Aug 29 '25 09:08 IJOL

Same here. Win11 Claude 1.0.96

KemNan avatar Aug 29 '25 12:08 KemNan

experienced the same - seems to be when running the claude doctor command but not when using the /doctor command

EDIT: for me it's the .96 version

akhilnchauhan avatar Aug 29 '25 14:08 akhilnchauhan

This should be resolved in 1.0.98, released today.

ant-kurt avatar Aug 29 '25 22:08 ant-kurt

Yeah I’m still seeing 2-2.5GB RAM on an M4, per session.

So running 2-3 in parallel is making my machine feel sluggish.

On Wed, Sep 3, 2025 at 6:52 PM Slava Vishnyakov @.***> wrote:

slava-vishnyakov left a comment (anthropics/claude-code#6705) https://github.com/anthropics/claude-code/issues/6705#issuecomment-3250207150

1.0.102 (Claude Code) still eats a ton of resources even on Apple M4 I think it might be "metallic" animation - this thing: image.png (view on web) https://github.com/user-attachments/assets/e5995d3b-d5e4-4f3f-87f3-f62c00305df1

— Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/6705#issuecomment-3250207150, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUI5WARMSMGS3XB4FAJYP33Q4TGZAVCNFSM6AAAAACFAAQ3NKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENJQGIYDOMJVGA . You are receiving this because you commented.Message ID: @.***>

akhilnchauhan avatar Sep 03 '25 17:09 akhilnchauhan

I have the same issue, running top in wsl shows infinite "npm config get" processes

kurtjcu avatar Sep 03 '25 22:09 kurtjcu

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.

github-actions[bot] avatar Sep 11 '25 14:09 github-actions[bot]