Getting ERROR: [Errno 98] Address already in use across npm and brew

Resolved 💬 7 comments Opened Aug 11, 2025 by seIIers Closed Sep 4, 2025
💡 Likely answer: A maintainer (seratch, member) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.20.0

Which model were you using?

n/a

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64 (Ubuntu 22.04.5)

What steps can reproduce the bug?

  1. Remove previous version npm uninstall -g @openai/codex & rm -rf ~/.codex
  1. Reinstall npm install -g @openai/codex@latest
  1. codex login fails with:
ERROR: [Errno 98] Address already in use
Error logging in: login_with_chatgpt subprocess failed:
  1. Uninstall codex & remove config
  1. Install with linuxbrew brew install codex
  1. codex fails with:
>_ Welcome to Codex, OpenAI's command-line coding agent

> Sign in with ChatGPT to use Codex as part of your paid plan
  or connect an API key for usage-based billing

> 1. Sign in with ChatGPT
     Usage included with Plus, Pro, and Team plans
  2. Provide your own API key
     Pay for what you use

  Press Enter to continue

ERROR: [Errno 98] Address already in use
  1. and codex login
ERROR: [Errno 98] Address already in use
Error logging in: login_with_chatgpt subprocess failed:

What is the expected behavior?

To be prompted to login with a link or browser open

What do you see instead?

ERROR: [Errno 98] Address already in use
Error logging in: login_with_chatgpt subprocess failed:

Additional information

Debugging

  1. ss -tulnp does not display anything in use for the OAuth required port 1455. Why is this hardcoded?
  2. lsof -i :1455 -P -n returns nothing
  3. navigating to http://localhost:1455 errors with ERR_CONNECTION_REFUSED obviously
  4. netstat -ano | findstr :1455 returns nothing
  5. No docker containers using 1455

View original on GitHub ↗

7 Comments

seratch member · 11 months ago

version 0.22.0 replaces the web server implementation, so this issue no longer arises. Could you try npm -g i @openai/codex@latest?

journeytosilius · 10 months ago

I have updated to latest and I still get this error Address in use (os error 98). I am using codex in VsCode at the same time

seIIers · 10 months ago
version 0.22.0 replaces the web server implementation, so this issue no longer arises. Could you try npm -g i @openai/codex@latest?

I no longer get this issue in the latest version of Codex and have since switched to native. Thanks!

seIIers · 10 months ago
I have updated to latest and I still get this error Address in use (os error 98). I am using codex in VsCode at the same time

What version? Have you tried native? npm -g i @openai/codex@native has been working fine for me.

edit: should also mention I upgraded my WSL2 instance to Ubuntu 24.04 since attempting to get Codex working with my subscription.

journeytosilius · 10 months ago

I tried, but it requires a Git repo or so it seems. What I want is to use the CLI giving it permissions to use my actual computer. For repo use I'm using codex on Vscode

JohnDotOwl · 10 months ago

Same Issue

gpeal contributor · 10 months ago

Duplicate of #2671