diff --git a/src/services/worker/http/routes/SessionRoutes.ts b/src/services/worker/http/routes/SessionRoutes.ts index fdf93546..8944f6f3 100644 --- a/src/services/worker/http/routes/SessionRoutes.ts +++ b/src/services/worker/http/routes/SessionRoutes.ts @@ -291,8 +291,8 @@ export class SessionRoutes extends BaseRouteHandler { }); } - // Start agent in background using the helper method - this.startGeneratorWithProvider(session, this.getSelectedProvider(), 'init'); + // Idempotent: ensure generator is running (matches handleObservations / handleSummarize) + this.ensureGeneratorRunning(sessionDbId, 'init'); // Broadcast session started event this.eventBroadcaster.broadcastSessionStarted(sessionDbId, session.project);