From b55cd795ab5da18ea5363aa378712b467a17bf22 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Tue, 6 Jan 2026 12:17:40 -0500 Subject: [PATCH] fix(cliproxy): update lastUsedAt on normal execution Previously touchAccount was only called when switching accounts or auto- switching due to quota exhaustion. Now lastUsedAt is updated for every OAuth provider execution, ensuring dashboard shows accurate timestamps. --- src/cliproxy/cliproxy-executor.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cliproxy/cliproxy-executor.ts b/src/cliproxy/cliproxy-executor.ts index 6a031402..5775dedd 100644 --- a/src/cliproxy/cliproxy-executor.ts +++ b/src/cliproxy/cliproxy-executor.ts @@ -462,6 +462,13 @@ export async function execClaudeWithCLIProxy( if (tokenResult.refreshed) { log('Token was refreshed proactively'); } + + // 3a-1. Update lastUsedAt for the account being used + // This ensures dashboard shows accurate "Last used" timestamps + const usedAccount = getDefaultAccount(provider); + if (usedAccount) { + touchAccount(provider, usedAccount.id); + } } // 3b. Preflight quota check - auto-switch to account with quota before launch