Agent: client error (SendRequest) connection error received fatal alert: BadRecordMac
Summary
Every couple of minutes, I get this error. I believe this happens for all providers, I tested Anthropic, Gemini, OpenAI.
Error interacting with language model
failed to send request to Anthropic
failed to send request to Anthropic
error sending request for url (https://api.anthropic.com/v1/messages)
client error (SendRequest)
connection error
received fatal alert: BadRecordMac
Description
Steps to reproduce:
- Just prompt to any AI model for a while
- At some point it errors out with the attached error.
Expected Behavior: Actual Behavior:
It should just keep working.
Zed Version and System Specs
Zed: v0.187.8 (Zed) OS: macOS 15.5.0 Memory: 32 GiB Architecture: aarch64
Similar here. It's preventing me from using Agent Mode (which is annoying since I'm on the paid plan). Tried updating Zed + rebooting Mac to no luck.
Error interacting with language model
error sending request for url (https://llm.zed.dev/completions?)
client error (SendRequest)
connection error
received fatal alert: BadRecordMac
Zed: v0.188.4 (Zed) OS: macOS 15.0.1 Memory: 32 GiB Architecture: aarch64
Chiming in some more: I get this error 30+ times a day. It's very frustrating, but because when it works, Zed's agent is really good.
I think this is an anthropic SSL error, here are more details:
- https://github.com/anthropics/claude-code/issues/969
- https://github.com/anthropics/anthropic-quickstarts/issues/85
but maybe proxied by zed:
Error interacting with language model error sending request for url (https://llm.zed.dev/completions?) client error (SendRequest) connection error received fatal alert: BadRecordMac
edit: but it only happens to me with Claude Sonnet 4 from Zed. If I use it from GitHub it works. so it's just an SSL proxy error between ZED and Anthropic
also getting this
Still getting this multiple times a day.
frustrating Error interacting with language model error sending request for url (https://llm.zed.dev/completions?) client error (SendRequest) connection error received fatal alert: BadRecordMac
Same exact issue here
Hey folks, this is still happening daily, and frankly is making Zed's AI features unusable.
I'm sorry that folks are running into this but we're kind of blind as to how to troubleshoot as no one at Zed has yet reproduced this behavior.
The only time I have ever seen these sort of errors is when there network path corruption, either via problems with your ISP or local network equipment (e.g. routers with bad memory) or with your local network stack (security software failing at man-in-middling your traffic; issues with NIC drivers).
I know this may sound patronizing and a long shot, but can anyone who is consistently seeing this attempt to see if the issue is still reproducible if you change everything in your network path? E.g. instead of connecting via: laptop -> wifi/ethernet -> home router -> ISP -> Zed switch to tethering to your phone (with wifi off) so: laptop -> usb -> phone -> mobile ISP -> Zed to see if there's any improvement?
For example, I once solved seeing similar behavior by replacing Amazon USB3 Gigabit Ethernet adapter (RTL8153 based) with a 2.5GBE (RTL8156 based) one. Similarly years ago I had a cheap Belkin WiFi router which exhibited similar corrupting breaking TLS negotiations very infrequently (maybe once a day), I switched to a new router the problems went away and they returned when I temporarily switched back.
Separately, perhaps Zed should more gracefully recover from Network path corruption like this. Rather than just failing, it might be better for Zed to attempt retrying. I haven't yet dug into the error path, but if someone was so inclined, I'd be happy to review a PR which more gracefully handled such errors. Generally Zed does not attempt to recover to errors triggered from the TLS layer -- that's usually an indication that something is really messed up.
Sorry I don't have a better answer.