What
When Claude Code fails to connect to Anthropic's API, the error message used to show only the raw error. It now adds a hint:
- If you have set a proxy, or a gateway through
ANTHROPIC_BASE_URL, it tells you to check that. - Otherwise it says: "A VPN, firewall, or security software can cause this. Check those or switch networks, then try again."
A gateway is a server placed between Claude Code and the API. The hint is added to general connection errors when Claude Code talks to Anthropic directly. It is not added when Claude Code connects through a Unix socket, which is a local connection between programs on the same machine.
Why
A bare connection error gives you nothing to act on. The hint names the likely causes, so you know where to look first.