A Codex doctor websocket warning can be a missing bearer
The remediation says to check the proxy, the VPN, the firewall, DNS, a custom CA, and WebSocket policy. On Codex CLI 0.163.0 the handshake under that sentence is a 401, and the message in the 401 is Missing bearer or basic authentication in header. DNS had already returned addresses. The HTTP reachability row was ok. Proxy environment variables were none. Auth mode was none.
Those two lines are not the same failure. The summary points at the path. The detail points at the header. Codex CLI 0.166.0, installed beside the older binary and not put on PATH, prints the same remediation and still records auth mode none. It redacts the 401 body. The flag added in that release, codex doctor --network-only, then drops the auth row and exits 0.