codus
← All documentation

Why does Codex sign-in end with localhost refusing to connect?

If Codex sign-in returns to a localhost address containing /auth/callback and shows This site can't be reached, the browser could not finish handing the login back to the app on your computer. Check whether Codus added the account; if it did not, start one fresh sign-in on the same computer and keep Codus open until it finishes.

This can happen when the login process ends, the attempt is cancelled or expires, or Codus quits. Opening the return address on a different computer also sends it to the wrong computer. The address alone cannot establish which cause occurred.

Codus 0.2.185 or later removes an app-side five-minute cutoff that could cause this error during a longer sign-in. The provider can still expire an attempt, and cancelling sign-in or quitting Codus still stops it. See keeping Codus updated to check your app version.

Recover the sign-in

  1. Return to Codus on the same computer as the browser. Check whether the account was added successfully before starting again.
  2. If an unfinished attempt remains, use Cancel or Cancel sign-in first. Then start one fresh + Sign in or Sign in again attempt from the provider's usage panel.
  3. Complete the new browser flow. Keep Codus and its account panel open until it finishes; closing the panel can cancel an active attempt.
  4. Return to Codus and check the account and usage. Reloading an old callback tab cannot revive its stopped login process.

If it repeats, give support the Codus version, Codex CLI version, operating system, the error text, and whether the app or account panel closed while you were signing in. Include the local host and port, but omit the callback URL's query string, which can contain authentication information.

Read as markdownUpdated 2026-09-15