You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex Auth incorrectly treats different Team users as duplicate main login #51
When adding a ChatGPT Team account to Codex Auth, opencodex rejects it as:
Account is already used by the main Codex login.
In my case the main Codex login and the account being added have different emails and different user ids, but their JWTs share the same https://api.openai.com/auth.chatgpt_account_id.
Observed locally:
main Codex auth email: test_account1@gmail.com
added OAuth email: test_account2@gmail.com
both tokens report the same chatgpt_account_id
user ids / sub differ
This looks like chatgpt_account_id can identify the Team/workspace account, not the individual user. checkAccountIdCollision() currently treats a matching main chatgpt_account_id as a duplicate unconditionally.
I tested a local fix:
extract email from https://api.openai.com/profile.email
only treat the main Codex login as duplicate when both account id and email match, or when email is unavailable
keep the existing pool collision behavior scoped by plan bucket
Validation:
bun test tests/chatgpt-oauth.test.ts tests/codex-auth-collision.test.ts
bun run typecheck
If that approach sounds reasonable, I’m happy to open a small PR.
Activity
lidge-jun commentedon Jun 30, 2026
Could you try in latest version? I small patched but I couldn't E2E, could you give me a screenshot or something?
mincia1110 commentedon Jun 30, 2026
Confirmed on
v2.6.14: this appears fixed.For context, I originally reproduced and filed this issue while testing
v2.6.10, where adding the ChatGPT Team account failed with:After updating to
v2.6.14, I retried the dashboard E2E flow and was able to add the same Team account successfully.So the latest behavior matches the fix in
0da08f9:chatgpt_account_idalone no longer blocks adding a pool accountThanks for the quick patch.
docs(devlog): fix the alert list and record that #87 closed
docs(devlog): fix the alert list and record that lidge-jun#87 closed