Normalize session cwd matching for bootstrap reuse

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 00:34:23 +00:00
1 parent b688456810
commit 9bd8e7b1db
1 file changed
+9 -1
+9 -1
View File
@@ -363,9 +363,17 @@ export async function startRuntimeApiServer(
};
const ensureLaunchSession = async (): Promise<BootstrapSessionResult> => {
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 {