fix: prevent duplicate generator spawns in handleSessionInit
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -291,8 +291,8 @@ export class SessionRoutes extends BaseRouteHandler {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start agent in background using the helper method
|
// Idempotent: ensure generator is running (matches handleObservations / handleSummarize)
|
||||||
this.startGeneratorWithProvider(session, this.getSelectedProvider(), 'init');
|
this.ensureGeneratorRunning(sessionDbId, 'init');
|
||||||
|
|
||||||
// Broadcast session started event
|
// Broadcast session started event
|
||||||
this.eventBroadcaster.broadcastSessionStarted(sessionDbId, session.project);
|
this.eventBroadcaster.broadcastSessionStarted(sessionDbId, session.project);
|
||||||
|
|||||||
Reference in New Issue
Block a user