fix: preserve recovered workspace session state

This commit is contained in:
Mohamed Boudra
2026-07-16 15:16:51 +02:00
parent 1e06785c0a
commit 9b7f15828c
3 changed files with 46 additions and 5 deletions
+5 -3
View File
@@ -4012,9 +4012,11 @@ export class Session {
private async restoreWorkspaceAndEmit(workspaceId: string): Promise<void> {
await this.workspaceRecovery.restore(workspaceId);
await this.emitWorkspaceUpdatesForWorkspaceIds([workspaceId], {
skipReconcile: true,
});
const workspace = await this.workspaceRegistry.get(workspaceId);
if (!workspace) {
throw new Error(`Recovered workspace record not found: ${workspaceId}`);
}
await this.workspaceGitObserver.warmGitData(workspace);
}
private async restoreOwningWorkspaceForLegacyAgentRefresh(agentId: string): Promise<void> {