Skip to content

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

Closed

Description

@Thelastpoet

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.

Activity

  1. etraut-openai commented on Nov 23, 2025

    @etraut-openai
    Contributor

    Are you still seeing this problem with the latest version of codex?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions