From e085dc11a94c56bbfc2685f2c2ae86b9428e469a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 2 Oct 2026 22:25:21 +0000 Subject: [PATCH] fix(adapters): state the consolidation time in the user's zone; name the memory migration after its content Profile consolidation now passes the profile's time zone to the shared time instruction, which takes the zone since every run states the time in the user's zone. The semantic memory migration is renamed after what it creates. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u --- packages/adapters/src/profile-consolidation.ts | 6 ++++-- .../migration.sql | 0 2 files changed, 4 insertions(+), 2 deletions(-) rename packages/db/prisma/migrations/{20261002210400_ws4_semantic_memory => 20261002210400_builtin_semantic_memory}/migration.sql (100%) diff --git a/packages/adapters/src/profile-consolidation.ts b/packages/adapters/src/profile-consolidation.ts index fffe470..2831229 100644 --- a/packages/adapters/src/profile-consolidation.ts +++ b/packages/adapters/src/profile-consolidation.ts @@ -332,7 +332,7 @@ export async function consolidateProfile( where: { userId }, create: { userId }, update: {}, - select: { consolidatedAt: true, summary: true }, + select: { consolidatedAt: true, summary: true, timeZone: true }, }); const lookbackStart = new Date(now - PROFILE_CONSOLIDATION_LOOKBACK_MS); const since = @@ -398,6 +398,7 @@ export async function consolidateProfile( runId: `consolidate:${userId}:${cursor.toISOString()}`, prompt, model, + timeZone: profile.timeZone, }); if (reply === null) return; update = parseProfileUpdate(reply); @@ -463,6 +464,7 @@ async function requestProfileUpdate( runId: string; prompt: string; model: AgentRunRequest["model"]; + timeZone: string | null; }, ): Promise { let reply = ""; @@ -474,7 +476,7 @@ async function requestProfileUpdate( threadId: input.threadId, runId: input.runId, prompt: input.prompt, - instructions: `${formatCurrentTimeInstruction()} ${CONSOLIDATION_INSTRUCTIONS}`, + instructions: `${formatCurrentTimeInstruction(input.timeZone)} ${CONSOLIDATION_INSTRUCTIONS}`, history: [], tools: [], model: input.model, diff --git a/packages/db/prisma/migrations/20261002210400_ws4_semantic_memory/migration.sql b/packages/db/prisma/migrations/20261002210400_builtin_semantic_memory/migration.sql similarity index 100% rename from packages/db/prisma/migrations/20261002210400_ws4_semantic_memory/migration.sql rename to packages/db/prisma/migrations/20261002210400_builtin_semantic_memory/migration.sql