Background
Issues #100 and #121 touched this topic. #121 was closed with fix in b918aac, which addressed quota-cache display for same-email multi-workspace entries that were already stored. However, the registration path (i.e., running codex-multi-auth login to add a second workspace for an email that already has one) remains unsupported.
Use Case
A user has a single Google/OpenAI account (user@gmail.com) that belongs to two separate ChatGPT workspaces:
- Personal Plus – individual subscription, org_id =
org-AAAA
- Business / Team workspace – organization subscription, org_id =
org-BBBB
Both workspaces are distinct quota pools. The user wants to track and rotate between them independently, just like two separate email accounts.
Current Behavior
codex-multi-auth login with user@gmail.com → OAuth completes for one workspace (e.g., Business) → stored as Account N.
- Running
codex-multi-auth login again for the same email (Personal Plus workspace) either:
- Overwrites Account N (loses the Business workspace entry), or
- Blocks the addition because the
duplicate-email doctor check treats email as the unique key.
- The
accounts.json schema has no workspaceName/workspaceId field populated, so there is no way to distinguish the two entries even if both were stored.
Expected Behavior
Option A – Workspace selection during login: when codex-multi-auth login detects the OAuth response belongs to an email already registered but with a different accountId (org_id), prompt the user to confirm adding it as a new entry rather than overwriting.
Option B – Explicit workspace flag: codex-multi-auth login --new-workspace or codex-multi-auth login --org <org_id> to force-create a second entry for the same email.
Either way, the stored entry should include a workspaceName or workspaceLabel field so codex-multi-auth list can distinguish:
1. user@gmail.com [Personal Plus] org-AAAA
2. user@gmail.com [GkTech Business] org-BBBB
Environment
codex-multi-auth version: 2.1.12
@openai/codex version: 0.135.0
- OS: Windows 11 Enterprise
- Node.js: (via C:\nodejs)
Diagnostics
Current accounts.json structure (sanitized):
{
"accounts": [
{ "email": "user@gmail.com", "accountId": "org-AAAA", "workspaceName": "" },
{ "email": "user@gmail.com", "accountId": "org-BBBB", "workspaceName": "" }
]
}
The workspaceName field is always empty even after login, making it impossible to label or distinguish same-email entries.
Related Issues
Compliance
Background
Issues #100 and #121 touched this topic. #121 was closed with fix in b918aac, which addressed quota-cache display for same-email multi-workspace entries that were already stored. However, the registration path (i.e., running
codex-multi-auth loginto add a second workspace for an email that already has one) remains unsupported.Use Case
A user has a single Google/OpenAI account (
user@gmail.com) that belongs to two separate ChatGPT workspaces:org-AAAAorg-BBBBBoth workspaces are distinct quota pools. The user wants to track and rotate between them independently, just like two separate email accounts.
Current Behavior
codex-multi-auth loginwithuser@gmail.com→ OAuth completes for one workspace (e.g., Business) → stored as Account N.codex-multi-auth loginagain for the same email (Personal Plus workspace) either:duplicate-emaildoctor check treatsemailas the unique key.accounts.jsonschema has noworkspaceName/workspaceIdfield populated, so there is no way to distinguish the two entries even if both were stored.Expected Behavior
Option A – Workspace selection during login: when
codex-multi-auth logindetects the OAuth response belongs to an email already registered but with a differentaccountId(org_id), prompt the user to confirm adding it as a new entry rather than overwriting.Option B – Explicit workspace flag:
codex-multi-auth login --new-workspaceorcodex-multi-auth login --org <org_id>to force-create a second entry for the same email.Either way, the stored entry should include a
workspaceNameorworkspaceLabelfield socodex-multi-auth listcan distinguish:Environment
codex-multi-authversion: 2.1.12@openai/codexversion: 0.135.0Diagnostics
Current
accounts.jsonstructure (sanitized):{ "accounts": [ { "email": "user@gmail.com", "accountId": "org-AAAA", "workspaceName": "" }, { "email": "user@gmail.com", "accountId": "org-BBBB", "workspaceName": "" } ] }The
workspaceNamefield is always empty even after login, making it impossible to label or distinguish same-email entries.Related Issues
Compliance