[BUG] API timeout errors on M4 Mac - HTTPS connection failures to api.anthropic.com
Environment
- Platform (select one):
- - [x] Anthropic API
Bug Description
API timeout errors occurring on new M4 Mac since yesterday. Connection attempts to api.anthropic.com are timing out during HTTPS handshake, despite basic network connectivity being functional.
Steps to Reproduce
- Install Claude Code on M4 Mac
- Attempt to use any Claude Code functionality
- Observe API timeout errors with retry attempts
Expected Behavior
Claude Code should successfully connect to api.anthropic.com and process requests without timeout errors.
Actual Behavior
- API requests time out consistently
- - Usually succeeds after one or a few retries
- - - cURL test to api.anthropic.com fails with timeout after 20+ seconds
- - - - HTTPS connections specifically failing while other network operations work
Network Diagnostic Results
✅ Working Components:
- No proxy settings - Environment variables are clean
- - DNS resolution works - api.anthropic.com resolves to 160.79.104.10
- - - Basic internet connectivity - Google DNS (8.8.8.8) responds in ~23ms
- - - - Anthropic API ping works - But with higher latency (74-150ms)
🔴 Failing Components:
- HTTPS connection fails - cURL timeout after 20+ seconds
- - This explains the Claude Code timeout errors
[BashTool] Pre-flight check is taking longer than expected. Run with ANTHROPIC_LOG=debug to check for failed or slow API requests.
This pre-flight check timeout warning provides further evidence that the issue is specifically with API connectivity during the initial connection phase.
Debug Logging Status
Currently running with ANTHROPIC_LOG=debug to gather additional diagnostic information about the API request failures.
Additional Context
- Issue started since yesterday on new M4 Mac
- - Related to closed issue #2728 but with specific network diagnostic information
- - - Problem appears to be HTTPS-specific connectivity to Anthropic API endpoints
- - - - Basic network connectivity and DNS resolution work fine
- - - - - Multiple tunnel interfaces detected in network configuration
This seems to be a platform-specific issue affecting M4 Macs or related to specific network configurations that block HTTPS connections to Anthropic's API infrastructure.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗