paperclipai/paperclip · error
Failed to archive execution workspace: ${failureReason}
Error message
Failed to archive execution workspace: ${failureReason} What it means
Post-archive cleanup threw and the failure was captured as failureReason; the row is marked cleanup_failed only if it is still closed at the captured generation, otherwise the message records why the archive pipeline did not complete cleanly.
Source
Thrown at server/src/routes/execution-workspaces.ts:1341
}
} catch (error) {
const failureReason = error instanceof Error ? error.message : String(error);
// Mark cleanup_failed only while the row is still closed at the captured
// generation. If a resume reopened the workspace after the cleanup threw,
// the row is active again and, after a fresh archive, carries a higher
// generation. The generation-fenced write skips the row in both cases, so
// a stale cleanup_failed write never overwrites the newer active lifecycle
// state, and never buries a newer archive under the first archive's
// failure.
const marked = await svc.applyClosedWorkspaceCleanupOutcome({
id,
closedAt,
capturedGeneration,
cleanupReason: failureReason,
markCleanupFailed: true,
});
if (marked) workspace = marked;
res.status(500).json({
error: `Failed to archive execution workspace: ${failureReason}`,
});
return;
}
} else {
const updatedWorkspace = await svc.update(id, patch);
if (!updatedWorkspace) {
res.status(404).json({ error: "Execution workspace not found" });
return;
}
workspace = updatedWorkspace;
}
const actor = getActorInfo(req);
await logActivity(db, {
companyId: existing.companyId,
actorType: actor.actorType,
actorId: actor.actorId,
agentId: actor.agentId,View on GitHub (pinned to a7e689b3c3)
Solutions
- Check the health/connectivity of the backing service (database, dev server supervisor, storage), fix the underlying fault, and retry.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at server/src/routes/execution-workspaces.ts:909 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18).
Data as JSON: /api/errors/abacf5b6260d944c.
Report an issue: GitHub.