{"record":{"id":"ea7565b5a3081813","repo":"paperclipai/paperclip","slug":"task-bridge-keys-cannot-use-company-wide-issue-lis","errorCode":null,"errorMessage":"Task bridge keys cannot use company-wide issue list APIs","messagePattern":"Task bridge keys cannot use company-wide issue list APIs","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":6086,"sourceCode":"        assigneeAgentId: input.assigneeAgentId,\n      },\n    );\n  }\n\n  async function normalizeIssueAssigneeAgentReference(\n    companyId: string,\n    rawAssigneeAgentId: string | null | undefined,\n    options: { actorType?: string } = {},\n  ) {\n    if (rawAssigneeAgentId === undefined || rawAssigneeAgentId === null) {\n      return rawAssigneeAgentId;\n    }\n\n    const raw = rawAssigneeAgentId.trim();\n    if (raw.length === 0) {\n      return rawAssigneeAgentId;\n    }\n\n    const resolved = await agentsSvc.resolveByReference(companyId, raw);\n    if (resolved.ambiguous) {\n      throw conflict(\"Agent shortname is ambiguous in this company. Use the agent ID.\");\n    }\n    if (!resolved.agent) {\n      throw notFound(\"Agent not found\");\n    }\n    if (resolved.agent.status === \"pending_approval\") {\n      throw conflict(\"Cannot assign work to pending approval agents\");\n    }\n    if (resolved.agent.status === \"terminated\") {\n      throw conflict(\"Cannot assign work to terminated agents\");\n    }\n    // Agents must not route work to a paused peer/manager: the assignment is\n    // accepted silently, nothing will ever run it, and the issue becomes an\n    // invisible dead letter (e.g. escalation issues assigned to a paused\n    // manager via the org chart). Humans may still assign to paused agents\n    // deliberately — the pause state is visible in the UI and staging work","sourceCodeStart":6068,"sourceCodeEnd":6104,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L6068-L6104","documentation":"403 from the company-wide issue list: the actor is a task bridge key, and task bridge keys are restricted from company-wide issue list APIs by policy.","triggerScenarios":"Thrown at server/src/routes/issues.ts:5780 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-14T00:17:10.932Z"}