Files
PaperClipAI/ui/src/lib/workspace-restore-marker.ts
T
Devin FoleyandPaperclip bd6caf51bb fix: preserve restore failure results and stop unsafe retries (#14035)
Preserve agent output and earlier execution errors when workspace restore fails. Report the restore phase and confirmed saved-plan links. Require verified repair before retrying unsafe archives, while preserving approval states and the retry budget.

Verified with full CI, 506 focused regression tests, and Greptile 5/5 with all review threads resolved.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-25 11:34:31 -07:00

19 lines
749 B
TypeScript

import { safeWorkspaceRestorePath } from "@paperclipai/shared";
export function workspaceRestoreMarkerDetail(input: {
result: Record<string, unknown> | null | undefined;
savedPlan: boolean;
hasResponse: boolean;
}): string {
const parts = [input.savedPlan
? "Workspace restore failed after the plan was saved. The saved plan is available."
: "Workspace restore failed."];
parts.push("Workspace files need recovery.");
if (!input.hasResponse && input.result?.finalResponseRecorded === false) {
parts.push("No final response was recorded.");
}
const relativePath = safeWorkspaceRestorePath(input.result?.workspaceRestorePath);
if (relativePath) parts.push(`Affected path: ${relativePath}.`);
return parts.join(" ");
}