From 9bd8e7b1db15d397e396b186129d434ee39a0af9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 00:34:23 +0000 Subject: [PATCH] Normalize session cwd matching for bootstrap reuse Co-authored-by: Theo Browne --- apps/t3/src/runtimeApiServer.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/t3/src/runtimeApiServer.ts b/apps/t3/src/runtimeApiServer.ts index 8277b21ae5..124cc538b2 100644 --- a/apps/t3/src/runtimeApiServer.ts +++ b/apps/t3/src/runtimeApiServer.ts @@ -363,9 +363,17 @@ export async function startRuntimeApiServer( }; const ensureLaunchSession = async (): Promise => { + const isLaunchProjectSession = (session: ProviderSession) => { + if (!session.cwd) { + return false; + } + + return path.resolve(session.cwd) === launchCwd; + }; + const existingSession = providerManager .listSessions() - .find((session) => session.cwd === launchCwd && session.status !== "closed"); + .find((session) => isLaunchProjectSession(session) && session.status !== "closed"); if (existingSession) { bootstrapFallbackSession = null; return {