Issue: `codex login` hangs on MSYS2

Resolved 💬 2 comments Opened Nov 20, 2025 by huangsen365 Closed Feb 8, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.60.1

What subscription do you have?

Pro

Which model were you using?

gpt-5 and above

What platform is your computer?

MINGW64_NT-10.0-19044 3.6.5-0eeda3e1.x86_64 x86_64 unknown

What issue are you seeing?

Issue: codex login hangs on MSYS2

Environment:

Problem:
Running:

codex login

opens the browser and redirects to:

http://localhost:1455/auth/callback?code=XXXXXX

but the CLI never completes login and hangs waiting for the callback.

Notes:

  • Works normally in Windows CMD and PowerShell.
  • Fails only inside MSYS2 / MINGW64.

Expected:
CLI should capture the callback and finish authentication.

Actual:
CLI hangs indefinitely with no error.

What steps can reproduce the bug?

Issue: codex login hangs on MSYS2

Environment:

Problem:
Running:

codex login

opens the browser and redirects to:

http://localhost:1455/auth/callback?code=XXXXXX

but the CLI never completes login and hangs waiting for the callback.

Notes:

  • Works normally in Windows CMD and PowerShell.
  • Fails only inside MSYS2 / MINGW64.

Expected:
CLI should capture the callback and finish authentication.

Actual:
CLI hangs indefinitely with no error.

What is the expected behavior?

Issue: codex login hangs on MSYS2

Environment:

Problem:
Running:

codex login

opens the browser and redirects to:

http://localhost:1455/auth/callback?code=XXXXXX

but the CLI never completes login and hangs waiting for the callback.

Notes:

  • Works normally in Windows CMD and PowerShell.
  • Fails only inside MSYS2 / MINGW64.

Expected:
CLI should capture the callback and finish authentication.

Actual:
CLI hangs indefinitely with no error.

Additional information

Issue: codex login hangs on MSYS2

Environment:

Problem:
Running:

codex login

opens the browser and redirects to:

http://localhost:1455/auth/callback?code=XXXXXX

but the CLI never completes login and hangs waiting for the callback.

Notes:

  • Works normally in Windows CMD and PowerShell.
  • Fails only inside MSYS2 / MINGW64.

Expected:
CLI should capture the callback and finish authentication.

Actual:
CLI hangs indefinitely with no error.

View original on GitHub ↗

2 Comments

hackf5 · 9 months ago

I was able to get logged in with codex on MSYS2 and was running it in windows terminal using the zsh shell, however it just plain doesn't work.

I've looked at the MSYS2 docs and it seems like that's probably to be expected, all of the funky terminal stuff you see in the CLI doesn't send the right terminal sequences (or something like that) and you basically can't use it.

Would like to be told otherwise, but this was my experience.

etraut-openai contributor · 6 months ago

Support for MSYS2 is unlikely to ever be a high enough priority for us to get to this, so I'm going to close it.