{"record":{"id":"7183449954e1247f","repo":"paperclipai/paperclip","slug":"responsible-user-unresolved","errorCode":"responsible_user_unresolved","errorMessage":"Unable to resolve responsible user for heartbeat run dispatch","messagePattern":"Unable to resolve responsible user for heartbeat run dispatch","errorType":"http","errorClass":"HttpError","httpStatus":422,"severity":"error","filePath":"server/src/services/heartbeat.ts","lineNumber":7504,"sourceCode":"    \"id\" | \"companyId\" | \"agentId\" | \"status\" | \"contextSnapshot\"\n  >,\n  update: RuntimeStatusUpdate,\n  issueId: string | null,\n) {\n  if (!isHeartbeatRunRuntimeStatusActive(run.status)) return null;\n  const status = setHeartbeatRunRuntimeStatus({\n    companyId: run.companyId,\n    issueId,\n    agentId: run.agentId,\n    runId: run.id,\n    phase: update.phase as HeartbeatRunStatusPhase,\n    message: update.message,\n    currentToolName: readNonEmptyString(update.currentToolName) ?? null,\n    lastAssistantSnippet:\n      readNonEmptyString(update.lastAssistantSnippet) ?? null,\n    lastEventAt: update.lastEventAt ? new Date(update.lastEventAt) : new Date(),\n  });\n  if (!status) return null;\n\n  publishHeartbeatRunRuntimeProgress(status);\n  return status;\n}\n\nfunction sanitizeLiveRunProgressText(\n  value: string,\n  maxChars: number,\n): string | null {\n  const normalized = value.replace(/\\s+/g, \" \").trim();\n  if (!normalized) return null;\n  const redacted = redactSensitiveText(normalized);\n  if (redacted.length <= maxChars) return redacted;\n  return `${redacted.slice(0, maxChars - 3)}...`;\n}\n\nfunction readLiveRunProgressString(\n  value: unknown,","sourceCodeStart":7486,"sourceCodeEnd":7522,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/heartbeat.ts#L7486-L7522","documentation":"resolveResponsibleUserIdForRun could not determine which user is responsible for a heartbeat run dispatch from the company, run context snapshot, issue context, or routine env. This is an internal dispatch guard: the run cannot proceed without a responsible principal.","triggerScenarios":"Thrown at server/src/services/heartbeat.ts:7419 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Assign a responsible user for the company before dispatching heartbeat runs."],"exampleFix":null,"handlingStrategy":"fallback","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"}