The Wire · Showcase
CODEX WEBSOCKET TIMEOUT BUG LEAVES STALLED REQUESTS HANGING
By RepoJournal · Filed · About OpenAI
A write-side timeout vulnerability in Codex websocket handling lets client requests sit indefinitely when the socket pump stalls, even after the server has already disconnected.
Codex has a timing gap in its websocket implementation that creates asymmetric timeouts [1]. The connection itself is properly bounded by `websocket_connect_timeout_ms`, but once established, the first request send reuses only the receive-side idle timeout—leaving the write path unprotected if the socket pump stalls. This means a client calling `ws_stream.send(...)` can hang indefinitely while the server logs the session as already dead [1]. The fix adds a send-side timeout boundary to match the receive path, ensuring both directions of communication respect the same idle window. This is a quiet but real reliability issue for any service using Codex over websockets under network stress.
Action items
- → Review websocket timeout configuration in production Codex deployments; apply PR #20751 openai/codex [plan]
- → Monitor websocket session logs for stalled send operations before upgrading openai/codex [monitor]
References
- [1] Bound websocket request sends with idle timeout ↗ openai/codex
FAQ
- What changed in OpenAI on May 3, 2026?
- A write-side timeout vulnerability in Codex websocket handling lets client requests sit indefinitely when the socket pump stalls, even after the server has already disconnected.
- What should OpenAI teams do about it?
- Review websocket timeout configuration in production Codex deployments; apply PR #20751 • Monitor websocket session logs for stalled send operations before upgrading
- Which OpenAI repositories shipped on May 3, 2026?
- openai/codex