Codex CLI login stuck on 'Sign in with ChatGPT' screen
Resolved 💬 27 comments Opened Aug 27, 2025 by petrosgeor Closed Oct 28, 2025
💡 Likely answer: A maintainer (aibrahim-oai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.25.0
Which model were you using?
-
What platform is your computer?
Linux 5.4.0-216-generic x86_64 x86_64
What steps can reproduce the bug?
When trying to log in to Codex CLI, the authentication flow gets stuck on the "Sign in to Codex CLI with ChatGPT" screen. The process never completes, and I cannot proceed to use the CLI.
<img width="1191" height="602" alt="Image" src="https://github.com/user-attachments/assets/7b28b82e-664e-43a0-8290-e8af5b5142ad" />
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
I'm a chatGPT pro user. I've tried multiple times to log in this way, but the process always gets stuck in this phase.
27 Comments
Sorry to say, but I'm glad I'm not the only one. Also using latest version 0.25.0 (5.14.0-503.31.1.el9_5.x86_64)
Was it working before?
@aibrahim-oai Yes, it was working before just fine. Happened today that it's stuck upon clicking "Continue".
Kept trying all day, using VPN and various browsers. Just went through. So at least for me it's fixed.
I've been struggling the last couple of days. Sticking to Claude until this is resolved.
PS: Same issue with 0.27.
Issue is still happening, any fixes?
This has been happening to me too. Various browsers, etc. I sign in to chatgpt with Google, not sure if that makes a difference. When I click continue it just spins endlessly, even left it overnight and was still spinning the next day.
The same happens today with me :(
This fix for me was this url, specifically copying a good auth.json file manually to the ssh server
https://github.com/openai/codex/blob/main/docs/authentication.md#connecting-on-a-headless-machine
Well, actually, that's exactly my case! Though it worked perfectly on a remote machine before.
Copying local auth.json helped, thanks!
I just had this problem, which is weird because it was working yesterday. Copying the local auth.json worked for Codex CLI, and to get it working with the Cursor Codex extension I had to uninstall and reinstall.
I had the same issue locally.
The login website just hung after I clicked continue.
I'm using the
fishshell, so I tried opening bash, then running codex CLI. Lo and behold - logging in worked then.So this is something related to what shell you're running, or the env vars set by different shells.
Quick follow-up: I believe they may have fixed this issue as I have not had to manually copy my auth.json file to a few ssh servers that I have recently installed Codex CLI on. The auth flow seems to work properly now, at least for me.
the issue persists, I still got stuck when login
Are you updated to the latest release? I am on 0.41.0
I ran into this issue and figured out what was happening.
When launching through Visual Studio Code, I checked the Ports tab and saw this:
Port 1455 → Forwarded to 1456
That’s the problem — it needs to forward 1455 → 1455.
In my case, another VS Code window was already using port 1455 on my local machine, so the new session couldn’t bind to it and the authentication hung.
Fix:
Close all other VS Code windows (or delete the existing port mapping) so that the session you’re authenticating can correctly forward port 1455 to 1455.
That's great insight, thanks for sharing.
Worked for me as well
I also just had to remove the port mapping in VS Code for 1455.
Thanks for reporting the issue. I think the thread covers a couple of different issues. We had some earlier bugs that have since been fixed. Codex still requires localhost port 1455 for login, but it does a better job dealing with the situation where another instance of codex is already running the login server, and it better handles the case where it cannot acquire the port. I'm going to close out the issue. If you see a related problem, please open a new issue.
Same here.
I got two VS Code instances running as I was working on two projects each in it's own Dev Container. The first one occupies 1455 and the next one takes 1456 - and fails
Thanks for sharing!
I'm still getting this with latest:
At first I get
in the browser, after having logged into my account.
Following trials just hang after selecting a workspace and hitting Continue.
<img width="1466" height="669" alt="Image" src="https://github.com/user-attachments/assets/3b21de68-d9de-46f9-854d-a90b6f513b27" />
This happens once in a while, and works in between.
Just go to the Ports tab on your VSCode on different screens and make sure to remove all open port 1455s.
This is for codex cli, unrelated to vs code.
On Sat, Dec 6, 2025, 23:16 Faraz Shahsavan @.***> wrote:
I'm going to lock this issue.
As I mentioned above, this issue covers a bunch of unrelated underlying issues, most of which have already been addressed.
If you are seeing a related problem, please open a new issue. This will help us diagnose and fix any remaining problems.