[Bug] Anthropic API Error: ECONNRESET - Unable to establish connection
Bug Description
Getting the error "Unable to connect to API (ECONNRESET)" constantly and cannot use Claude Code at all. I am not on a corporate network and do not have any firewall rules preventing connections. I can get a response from anthropic API via curl. I have reset, reinstalled and checked environmental vars as recommended by Fin. Claude Code was working perfectly until yesterday afternoon (UTC+2). I have been trying out an automation orchestrator (https://github.com/AutoMaker-Org/automaker) which might have had a bug yesterday causing excessive API calls however I only saw it trying to connect to Codex constantly which I do not subscribe to. I have also recently travelled to Thailand but am back home in case this in a factor however I did not use Claude Code while there, only Claude. I have also attempted to use a VPN (TunnelBear) to connect to US to see if this is an ISP issue but was getting the same error
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.7
- Feedback ID: 3188ccf6-8f59-4e98-b2f6-7af1009c4535
Errors
[{"error":"Error: Connection error.\n at makeRequest (/$bunfs/root/claude:858:4548)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:18:28.783Z"},{"error":"Error: Connection error.\n at makeRequest (/$bunfs/root/claude:858:4548)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:18:29.272Z"},{"error":"Error: 1P event logging: 36 events failed to export\n at queueFailedEvents (/$bunfs/root/claude:211:2077)\n at async doExport (/$bunfs/root/claude:211:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:18:32.548Z"},{"error":"Error: {\"message\":\"Failed to export 36 events\",\"originalLine\":\"211\",\"originalColumn\":\"1336\",\"line\":\"211\",\"column\":\"1336\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: Failed to export 36 events\\n at doExport (/$bunfs/root/claude:211:1336)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/claude:2225:25028)\n at <anonymous> (/$bunfs/root/claude:205:38580)\n at BQD (/$bunfs/root/claude:205:39124)\n at <anonymous> (/$bunfs/root/claude:206:17366)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:18:32.548Z"},{"error":"Error: 1P event logging: 9 events failed to export\n at queueFailedEvents (/$bunfs/root/claude:211:2077)\n at async doExport (/$bunfs/root/claude:211:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:18:41.940Z"},{"error":"Error: {\"message\":\"Failed to export 9 events\",\"originalLine\":\"211\",\"originalColumn\":\"1336\",\"line\":\"211\",\"column\":\"1336\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: Failed to export 9 events\\n at doExport (/$bunfs/root/claude:211:1336)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/claude:2225:25028)\n at <anonymous> (/$bunfs/root/claude:205:38580)\n at BQD (/$bunfs/root/claude:205:39124)\n at <anonymous> (/$bunfs/root/claude:206:17366)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:18:41.940Z"},{"error":"Error: 1P event logging: 2 events failed to export\n at queueFailedEvents (/$bunfs/root/claude:211:2077)\n at async doExport (/$bunfs/root/claude:211:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:18:50.688Z"},{"error":"Error: {\"message\":\"Failed to export 2 events\",\"originalLine\":\"211\",\"originalColumn\":\"1336\",\"line\":\"211\",\"column\":\"1336\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: Failed to export 2 events\\n at doExport (/$bunfs/root/claude:211:1336)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/claude:2225:25028)\n at <anonymous> (/$bunfs/root/claude:205:38580)\n at BQD (/$bunfs/root/claude:205:39124)\n at <anonymous> (/$bunfs/root/claude:206:17366)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:18:50.688Z"},{"error":"Error: 1P event logging: 2 events failed to export\n at queueFailedEvents (/$bunfs/root/claude:211:2077)\n at async doExport (/$bunfs/root/claude:211:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-14T07:19:07.554Z"},{"error":"Error: {\"message\":\"Failed to export 2 events\",\"originalLine\":\"211\",\"originalColumn\":\"1336\",\"line\":\"211\",\"column\":\"1336\",\"sourceURL\":\"/$bunfs/root/claude\",
Note: Error logs were truncated.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗