Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: preserve ordinary recovered agent result shape

Adam Eivy5f97efc83c43
diff --git a/server/services/agentFinalization.js b/server/services/agentFinalization.js
index d7e9e657c3..33a314e258 100644
--- a/server/services/agentFinalization.js
+++ b/server/services/agentFinalization.js
@@ -1270,8 +1270,8 @@ export async function retireDeadAgent({ agent, task, success, exitCode, duration
await completeAgent(agent.id, {
success: effectiveSuccess,
executionSuccess,
- cleanupPending: recoveryUpdate?.metadata?.deliveryRecoveryAgentId === agent.id,
- cleanupDeliveryVerified: savedCleanup,
+ ...(recoveryUpdate?.metadata?.deliveryRecoveryAgentId === agent.id ? { cleanupPending: true } : {}),
+ ...(savedCleanup ? { cleanupDeliveryVerified: true } : {}),
taskOutcome,
validationPassed,
exitCode,
@@ -1963,7 +1963,7 @@ export async function finalizeAgent({
// failure.
await completeAgent(agentId, { ...completionRecord({
task, verdict: deliveryVerdict, hookResult, fidelity, executionInterruption, exitCode, duration, outputBuffer, validationPassed,
- }), executionSuccess, taskOutcome, cleanupPending: taskUpdate.metadata?.deliveryRecoveryAgentId === agentId });
+ }), executionSuccess, taskOutcome, ...(taskUpdate.metadata?.deliveryRecoveryAgentId === agentId ? { cleanupPending: true } : {}) });
if (runId) {
// Every failed verdict overrides exit-code/commit rescue in run tracking,