claude update and claude doctor hang indefinitely due to Cloudflare challenge on version check endpoint

Resolved 💬 3 comments Opened Feb 9, 2026 by pythoninthegrass Closed Feb 13, 2026

Description

claude update and claude doctor hang indefinitely. The root cause is that the version check endpoint (https://claude.ai/api/cli/latest-version) is returning a Cloudflare managed challenge (HTTP 403) instead of the expected JSON response. The CLI's HTTP client cannot solve the JS challenge, so it hangs waiting for a valid response.

Steps to Reproduce

  1. Run claude update — hangs at "Checking for updates to latest version..."
  2. Run claude doctor — also hangs (it performs the same version check)

Evidence

$ curl -sI https://claude.ai/api/cli/latest-version | head -5
HTTP/2 403
content-type: text/html; charset=UTF-8
cf-mitigated: challenge

The response body is a Cloudflare "Just a moment..." challenge page requiring JavaScript execution.

Meanwhile, the npm registry is reachable and healthy:

$ curl -sI https://registry.npmjs.org/@anthropic-ai/claude-code/latest | head -2
HTTP/2 200
content-type: application/json

Environment

  • Claude Code version: 2.1.37
  • Platform: macOS (Darwin 24.6.0, arm64)
  • Install method: curl -fsSL https://claude.ai/install.sh | bash (standalone binary via ~/.local/share/claude/versions/)

Workarounds

  • curl -fsSL https://claude.ai/install.sh | bash works for updating (uses a different code path)
  • npm install -g @anthropic-ai/claude-code@latest also works (hits npm registry directly)

Analysis

The Cloudflare WAF rules on claude.ai appear to be blocking the CLI's own programmatic requests to its version check API. The cf-mitigated: challenge header confirms this is a Cloudflare managed challenge, not a server error. The CLI has no mechanism to solve JS challenges or time out gracefully, so it hangs forever.

View original on GitHub ↗

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