{"record":{"id":"9e1eccadca716d97","repo":"paperclipai/paperclip","slug":"inherited-workspace-reuse-failed","errorCode":"inherited_workspace_reuse_failed","errorMessage":"Issue ${issueLabel} requested inherited execution workspace reuse for ${workspaceLabel}, but the workspace could not be restored because ${causeMessage}. ${remediation}","messagePattern":"Issue (.+?) requested inherited execution workspace reuse for (.+?), but the workspace could not be restored because (.+?)\\. (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/heartbeat.ts","lineNumber":4825,"sourceCode":"  for (const [key, value] of [\n    [\"summary\", input.summary],\n    [\"result\", input.result],\n    [\"message\", input.message],\n    [\"error\", input.error],\n  ] as const) {\n    const normalized = readNonEmptyString(value);\n    if (normalized) summary[key] = normalized;\n  }\n\n  for (const [key, value] of [\n    [\"total_cost_usd\", input.totalCostUsd],\n    [\"cost_usd\", input.costUsd],\n    [\"costUsd\", input.costUsdCamel],\n  ] as const) {\n    const normalized = readNonEmptyString(value);\n    if (!normalized) continue;\n    const parsed = Number(normalized);\n    if (Number.isFinite(parsed)) summary[key] = parsed;\n  }\n\n  return Object.keys(summary).length > 0 ? summary : null;\n}\n\nfunction didAutomaticRecoveryFail(\n  latestRun: Pick<\n    typeof heartbeatRuns.$inferSelect,\n    \"status\" | \"contextSnapshot\"\n  > | null,\n  expectedRetryReason:\n    | \"assignment_recovery\"\n    | \"issue_continuation_needed\"\n    | typeof EXECUTION_REVIEW_PARTICIPANT_RECOVERY_RETRY_REASON,\n) {\n  if (!latestRun) return false;\n\n  const latestContext = parseObject(latestRun.contextSnapshot);","sourceCodeStart":4807,"sourceCodeEnd":4843,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/heartbeat.ts#L4807-L4843","documentation":"Error \"Issue ${issueLabel} requested inherited execution workspace reuse for ${workspaceLabel}, but the workspace could not be restored because ${causeMessage}. ${remediation}\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/services/heartbeat.ts:4506 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the cause of the workspace restore failure named in the message, or follow the remediation provided."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}