paperclipai/paperclip · error · Error

No configured Wiki Maintainer agent is available for this co

Error message

No configured Wiki Maintainer agent is available for this company.

What it means

Thrown when starting a Wiki query operation if no Wiki Maintainer agent is configured for the company (agentId is falsy). The operation is first marked 'blocked', the source issue is set to 'blocked', and a comment is posted before the error surfaces. This makes the failure visible in the issue thread, not just in logs.

Source

Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:3863

    spaceSlug: space.slug,
    operationType: "query",
    title: input.title ?? `Query LLM Wiki: ${question.slice(0, 72)}`,
    prompt: question,
  });
  const agentId = operation.issue.assigneeAgentId;
  const channel = queryStreamChannel(operation.operationId);

  if (!agentId) {
    const warning = "No configured Wiki Maintainer agent is available for this company.";
    await markOperation(ctx, {
      companyId: input.companyId,
      operationId: operation.operationId,
      status: "blocked",
      warning,
    });
    await ctx.issues.update(operation.issue.id, { status: "blocked" }, input.companyId);
    await ctx.issues.createComment(operation.issue.id, warning, input.companyId);
    throw new Error(warning);
  }

  const agent = await ctx.agents.get(agentId, input.companyId);
  if (!agent || agent.status === "paused" || agent.status === "terminated" || agent.status === "pending_approval") {
    const warning = agent
      ? `Wiki Maintainer agent is not invokable while status is ${agent.status}.`
      : "Wiki Maintainer agent could not be loaded.";
    await markOperation(ctx, {
      companyId: input.companyId,
      operationId: operation.operationId,
      status: "blocked",
      warning,
    });
    await ctx.issues.update(operation.issue.id, { status: "blocked" }, input.companyId);
    await ctx.issues.createComment(operation.issue.id, warning, input.companyId);
    throw new Error(warning);
  }

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. Call the select-managed-agent worker action with a valid agentId for the company.
  2. Run reconcile-managed-skills to ensure the Wiki Maintainer skill resource exists, then select an agent that has it.
  3. After fixing, re-open or re-trigger the blocked query operation issue so it transitions out of 'blocked'.

Example fix

// before: query operation with no agent selected -> blocked + thrown error
// after: select a maintainer agent first
worker.actions['select-managed-agent']({ companyId, agentId });
Defensive patterns

Strategy: validation

Validate before calling

async function ensureWikiMaintainer(ctx: PluginContext, companyId: string) {
  const sel = await getWikiAgentSelection(ctx, companyId);
  if (!sel?.agentId) throw new Error('Select a Wiki Maintainer agent before running queries');
  return sel.agentId;
}

Try / catch

try {
  await runWikiQuery(ctx, input);
} catch (err) {
  if (err instanceof Error && /No configured Wiki Maintainer agent/.test(err.message)) {
    await worker.actions['select-managed-agent']({ companyId, agentId });
    // re-trigger the blocked operation issue
  } else throw err;
}

Prevention

When it happens

Trigger: Invoking the LLM Wiki query flow (createOperationIssue with operationType 'query', or the underlying operation runner) before the company has selected a Wiki Maintainer agent via the select-managed-agent action.

Common situations: Fresh company setup where managed resources were reconciled but no agent selected; the previously-selected agent was deleted/terminated and the selection was not reset; select-managed-agent was skipped during onboarding.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/6b93a39f26624d61. Report an issue: GitHub.