[BUG] WSL: "Unable to connect to Anthropic services" resolved by disabling telemetry

Resolved 💬 3 comments Opened Jun 23, 2025 by mluna030 Closed Jan 4, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.31 (Claude Code)
  • Operating System: WSL 2 (Ubuntu 22.04 on Windows)
  • Terminal: VS Code WSL terminal

Bug Description

Claude Code fails to start in WSL with misleading "Unable to connect to Anthropic services" error message. The error claims it cannot connect to api.anthropic.com with ETIMEDOUT, but the real issue is a TLS handshake failure with the telemetry service (statsig.anthropic.com). The application works perfectly when telemetry is disabled.

Steps to Reproduce

  1. Install Claude Code in WSL 2 environment
  2. Run claude command in terminal
  3. Observe "Unable to connect to Anthropic services" error with ETIMEDOUT

Expected Behavior

Claude Code should either:

  • Start normally and handle telemetry failures gracefully, OR
  • Show an accurate error message about telemetry connection issues, OR
  • Fall back to working without telemetry automatically

Actual Behavior

  • Shows misleading error: "Failed to connect to api.anthropic.com: ETIMEDOUT"
  • Application completely fails to start
  • Error message suggests network connectivity issues when the real problem is telemetry

Additional Context

Network connectivity is working fine:

  • curl -I https://api.anthropic.com returns HTTP/2 200
  • curl -I https://statsig.anthropic.com returns HTTP/2 404 (expected)
  • ping api.anthropic.com and ping statsig.anthropic.com both work
  • SSL/TLS handshake works: openssl s_client -connect api.anthropic.com:443 succeeds

Workaround that works:

DISABLE_TELEMETRY=1 claude

View original on GitHub ↗

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