{"record":{"id":"4cc894000a684d2a","repo":"paperclipai/paperclip","slug":"agent-run-id-required","errorCode":null,"errorMessage":"Agent run id required","messagePattern":"Agent run id required","errorType":"http","errorClass":null,"httpStatus":401,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":4164,"sourceCode":"        for (const row of rows) if (row.name) nameById.set(row.id, row.name);\n      } catch (err) {\n        logger.warn({ err }, \"failed to resolve agent names for issue write denial copy\");\n      }\n    }\n    return {\n      actorLabel: actorAgentId ? nameById.get(actorAgentId) ?? null : null,\n      assigneeLabel: issue.assigneeAgentId ? nameById.get(issue.assigneeAgentId) ?? null : null,\n      issueIdentifier: issue.identifier ?? null,\n      responsibleUserName: null,\n    };\n  }\n\n  /** Respond to a denied issue write with copy that names boundary, who, and path. */\n  async function denyIssueWrite(\n    req: Request,\n    res: Response,\n    issue: { identifier?: string | null; assigneeAgentId: string | null },\n    code: IssueWriteDenialCode,\n    extraDetails: Record<string, unknown> = {},\n  ) {\n    const labels = await issueWriteDenialLabels(req, issue);\n    const { status, body } = issueWriteDenialResponse(code, labels);\n    res.status(status).json({\n      error: body.error,\n      details: { ...body.details, ...extraDetails },\n    });\n    return false as const;\n  }\n\n  async function assertIssueReadAllowed(req: Request, res: Response, issue: Parameters<typeof decideIssueAccess>[1]) {\n    const key = `${issue.id}:${issue.companyId}:${issue.projectId ?? \"\"}:${issue.parentId ?? \"\"}:${issue.assigneeAgentId ?? \"\"}:${issue.assigneeUserId ?? \"\"}:${issue.status}`;\n    const value = memoizeIssueReadDecision(req, key, () => decideIssueAccess(req, issue, \"issue:read\"));\n    const decision = await value;\n    if (decision.allowed) return true;\n    res.status(403).json({ error: \"Issue is outside this actor's authorization boundary\" });\n    return false;","sourceCodeStart":4146,"sourceCodeEnd":4182,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L4146-L4182","documentation":"400 from requireAgentRunId: the request demands an agent run context but the actor provided no run id, so the run-scoped operation cannot proceed.","triggerScenarios":"Thrown at server/src/routes/issues.ts:4000 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the required field(s) in the request path, query, or body as named by the error message, then retry.","Check the API contract in packages/shared validators for the exact required shape of this endpoint."],"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"}