{"record":{"id":"5e616571eb054a39","repo":"paperclipai/paperclip","slug":"selected-wiki-maintainer-agent-was-not-found-or-is","errorCode":null,"errorMessage":"Selected Wiki Maintainer agent was not found or is terminated.","messagePattern":"Selected Wiki Maintainer agent was not found or is terminated\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/wiki/core.ts","lineNumber":2062,"sourceCode":"export async function resetWikiAgentResource(ctx: PluginContext, companyId: string): Promise<WikiAgentResource> {\n  const resolved = await ctx.agents.managed.reset(WIKI_MAINTAINER_AGENT_KEY, companyId);\n  if (resolved.agentId) {\n    await upsertResourceBinding(ctx, {\n      companyId,\n      wikiId: DEFAULT_WIKI_ID,\n      resourceKind: \"agent\",\n      resourceKey: WIKI_MAINTAINER_AGENT_KEY,\n      resolvedId: resolved.agentId,\n      metadata: { source: \"managed-default\", updatedBy: \"reset\" },\n    });\n  }\n  return agentResource({ status: resolved.status, source: \"managed\", agent: resolved.agent, defaultDrift: resolved.defaultDrift ?? null });\n}\n\nexport async function selectWikiAgentResource(ctx: PluginContext, input: { companyId: string; agentId: string }): Promise<WikiAgentResource> {\n  const agent = await ctx.agents.get(input.agentId, input.companyId);\n  if (!agent || agent.status === \"terminated\") {\n    throw new Error(\"Selected Wiki Maintainer agent was not found or is terminated.\");\n  }\n  await upsertResourceBinding(ctx, {\n    companyId: input.companyId,\n    wikiId: DEFAULT_WIKI_ID,\n    resourceKind: \"agent\",\n    resourceKey: WIKI_MAINTAINER_AGENT_KEY,\n    resolvedId: agent.id,\n    metadata: { source: \"selected-existing\", updatedBy: \"settings\" },\n  });\n  return agentResource({ status: \"resolved\", source: \"selected\", agent });\n}\n\nexport async function reconcileWikiProjectResource(ctx: PluginContext, companyId: string): Promise<WikiProjectResource> {\n  const resolved = await ctx.projects.managed.reconcile(WIKI_PROJECT_KEY, companyId);\n  if (resolved.projectId) {\n    await upsertResourceBinding(ctx, {\n      companyId,\n      wikiId: DEFAULT_WIKI_ID,","sourceCodeStart":2044,"sourceCodeEnd":2080,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/plugins/plugin-llm-wiki/src/wiki/core.ts#L2044-L2080","documentation":"Error \"Selected Wiki Maintainer agent was not found or is terminated.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:2063 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Select an existing, non-terminated agent as Wiki Maintainer, or create/hire one."],"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"}