← All guides

Codex login redirects to an unreachable localhost:1455

Retry from the client, then check the local callback or device-code sign-in.

Updated

Start here

Start sign-in from the client again and keep it open. CLI users can try device-code sign-in when it is enabled.

On this page

1. Restart sign-in from the client

  1. Close the failed authorization page and start sign-in again. For CLI, run the command below in a regular terminal.
  2. Use the newly opened link and keep the client and terminal running throughout authorization.
codex login

2. Check where each part is running

  1. For a local client, authorize in a browser on the same computer.
  2. For CLI in a remote server or container, try device-code sign-in in step 4. localhost refers to the browser’s computer.

3. Windows: inspect port 1455

  1. If the callback uses 1455, run the read-only command below in a separate PowerShell window while sign-in is waiting.
  2. With no output, restart sign-in. With output, identify the process and normally quit only a confirmed old Codex instance before retrying.
Get-NetTCPConnection -LocalPort 1455 -State Listen -ErrorAction SilentlyContinue | Select-Object LocalAddress,LocalPort,OwningProcess

4. CLI: use device-code sign-in

  1. Enable device-code login in ChatGPT security settings; an administrator must allow it for organization accounts.
  2. Run the command below, open its displayed link and enter this attempt’s code. Then run codex login status and send a short test.
codex login --device-auth

5. Contact support

  1. State whether you use desktop, IDE or CLI, whether it is remote and where sign-in stops.
  2. Hide the full callback URL and authorization code in screenshots so support can help check the issue.

Contact support →

Useful links