{"record":{"id":"a3b3aee96dd4bb28","repo":"paperclipai/paperclip","slug":"task-bridge-keys-cannot-use-company-wide-issue-cou","errorCode":null,"errorMessage":"Task bridge keys cannot use company-wide issue count APIs","messagePattern":"Task bridge keys cannot use company-wide issue count APIs","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":7643,"sourceCode":"\n    return { project, goal: null };\n  }\n\n  function compactIssueProjectWorkspace(\n    workspace: ProjectWorkspace | null | undefined,\n  ) {\n    if (!workspace) return null;\n    return {\n      id: workspace.id,\n      companyId: workspace.companyId,\n      projectId: workspace.projectId,\n      name: workspace.name,\n      sourceType: workspace.sourceType,\n      cwd: workspace.cwd,\n      repoUrl: workspace.repoUrl,\n      repoRef: workspace.repoRef,\n      defaultRef: workspace.defaultRef,\n      visibility: workspace.visibility,\n      setupCommand: workspace.setupCommand,\n      cleanupCommand: workspace.cleanupCommand,\n      remoteProvider: workspace.remoteProvider,\n      remoteWorkspaceRef: workspace.remoteWorkspaceRef,\n      sharedWorkspaceKey: workspace.sharedWorkspaceKey,\n      runtimeConfig: workspace.runtimeConfig,\n      isPrimary: workspace.isPrimary,\n      createdAt: workspace.createdAt,\n      updatedAt: workspace.updatedAt,\n    };\n  }\n\n  function compactIssueProject(\n    project: Awaited<ReturnType<typeof resolveIssueProjectAndGoal>>[\"project\"],\n  ) {\n    if (!project) return null;\n    return {\n      id: project.id,","sourceCodeStart":7625,"sourceCodeEnd":7661,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/routes/issues.ts#L7625-L7661","documentation":"403 from GET /companies/:companyId/issues/count: the actor is a task bridge key, and task bridge keys are restricted from company-wide issue count APIs by policy.","triggerScenarios":"Thrown at server/src/routes/issues.ts:6072 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":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}