Use Case
I have two Claude subscriptions under the exact same email address (and therefore the same Anthropic User ID / accountUuid). One is a Pro corporate account, and the other is a personal Max account.
The Problem
Currently, I cannot connect both of them to TeamClaude simultaneously. When I attempt to connect the second account, it overwrites the first one.
Based on the logic in src/index.js -> upsertOAuthAccount:
// Deduplicate: match by UUID first, then by name
let idx = profile?.accountUuid
? config.accounts.findIndex(a => a.accountUuid === profile.accountUuid)
: -1;
if (idx < 0) idx = config.accounts.findIndex(a => a.name === name);
The aggressive deduplication matches on accountUuid. Even if I pass a custom name during login (e.g., teamclaude login --name personal and teamclaude login --name corporate), the UUID check triggers an overwrite.
Proposed Solution
I'd like to propose adjusting the deduplication logic. If a user explicitly provides a --name flag that differs from existing accounts, it should bypass the strict UUID match and allow the account to be added alongside the other one.
Is this the right approach? If so, I am happy to submit a PR to address this.
Use Case
I have two Claude subscriptions under the exact same email address (and therefore the same Anthropic User ID /
accountUuid). One is a Pro corporate account, and the other is a personal Max account.The Problem
Currently, I cannot connect both of them to TeamClaude simultaneously. When I attempt to connect the second account, it overwrites the first one.
Based on the logic in
src/index.js->upsertOAuthAccount:The aggressive deduplication matches on
accountUuid. Even if I pass a custom name during login (e.g.,teamclaude login --name personalandteamclaude login --name corporate), the UUID check triggers an overwrite.Proposed Solution
I'd like to propose adjusting the deduplication logic. If a user explicitly provides a
--nameflag that differs from existing accounts, it should bypass the strict UUID match and allow the account to be added alongside the other one.Is this the right approach? If so, I am happy to submit a PR to address this.