Migration from API key to ChatGPT login breaks codex with config error (os error 2)

Resolved 💬 1 comment Opened Sep 24, 2025 by Thelastpoet Closed Nov 25, 2025

What version of Codex is running?

codex-cli 0.40.0

Which model were you using?

gpt-5

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

  1. Previously used Codex CLI with an API key (worked fine).
  2. Followed the official migration guide: Authentication.md – Migrating to ChatGPT login from API key

What is the expected behavior?

Codex should launch normally after authentication using ChatGPT login.

What do you see instead?

Error loading configuration: The system cannot find the file specified. (os error 2)

Additional information

Tried deleting and recreating ~/.codex (rm -rf ~/.codex && mkdir ~/.codex) as suggested in some discussions, but the error persists.

The error occurs consistently after migrating to ChatGPT login.

No issues previously when using API key authentication.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗