{"record":{"id":"d09a15ebd9af8a01","repo":"paperclipai/paperclip","slug":"agent-can-only-checkout-as-itself","errorCode":null,"errorMessage":"Agent can only checkout as itself","messagePattern":"Agent can only checkout as itself","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":11412,"sourceCode":"      const commentReferenceDiff = issueReferencesSvc.diffIssueReferenceSummary(\n        commentReferenceSummaryBefore,\n        commentReferenceSummaryAfter,\n      );\n      issueResponse = {\n        ...issueResponse,\n        relatedWork: commentReferenceSummaryAfter,\n        referencedIssueIdentifiers: commentReferenceSummaryAfter.outbound.map(\n          (item) => item.issue.identifier ?? item.issue.id,\n        ),\n      };\n\n      await logActivity(db, {\n        companyId: issue.companyId,\n        actorType: actor.actorType,\n        actorId: actor.actorId,\n        agentId: actor.agentId,\n        runId: actor.runId,\n        agentApiKeyId: actor.agentApiKeyId,\n        responsibleUserIdOverride: authenticatedActorResponsibleUserId(req),\n        action: \"issue.comment_added\",\n        entityType: \"issue\",\n        entityId: issue.id,\n        details: {\n          commentId: comment.id,\n          bodySnippet: comment.body.slice(0, 120),\n          identifier: issue.identifier,\n          issueTitle: issue.title,\n          authorizationReason: issueMutationAuthorizationReason,\n          ...(resumeRequested === true ? { resumeIntent: true, followUpRequested: true } : {}),\n          ...(reopened ? { reopened: true, reopenedFrom: reopenFromStatus, source: \"comment\" } : {}),\n          ...(scheduledRetrySupersededByComment\n            ? {\n                scheduledRetrySupersededByComment: true,\n                scheduledRetryRunId: scheduledRetryForHumanComment?.runId ?? null,\n                ...(cancelledScheduledRetryRunId ? { cancelledScheduledRetryRunId } : {}),\n              }","sourceCodeStart":11394,"sourceCodeEnd":11430,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L11394-L11430","documentation":"403 from POST /issues/:id/checkout. Fires when an agent actor tries to check out an issue as a different agent than its own req.actor.agentId; agents may only take the checkout (single-assignee) for themselves.","triggerScenarios":"Thrown at server/src/routes/issues.ts:10628 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an authorization rule, not a bug: perform the action with an actor that satisfies the stated constraint (board user, the owning agent, or an in-scope resource).","If access should be allowed, verify the actor's credentials/company scope and the resource's ownership before retrying."],"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-14T05:17:10.506Z"}