claude doctor hangs indefinitely (v2.1.168, macOS ARM64)

Resolved 💬 2 comments Opened Jun 7, 2026 by anshkohli88 Closed Jun 11, 2026

Environment

  • Claude Code version: 2.1.168
  • OS: macOS 26.5 (Darwin 25.5.0) ARM64
  • Shell: zsh

Symptom

claude doctor hangs forever with no output. The process never exits and produces nothing on stdout or stderr.

Steps to reproduce

claude doctor

The command immediately hangs. Killing it (Ctrl-C) is the only way out.

What I observed

Running lsof on the stuck process shows a single TCP connection established to 160.79.104.10:443 (which assets.anthropic.com, www.anthropic.com, and api.anthropic.com all resolve to on this machine):

2.1.168  <pid>  TCP 192.168.86.34:XXXXX->160.79.104.10:https (ESTABLISHED)

No child processes are ever spawned (i.e., no stdio MCP servers start up).

Taking a sample of the stuck process shows it is spending ~100% of time blocked in kevent64 — waiting on an I/O event that never fires:

2500 Thread   DispatchQueue_1: com.apple.main-thread
+ 2500 start (dyld)
+   2500 ... (2.1.168)
+     2493 kevent64 (libsystem_kernel.dylib)   ← stuck here

Root cause hypothesis

assets.anthropic.com currently returns HTTP 302 → https://www.anthropic.com/ for all paths:

$ node -e "
const https = require('https');
https.get({ hostname: 'assets.anthropic.com', path: '/', timeout: 5000 }, res => {
  console.log(res.statusCode, res.headers.location);
}).on('error', e => console.log(e.message));
"
302 https://www.anthropic.com/

It appears claude doctor makes an HTTPS request to assets.anthropic.com (likely for an update manifest or marketplace bundle check), follows the redirect to www.anthropic.com, and then hangs reading the response body of the Anthropic homepage — which is a large, chunked HTML page whose body stream does not signal EOF in a way the Bun runtime handles gracefully. No timeout is applied, so the process waits forever.

What works fine

  • claude update completes immediately: _"Claude Code is up to date (2.1.168)"_
  • Normal Claude Code sessions are completely unaffected.
  • claude doctor --help works.

Expected behavior

claude doctor should either complete with a health report or fail with an error message within a reasonable timeout (e.g. 30 seconds).

Suggested fix

Add a request timeout (e.g. 15–30 s) to the assets.anthropic.com fetch inside the doctor check, and treat a non-2xx / unexpected response as a diagnostic failure rather than blocking forever.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗