Cannot log in and log out of the codex

Open 💬 2 comments Opened Jun 19, 2026 by AIVIETNAM-AIO-kbthinh
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.616.32156 • Released Jun 19, 2026

What subscription do you have?

plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

I cannot log in or log out of the Codex app or check for an account statement. Whenever I click on the settings icon at the bottom of the left side of the Codex app, it only shows the "settings" option ( illustrated in the image below)

<img width="659" height="736" alt="Image" src="https://github.com/user-attachments/assets/294bd3be-2dd1-485d-8225-fd48e1b07033" />.
And when I try to chat about something, it returns an error "stream disconnected before completion: error sending request for url (http://127.0.0.1:20128/v1/responses" after reconnecting 5 times.

What steps can reproduce the bug?

I don't know how to reproduce it. It suddenly happened like that.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #28809
  • #28516

Powered by Codex Action

quan-te · 1 month ago

Hi @AIVIETNAM-AIO-kbthinh ,

This error typically occurs when your local AI Gateway (9router or OmniRoute) running on port 20128 is either not running, or is dropping the connection stream during long reasoning/thinking phases.

Here is how you can diagnose and fix this on your machine:

---

1. Check if the service is running on port 20128

Run this command in your terminal to see if any local process is listening on that port:

lsof -i :20128
  • If you see a node or 9router process (status LISTEN): The gateway is active. The disconnection might be caused by an idle timeout during deep thinking or a missing keep-alive stream (Proceed to Step 3).
  • If the output is empty: The gateway service is stopped or has crashed (Proceed to Step 2).

---

2. Start the gateway service

If the port is inactive, you need to spin up the local server again. Run:

9router -n -l
  • -n or --no-browser: Prevents automatically opening a browser tab.
  • -l or --log: Shows active server logs to help you monitor incoming requests.

(Once started, you can verify it by opening http://localhost:20128 in your browser).

---

3. Update to the latest version (Crucial for Stream/Reasoning Timeout)

Older versions of 9router (e.g., < 0.5.30) do not have early-stream keep-alive mechanisms. When using reasoning models (like Claude 3.7 Sonnet or o1/o3-mini) that take several seconds to output the first token, the client (which has a strict default 5s timeout) will drop the stream with a stream disconnected error.

Update 9router globally to get the latest streaming & keep-alive fixes:

npm install -g 9router

---

Let me know if restarting/updating the service resolves the issue for you!