[BUG] Getting API error
Resolved 💬 2 comments Opened Jun 17, 2026 by kesava-kimmich Closed Jun 20, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
⏺ API Error: The socket connection was closed unexpectedly. For more information, pass verbose: true in the second argument to fetch()
What Should Happen?
It should not close the session prematurely
Error Messages/Logs
Steps to Reproduce
- Try asking claude code to do some coding tasks
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.179.
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗