diff --git a/server/src/scenario/scenario-scheduler.service.ts b/server/src/scenario/scenario-scheduler.service.ts index 203c7ed..7b72881 100644 --- a/server/src/scenario/scenario-scheduler.service.ts +++ b/server/src/scenario/scenario-scheduler.service.ts @@ -353,7 +353,9 @@ export class ScenarioSchedulerService { this.logger.log(`Run #${stepRun.runId}: remaining steps cancelled`); - await this.closeBrowserHandle(stepRun.runId); + // Don't close the browser here — maybePreserveSession (called from + // processRunToCompletion's finally block) will either preserve it as a + // session (saveSession=true) or close it (saveSession=false). await this.runRepo.update(stepRun.runId, { status: "fail" }); this.logger.log(`Run #${stepRun.runId} → fail`); }