[Bug] Anthropic API Error: Socket connection closed unexpectedly
Resolved 💬 3 comments Opened Apr 28, 2026 by rajonker Closed May 2, 2026
Bug Description
API Error: The socket connection was closed unexpectedly. For more
information, pass verbose: true in the second argument to fetch()
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.121
- Feedback ID: 8299d4fa-da49-4b43-b2ad-782dfbc93afd
Errors
[{"error":"The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()","timestamp":"2026-04-28T07:52:59.592Z"},{"error":"The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()","timestamp":"2026-04-28T07:54:29.054Z"},{"error":"The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()","timestamp":"2026-04-28T07:57:30.455Z"},{"error":"The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()","timestamp":"2026-04-28T09:13:10.292Z"},{"error":"The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()","timestamp":"2026-04-28T09:48:52.314Z"},{"error":"The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()","timestamp":"2026-04-28T09:55:28.119Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13282)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T09:55:48.130Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: ECONNREFUSED\n at Vw5 (/$bunfs/root/src/entrypoints/cli.js:2767:5533)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T10:21:18.018Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: ECONNREFUSED\n at Vw5 (/$bunfs/root/src/entrypoints/cli.js:2767:5533)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T10:21:18.019Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: ECONNREFUSED\n at Vw5 (/$bunfs/root/src/entrypoints/cli.js:2767:5533)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T10:51:18.025Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: ECONNREFUSED\n at Vw5 (/$bunfs/root/src/entrypoints/cli.js:2767:5533)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T10:51:18.025Z"},{"error":"Error: Connection error.\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4056)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T11:17:15.136Z"},{"error":"Error: ECONNREFUSED\n at from (/$bunfs/root/src/entrypoints/cli.js:112:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:12867)\n at emitError (node:events:43:23)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:1149)\n at emitError (node:events:43:23)\n at <anonymous> (node:_http_client:253:22)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T11:17:30.141Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: ECONNREFUSED\n at Vw5 (/$bunfs/root/src/entrypoints/cli.js:2767:5533)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T11:21:18.025Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: ECONNREFUSED\n at Vw5 (/$bunfs/root/src/entrypoints/cli.js:2767:5533)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T11:21:18.025Z"},{"error":"Error: Request was aborted.\n at zG8 (/$bunfs/root/src/entrypoints/cli.js:5452:8020)\n at A (/$bunfs/root/src/entrypoints/cli.js:258:16495)\n at abort (unknown)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:2657:7656)\n at abort (unknown)\n at L (/$bunfs/root/src/entrypoints/cli.js:9202:19026)\n at N (/$bunfs/root/src/entrypoints/cli.js:9202:19242)\n at us6 (/$bunfs/root/src/entrypoints/cli.js:516:32439)\n at handleTerminalFocus (/$bunfs/root/src/entrypoints/cli.js:522:2039)\n at LM1 (/$bunfs/root/src/entrypoints/cli.js:520:2053)","timestamp":"2026-04-28T11:22:32.106Z"},{"error":"Error: ECONNREFUSED\n at from (/$bunfs/root/src/entrypoints/cli.js:112:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints…
Note: Content was truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗