Codex app/CLI fail to reconnect after Wi-Fi switch on macOS, possibly DNS/Tailscale related

Open 💬 1 comment Opened Jul 1, 2026 by Itto1992

What happened?

After switching Wi-Fi networks, Codex app and Codex CLI on my local macOS machine can fail to reconnect for a while. The problem appears to recover automatically after some time.

This has only been observed for local development sessions. Sessions running on a remote server are unaffected. The machine uses Tailscale, so DNS or route changes after Wi-Fi switching may be involved, but I have not confirmed that as the root cause.

Logs

Codex app:

stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

Codex CLI:

⚠ Falling back from WebSockets to HTTPS transport. stream disconnected before completion: failed to lookup address information: nodename nor servname provided, or not known
■ stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

The CLI message looks like a DNS resolution failure immediately after network transition, while the app reports the generic request send failure.

Environment

  • OS: macOS 26.5.1 (25F80)
  • Codex CLI: 0.142.4
  • Codex app: 26.623.70822 (build 4559)
  • Network context: occurs after Wi-Fi switching; Tailscale is used on the local machine
  • Scope: local sessions affected; remote-server sessions unaffected

Expected behavior

Codex app/CLI should recover from Wi-Fi/network changes promptly, including refreshing DNS/transport state and retrying without requiring the user to wait for eventual recovery.

Notes

I found several existing stream disconnected before completion issues, but did not find one specifically describing the Wi-Fi-switch + local macOS + possible Tailscale/DNS-resolution pattern.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗