diff --git a/src/commands/auth-choice.apply.oauth.ts b/src/commands/auth-choice.apply.oauth.ts index 5550fe0c8a4..c5170d45533 100644 --- a/src/commands/auth-choice.apply.oauth.ts +++ b/src/commands/auth-choice.apply.oauth.ts @@ -69,8 +69,10 @@ export async function applyAuthChoiceOAuth( spin.stop("Chutes OAuth complete"); await writeOAuthCredentials("chutes", creds, params.agentDir); + const chutesEmail = + typeof creds.email === "string" && creds.email.trim() ? creds.email.trim() : "default"; nextConfig = applyAuthProfileConfig(nextConfig, { - profileId: "chutes:default", + profileId: `chutes:${chutesEmail}`, provider: "chutes", mode: "oauth", }); diff --git a/src/commands/auth-choice.apply.openai.ts b/src/commands/auth-choice.apply.openai.ts index e1e1b244220..0f62c8ed14b 100644 --- a/src/commands/auth-choice.apply.openai.ts +++ b/src/commands/auth-choice.apply.openai.ts @@ -120,8 +120,10 @@ export async function applyAuthChoiceOpenAI( await writeOAuthCredentials("openai-codex", creds, params.agentDir, { syncSiblingAgents: true, }); + const codexEmail = + typeof creds.email === "string" && creds.email.trim() ? creds.email.trim() : "default"; nextConfig = applyAuthProfileConfig(nextConfig, { - profileId: "openai-codex:default", + profileId: `openai-codex:${codexEmail}`, provider: "openai-codex", mode: "oauth", });