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.
One email a day. Unsubscribe in one click.
Keep up with OpenAI in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
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