codex - 💡(How to fix) Fix [Bug] VS Code / Desktop login fails: no listener on localhost:1455 (CLI works) [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#18250Fetched 2026-04-17 08:30:52
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2closed ×1

Error Message

Sign-in failed: Login server error: Login was not completed

Root Cause

Codex CLI login works correctly, but Codex Desktop and VS Code extension fail to complete login. The failure appears to be caused by the local OAuth callback server not starting (no process listening on localhost:1455).

Code Example

Sign-in failed: Login server error: Login was not completed

---

netstat -ano | findstr :1455

---

codex login

---

netstat -ano | findstr :1455

---

TCP    127.0.0.1:1455   LISTENING
RAW_BUFFERClick to expand / collapse

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

26.409.7971.0

What subscription do you have?

Plus

What platform is your computer?

MINGW64_NT-10.0-19045 3.6.5-22c95533.x86_64 x86_64

What issue are you seeing?

Codex CLI login works correctly, but Codex Desktop and VS Code extension fail to complete login. The failure appears to be caused by the local OAuth callback server not starting (no process listening on localhost:1455).

What steps can reproduce the bug?

  1. Open Codex (Desktop app or VS Code extension)
  2. Click "Continue With ChatGPT"
  3. Browser opens for authentication
  4. Complete login successfully in browser
  5. Browser attempts to redirect to: http://localhost:1455/auth/callback

What is the expected behavior?

  1. Codex should start a local server on 127.0.0.1:1455
  2. Browser callback should be received successfully
  3. Login should complete and session should be established

Additional information

Actual Behavior

  • Immediately after clicking "Continue With ChatGPT", the following error appears:

    Sign-in failed: Login server error: Login was not completed
  • The browser eventually redirects to http://localhost:1455/... but shows:

    • "This site can’t be reached" / connection refused
  • At the time of failure, running:

    netstat -ano | findstr :1455

    shows no LISTENING process on port 1455


Important Comparison (CLI vs Extension)

  • When running CLI login:

    codex login

    then:

    netstat -ano | findstr :1455

    shows:

    TCP    127.0.0.1:1455   LISTENING

    → Login completes successfully

  • When using Desktop app or VS Code extension:

    • No LISTENING on 1455
    • Login fails immediately

Key Observation

This strongly suggests:

The Codex Desktop / VS Code extension fails to start the local OAuth callback server on localhost:1455, causing the login flow to fail before completion.


Additional Checks Performed

  • Not using WSL / Remote environments
  • No firewall or proxy blocking localhost
  • Port 1455 is not occupied by other processes
  • CLI login works reliably on same machine
  • Issue reproducible every time in Desktop app and VS Code extension

Possible Root Cause

  • Local login server (OAuth callback listener) not starting in Desktop / extension
  • Port binding failure not surfaced properly
  • Missing fallback (e.g. device code flow) in extension

Impact

  • Unable to use Codex Desktop or VS Code extension with ChatGPT login
  • CLI is the only working interface

extent analysis

TL;DR

The most likely fix is to investigate and resolve the issue with the local OAuth callback server not starting on localhost:1455 in the Codex Desktop and VS Code extension.

Guidance

  • Verify that no other process is occupying port 1455 by running netstat -ano | findstr :1455 and check for any LISTENING processes.
  • Check the Codex Desktop and VS Code extension logs for any errors related to the local OAuth callback server startup.
  • Compare the login flow implementation between the CLI and the Desktop/VS Code extension to identify potential differences that could be causing the issue.
  • Consider implementing a fallback mechanism, such as device code flow, in the extension to handle cases where the local login server fails to start.

Example

No code snippet is provided as the issue is more related to the configuration and startup of the local OAuth callback server.

Notes

The issue seems to be specific to the Codex Desktop and VS Code extension, as the CLI login works correctly. The root cause is likely related to the local login server not starting or failing to bind to port 1455.

Recommendation

Apply a workaround by investigating and resolving the local OAuth callback server startup issue, as the root cause is not clearly identified and may require further debugging.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING