{"record":{"id":"c7a537cca5eb7a36","repo":"paperclipai/paperclip","slug":"inherited-workspace-reuse-unavailable","errorCode":"inherited_workspace_reuse_unavailable","errorMessage":"Issue ${issueLabel} requested inherited execution workspace reuse for ${workspaceLabel}, but the workspace could not be restored. ${remediation}","messagePattern":"Issue (.+?) requested inherited execution workspace reuse for (.+?), but the workspace could not be restored\\. (.+?)","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":"During run start, the engine tried to reuse an inherited execution workspace but restore returned no result and no earlier failure was captured, so it formats a sentinel inherited_workspace_reuse_unavailable failure and throws. The workspace identified by existingExecutionWorkspaceId could not be restored for reuse.","triggerScenarios":"Thrown at server/src/services/heartbeat.ts:4506 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Follow the remediation in the message, or let the run create a fresh execution workspace instead of reusing the inherited one."],"exampleFix":null,"handlingStrategy":"fallback","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"}