fix(agent-jobs): close maintenance jobs after decision

This commit is contained in:
Gabriel Brown
2026-07-10 17:35:33 -04:00
parent 1e1435e656
commit 00f96a126e
3 changed files with 122 additions and 0 deletions
+6
View File
@@ -1540,6 +1540,12 @@ export const applyMaintenanceDecision = mutation({
}
if (!job.threadId) return { success: true };
const now = Date.now();
await ctx.db.patch(args.jobId, {
workspaceStatus: 'stopped',
summary: args.summary,
completedAt: job.completedAt ?? now,
updatedAt: now,
});
const outcome =
args.decision === 'sync'
? 'sync_recommended'