{"record":{"id":"db27c1f81e562c68","repo":"paperclipai/paperclip","slug":"createdbyrunid-is-not-valid-for-this-work-product","errorCode":null,"errorMessage":"createdByRunId is not valid for this work product actor","messagePattern":"createdByRunId is not valid for this work product actor","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":5159,"sourceCode":"        ? paperclipWake.reason\n        : null;\n    if (wakeReason !== \"source_scoped_recovery_action\") return null;\n\n    const recoveryCause = typeof context.recoveryCause === \"string\"\n      ? context.recoveryCause\n      : typeof recovery.cause === \"string\"\n        ? recovery.cause\n        : null;\n    if (\n      recoveryCause === \"successful_run_missing_state\" ||\n      recoveryCause === \"successful_run_missing_issue_disposition\"\n    ) {\n      return null;\n    }\n\n    const firstLine = body.split(/\\r?\\n/, 1)[0]?.trim() || \"Recovery update\";\n    const title = firstLine.length > 160 ? `${firstLine.slice(0, 159)}…` : firstLine;\n    return {\n      kind: \"system_notice\",\n      tone: \"info\",\n      title,\n      detailsDefaultOpen: false,\n      density: \"compact\",\n    };\n  }\n\n  async function assertDeliverableMutationAllowedByRunContext(\n    req: Request,\n    res: Response,\n    issue: { id: string; companyId: string },\n  ) {\n    const run = await loadActorRunContext(req, issue.companyId);\n    if (!run) return true;\n    if (!isStatusOnlyRecoveryContext(run.contextSnapshot)) return true;\n\n    res.status(403).json({","sourceCodeStart":5141,"sourceCodeEnd":5177,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L5141-L5177","documentation":"403 from resolveWorkProductCreatedByRunId: the run id passes the actor match but the run record fails validation — it does not belong to the same company, agent company, or agent — so it is not a valid attribution for this actor.","triggerScenarios":"Thrown at server/src/routes/issues.ts:5004 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the required field(s) in the request path, query, or body as named by the error message, then retry.","Check the API contract in packages/shared validators for the exact required shape of this endpoint."],"exampleFix":null,"handlingStrategy":"validation","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"}