ATRIUMsearch → argument graph
MechanismArticle

Using persistent WebSockets instead of HTTPS and sending only incremental changes instead of full payloads eliminates the repeated TCP/TLS handshake costs and growing payload bloat that plague multi-call agent loops.

Codex opens a single WebSocket to the API and keeps it alive across all model calls in a turn, eliminating repeated connection setup. It also sends only new items with a reference to the previous response, so payload size stays small. ✦ AI generated

Artificial Analysis · ByteByteGo Newsletter · 2026-07-29 · original ↗

The fix for the connection cost is to open one connection and keep it alive, instead of creating a new one for every call. This is what WebSockets are designed for. A WebSocket needs just one initial handshake, and after that, both sides can send messages whenever they want with no per-message setup. Codex opens a single WebSocket to the API and keeps it open across all the model calls in a turn. This eliminates the repeated TCP and TLS setup. The fix for the payload repetition is to stop resending what the server already knows. The harness keeps the previous request and the completed response. If nothing but the conversation input has changed, it sends only the new items along with a reference to the previous response.

Read full article ↗excerpt · fair-use quotation

Around this claim