From cff9008f49643bac027de4a3f7eeb010f601ed8b Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Thu, 11 Jun 2026 19:03:56 -0400 Subject: [PATCH] fix(cliproxy): silence legacy-config skip in pool opt-in prompt Legacy profiles.json-only installs get pool guidance exclusively from ccs doctor (once-per-install semantics); printing a migrate notice on every account add nagged with no dismissal available. Also document why type === 'account' profiles are Claude by schema in the onboarding counter, so the filter is not misread as over-counting. --- src/cliproxy/routing/pool-onboarding-hint.ts | 5 +++++ src/cliproxy/routing/pool-opt-in-prompt.ts | 9 +++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cliproxy/routing/pool-onboarding-hint.ts b/src/cliproxy/routing/pool-onboarding-hint.ts index 338c290c..1eb1ad0e 100644 --- a/src/cliproxy/routing/pool-onboarding-hint.ts +++ b/src/cliproxy/routing/pool-onboarding-hint.ts @@ -96,6 +96,11 @@ function isPoolEnabled(config?: UnifiedConfig): boolean { * * Uses ProfileRegistry so the count respects both legacy profiles.json and * unified config accounts - same source of truth as the rest of the codebase. + * + * type === 'account' implies Claude: per the profile-registry schema, every + * account profile is an isolated Claude instance (CLAUDE_CONFIG_DIR lane) with + * no CLI discriminator. Gemini/Codex multi-account lives in CLIProxy auth + * files, never in profiles.json, so this filter cannot over-count. */ export function countNativeClaudeProfiles(): number { try { diff --git a/src/cliproxy/routing/pool-opt-in-prompt.ts b/src/cliproxy/routing/pool-opt-in-prompt.ts index c5783860..c0f29f6e 100644 --- a/src/cliproxy/routing/pool-opt-in-prompt.ts +++ b/src/cliproxy/routing/pool-opt-in-prompt.ts @@ -149,13 +149,10 @@ export async function maybeOfferPoolRouting( // orphaning the user's config.json profiles. Skip entirely before any prompt // or dismissal persistence. Mirrors the guards in create-command.ts and // account-flow.ts and the hazard documented in pool-onboarding-hint.ts. + // Silent by design: legacy installs receive pool guidance exclusively from + // ccs doctor (pool-onboarding-hint site 1); printing here would nag on every + // account add with no dismissal available. if (!hasUnifiedConfig()) { - console.log( - info( - '[i] Multiple accounts detected, but pool routing needs the unified config. ' + - "Run 'ccs migrate' first, then 'ccs cliproxy pool --enable'." - ) - ); return { prompted: false, enabled: false, skipped: true, skipReason: 'legacy-config' }; }