From 4ccde8a3f07d5ebb658213dfe9f69a7b11ec3aac Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Sun, 14 Dec 2025 01:17:22 -0500 Subject: [PATCH] fix(auth): use unified config for account profile touch in ccs.ts Account profiles in unified config mode were failing with "Profile not found" because touchProfile() only checked legacy profiles.json. Now checks unified config first with hasAccountUnified() and calls touchAccountUnified() when the profile exists there, falling back to legacy touchProfile() otherwise. Fixes #98 --- src/ccs.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ccs.ts b/src/ccs.ts index 930bc247..15c57273 100644 --- a/src/ccs.ts +++ b/src/ccs.ts @@ -397,8 +397,12 @@ async function main(): Promise { // Ensure instance exists (lazy init if needed) const instancePath = instanceMgr.ensureInstance(profileInfo.name); - // Update last_used timestamp - registry.touchProfile(profileInfo.name); + // Update last_used timestamp (check unified config first, fallback to legacy) + if (registry.hasAccountUnified(profileInfo.name)) { + registry.touchAccountUnified(profileInfo.name); + } else { + registry.touchProfile(profileInfo.name); + } // Execute Claude with instance isolation const envVars: NodeJS.ProcessEnv = { CLAUDE_CONFIG_DIR: instancePath };