{"record":{"id":"5abb9c2a5b14daea","repo":"paperclipai/paperclip","slug":"paperclip-ingestion-fan-out-exceeds-the-hard-cap-o","errorCode":null,"errorMessage":"Paperclip ingestion fan-out exceeds the hard cap of ${MAX_PAPERCLIP_DISTILLATION_FAN_OUT} enabled profiles.","messagePattern":"Paperclip ingestion fan-out exceeds the hard cap of (.+?) enabled profiles\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/wiki/core.ts","lineNumber":2481,"sourceCode":"  if (project.managedByPlugin?.pluginKey === PLUGIN_ID) return false;\n  if (project.managedByPlugin?.resourceKey === WIKI_PROJECT_KEY) return false;\n  return true;\n}\n\nfunction projectActivityTimestamp(project: Project): string {\n  return isoString(project.updatedAt) ?? new Date().toISOString();\n}\n\nexport async function enableActiveProjectDistillation(ctx: PluginContext, input: {\n  companyId: string;\n  wikiId?: string | null;\n  spaceSlug?: string | null;\n  limit?: number | null;\n}): Promise<EnableActiveProjectDistillationResult> {\n  const wikiId = normalizeWikiId(input.wikiId);\n  const space = await requirePaperclipIngestionPolicy(ctx, { companyId: input.companyId, wikiId, spaceSlug: input.spaceSlug }, \"candidate_search\", { requireEnabledProfile: true });\n  if (typeof input.limit === \"number\" && Number.isFinite(input.limit) && Math.floor(input.limit) > MAX_PAPERCLIP_DISTILLATION_FAN_OUT) {\n    throw new Error(`Paperclip ingestion fan-out exceeds the hard cap of ${MAX_PAPERCLIP_DISTILLATION_FAN_OUT} enabled profiles.`);\n  }\n  const limit = normalizeLimit(input.limit ?? 3, 3, 25);\n  const projects = await ctx.projects.list({ companyId: input.companyId, limit: 200 });\n  const activeProjects = projects\n    .filter(isActiveDistillationProject)\n    .sort((a, b) => projectActivityTimestamp(b).localeCompare(projectActivityTimestamp(a)))\n    .slice(0, limit);\n\n  const selectedProjects: EnableActiveProjectDistillationResult[\"selectedProjects\"] = [];\n  for (const project of activeProjects) {\n    const observedAt = projectActivityTimestamp(project);\n    const cursorId = await upsertPaperclipDistillationCursor(ctx, {\n      companyId: input.companyId,\n      wikiId,\n      spaceId: space.id,\n      projectId: project.id,\n      rootIssueId: null,\n      observedAt,","sourceCodeStart":2463,"sourceCodeEnd":2499,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/plugins/plugin-llm-wiki/src/wiki/core.ts#L2463-L2499","documentation":"Error \"Paperclip ingestion fan-out exceeds the hard cap of ${MAX_PAPERCLIP_DISTILLATION_FAN_OUT} enabled profiles.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:2483 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Disable or consolidate ingestion profiles so enabled profiles per fan-out stay below the cap."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}