Skip to content

Unable to connect to API (ConnectionRefused) — retries exhausted, never connects #71188

Description

@GuySaar8

Bug Description

Claude Code cannot connect to the API. On startup (and on any command), it repeatedly fails with:

Unable to connect to API (ConnectionRefused) · Retrying in 11s · attempt 8/10

It cycles through all 10 retry attempts and never connects, so Claude Code is completely unusable locally. The failure is consistent and reproducible on every launch. The ConnectionRefused error suggests the connection to api.anthropic.com is being actively rejected rather than timing out.

Notably, the in-app /bug report also hangs at "Submitting report…" and never sends — consistent with the same connection being blocked — so I'm filing here instead.

Steps to Reproduce

  1. Launch Claude Code in iTerm or VSCode.
  2. The connection immediately begins retrying.
  3. All 10 attempts fail with ConnectionRefused.

Expected: Claude Code connects to the API normally.

Actual: Every connection attempt is refused; the client never reaches the API.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.191
  • Feedback ID: 21e73a22-e867-4851-af46-04b8e7606c59

Errors

[]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions