Network & Connectivity
API Error (Connection error.)
Symptom: the request fails before reaching the server; retries don't help.
Cause: the local-to-server link is down (TCP connection stage failed) — usually a dead proxy node, flaky Wi-Fi routing, or a firewall blocking outbound requests.
Steps:
- Run
ping your-request-addressto check connectivity - Replies → check proxy config; timeout → switch networks (other Wi-Fi / disable proxy / change proxy node / phone hotspot)
- Make sure your proxy app has "system proxy" or "TUN mode" on — Claude Code is a CLI tool and doesn't use the browser proxy channel
- Once the network recovers, run
claudeagain
API Error (Request timed out.)
Symptom: the request times out after a while.
Two cases:
- Case A — network latency: latency to the server is too high; follow the network steps in "API Error (Connection error.)" above
- Case B — context too long: the session has accumulated too many tokens and processing exceeds the timeout
Case B fix:
- Type
/clearin Claude Code to clear the conversation - Or
/compactto compress context into a summary - Or quit and run
claudeagain for a fresh session
IDE note: IDE plugins inject large system prompts; combined with Claude Code's own prompt, the number of usable turns drops noticeably. If you hit timeouts, check context length first.
WebFetch (web access) not working
Symptom: WebFetch errors out, but the target site opens fine in a browser and the proxy is in global mode.
Cause: before fetching the target page, Claude Code first sends a preflight to https://claude.ai/api/web/domain_info. If domestic networks / corporate firewalls block claude.ai, the preflight fails and WebFetch errors out entirely.
Fix: add to ~/.claude/settings.json (Windows: C:\Users\<name>\.claude\settings.json):
"skipWebFetchPreflight": trueIf you already have other config, merge it:
{
"env": {
"ANTHROPIC_BASE_URL": "https://your-request-address",
"ANTHROPIC_API_KEY": "sk-***"
},
"skipWebFetchPreflight": true
}Restart Claude Code to skip the preflight and request the target page directly.