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 {