{"record":{"id":"e4bda943be32954b","repo":"paperclipai/paperclip","slug":"createdbyrunid-must-match-the-authenticated-agent","errorCode":null,"errorMessage":"createdByRunId must match the authenticated agent run","messagePattern":"createdByRunId must match the authenticated agent run","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":5153,"sourceCode":"    const context = readObject(run.contextSnapshot);\n    const paperclipWake = readObject(context.paperclipWake);\n    const recovery = readObject(paperclipWake.recovery);\n    const wakeReason = typeof context.wakeReason === \"string\"\n      ? context.wakeReason\n      : typeof paperclipWake.reason === \"string\"\n        ? 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 },","sourceCodeStart":5135,"sourceCodeEnd":5171,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L5135-L5171","documentation":"403 from resolveWorkProductCreatedByRunId: an agent actor supplied a createdByRunId that differs from the run id on its authenticated request, so the attribution claim is spoofed.","triggerScenarios":"Thrown at server/src/routes/issues.ts:4998 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the request so it satisfies the condition stated in the error message, then retry; see the throwing line in the named file for the exact check."],"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"}