Codex 5/5 reconnect delays: retries, transport fallback and proxy paths
A source-code analysis of Codex 0.166.0 argues that the “Reconnecting… 5/5” display represents retry progress rather than a requirement to complete five connections before work begins. It identifies a possible path in which a WebSocket stream failure triggers fallback to HTTPS and retains that transport state for later turns in the same session. The report says logs are still required to confirm the cause and warns that protocol fallback does not necessarily mean a switch from direct routing to a proxy.
Separating retry behavior, transport fallback and proxy routing gives Codex users a more accurate troubleshooting model for slow first responses, while the report cautions that the observed counter alone cannot identify a network fault.
有些 Codex 用户会遇到这样的现象:发送第一条消息后,界面反复显示 Reconnecting…,计数接近 5/5 时才开始响应;同一会话接下来的交互又恢复正常。
一种常见解释是:前五次没有走代理,失败后才改用 HTTP 代理。这个判断把传输协议和网络路由混在了一起。要解释等待发生在哪里,需要分别看三个问题:客户端在重试什么,何时切换传输,以及不同传输是否使用了相同的网络配置。
01 “5/5”表示重试预算,不是启动流程
Reconnecting 表示客户端正在尝试恢复连接或响应流。计数描述恢复进度,并不代表模型需要完成五次连接才能开始工作。
OpenAI 的《Configuration Reference》区分了两项配置:request_max_retries 控制 HTTP 请求重试,默认值为 4;stream_max_retries 控制流式中断后的重试,默认值为 5。它们作用于不同阶段,不能混为一个次数。