Skip to content

codex-auth login suddenly fails with invalid CODEX_HOME path although nothing was reinstalled or changed #134

Description

@bjspi

I started getting the following error when running codex-auth login on Windows:

PS C:\Windows\System32> codex-auth login

WARNING: proceeding, even though we could not update PATH:
CODEX_HOME points to "C:\\Users\\ntusername\\.codex\\accounts\\login-xxxxxxxxxxxx",
but that path does not exist

Error loading configuration:
CODEX_HOME points to "C:\\Users\\ntusername\\.codex\\accounts\\login-xxxxxxxxxxxx",
but that path does not exist

What is confusing

This started happening suddenly, without:

  • reinstalling codex-auth
  • changing environment variables manually
  • moving any Codex-related directories
  • intentionally modifying my local configuration

The referenced directory no longer exists, but I do not know why CODEX_HOME is still pointing to it.

Questions

  1. Is there any known scenario where CODEX_HOME can become stale or invalid by itself?
  2. Does codex-auth require manual reconfiguration in this situation?
  3. Is there a recommended way to recover from this without completely reinstalling everything?
  4. Should codex-auth login automatically recreate or repair the referenced directory if it is missing?

Additional context

The path looks like a previous login/account identifier. Could an account migration, token cleanup, or automatic cache cleanup have removed the directory while leaving the CODEX_HOME environment variable unchanged?

Environment

  • Windows
  • Shell: PowerShell
  • codex-auth version: codex-auth 0.3.0-alpha.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions