{"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":5152,"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 normalizeLedgerBillingType(value: unknown): BillingType {\n  const raw = readNonEmptyString(value);\n  switch (raw) {\n    case \"api\":\n    case \"metered_api\":\n      return \"metered_api\";\n    case \"subscription\":\n    case \"subscription_included\":\n      return \"subscription_included\";\n    case \"subscription_overage\":\n      return \"subscription_overage\";\n    case \"credits\":\n      return \"credits\";","sourceCodeStart":5134,"sourceCodeEnd":5170,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/heartbeat.ts#L5134-L5170","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":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}