Skip to content

fix(codex): keep free accounts ready after login - #240

Merged
caigee-cmd merged 1 commit into
mainfrom
fix/codex-free-login-status
Sep 26, 2026
Merged

caigee-cmd merged 1 commit into
mainfrom
fix/codex-free-login-status

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Summary

  • Read the ChatGPT account id from https://api.openai.com/auth.chatgpt_account_id, matching CLIProxyAPI. Free accounts only carry that nested claim, so a successful login was stored without account_id and the console stayed on login failed.
  • Recover an already stored id token on the next credential load, so existing free accounts do not need to sign in again.
  • API access tests were already succeeding because chat does not depend on that field.

Test plan

  • go test ./internal/providers/codex/
  • Sign in a Codex free account and confirm the card leaves login failed after refresh
  • Confirm an already signed-in free account recovers without a new login

OpenAI puts the ChatGPT account id under the nested auth claim. Free
accounts have no top-level account_id, so a successful login was stored
incomplete and the console kept showing login failed.
@caigee-cmd
caigee-cmd merged commit 3123803 into main Sep 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant