{"record":{"id":"9fe3a6c92d4d8b20","repo":"paperclipai/paperclip","slug":"agent-cannot-mutate-another-agent-s-issue","errorCode":null,"errorMessage":"Agent cannot mutate another agent's issue","messagePattern":"Agent cannot mutate another agent's issue","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":4250,"sourceCode":"        return false;\n      }\n      return assertFreshTaskWatchdogSourceMutation(res, watchdogScope, issue);\n    }\n    const boundaryDecision = await decideIssueAccess(req, issue, \"issue:comment\");\n    if (!boundaryDecision.allowed) {\n      return denyIssueWrite(req, res, issue, issueWriteDenialCodeForDecision(boundaryDecision));\n    }\n    return boundaryDecision;\n  }\n\n  function isIssueMentionGrantDecision(decision: true | Awaited<ReturnType<typeof decideIssueAccess>>) {\n    return decision !== true && decision.reason === \"allow_issue_mention_grant\";\n  }\n\n  function isDirectParentReportDecision(decision: true | Awaited<ReturnType<typeof decideIssueAccess>>) {\n    return decision !== true && decision.reason === \"allow_direct_parent_report\";\n  }\n\n  function isDefaultOpenIssueWriteDecision(decision: true | Awaited<ReturnType<typeof decideIssueAccess>>) {\n    return decision !== true && decision.reason === \"allow_visible_issue_write\";\n  }\n\n  async function filterIssuesForActor<T extends Parameters<typeof decideIssueAccess>[1]>(req: Request, rows: T[]) {\n    const decisions = await Promise.all(rows.map((issue) => decideIssueAccess(req, issue, \"issue:read\")));\n    return rows.filter((_, index) => decisions[index]?.allowed);\n  }\n\n  async function actorCanReadCompanyScope(req: Request, companyId: string) {\n    const decision = await access.decide({\n      actor: req.actor,\n      action: \"company_scope:read\",\n      resource: { type: \"company\", companyId },\n    });\n    return decision.allowed;\n  }\n","sourceCodeStart":4232,"sourceCodeEnd":4268,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L4232-L4268","documentation":"The issue is assigned to a different agent and no active checkout-management override exists; in-progress issues keep assignee-scoped run ownership, so this agent's write is denied with the assignee run lock.","triggerScenarios":"Thrown at server/src/routes/issues.ts:4086 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"}