From 51ecd6d1238b3b0010e638816c180bfcbc74fcbf Mon Sep 17 00:00:00 2001 From: Xinlu <80815354+mistyhey@users.noreply.github.com> Date: Fri, 20 Nov 2026 06:11:29 +0100 Subject: [PATCH] fix: replace cached plan usage when the plan changes A reading with a new plan but no limits yet was dropped in favour of the old one, so an upgraded account kept showing its old 5-hour window. Co-Authored-By: Claude Opus 5.5 --- server/src/manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/manager.ts b/server/src/manager.ts index 80bb6e7..fb09efd 100644 --- a/server/src/manager.ts +++ b/server/src/manager.ts @@ -918,8 +918,8 @@ export class Manager implements SessionHost, SessionToolHost { q.close(); } } - // Keep a good reading over a half answer. - if (u && (settled(u) || !this.usage)) { + // Keep a good reading over a half answer, unless the plan changed: the old windows no longer apply. + if (u && (settled(u) || !this.usage || u.plan !== this.usage.plan)) { this.usage = u; this.broadcastGlobal(event('usage', { usage: u })); }