paperclipai/paperclip · error · Error
Wiki Maintainer agent is not invokable while status is ${age
Error message
Wiki Maintainer agent is not invokable while status is ${agent.status}. What it means
Thrown when a Wiki Maintainer agent IS configured but its status is one of 'paused', 'terminated', or 'pending_approval', meaning it cannot be invoked for a session. Like error 504 the operation is marked blocked, the issue set to blocked, and a comment posted with the specific status before throwing.
Source
Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:3879
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);
}
const session = await ctx.agents.sessions.create(agentId, input.companyId, {
taskKey: `plugin:${PLUGIN_ID}:session:wiki:${wikiId}:query:${operation.operationId}`,
reason: "LLM Wiki query session",
});
await ctx.db.execute(
`INSERT INTO ${tableName(ctx.db.namespace, "wiki_query_sessions")}
(id, company_id, wiki_id, space_id, hidden_issue_id, agent_session_id, status, filed_outputs)
VALUES ($1, $2, $3, $6, $4, $5, 'active', '[]'::jsonb)`,
[operation.operationId, input.companyId, wikiId, operation.issue.id, session.sessionId, space.id],
);
const prompt = buildQueryPrompt({ companyId: input.companyId, wikiId, space, question });
ctx.streams.open(channel, input.companyId);
ctx.streams.emit(channel, {
type: "query.started",
operationId: operation.operationId,View on GitHub (pinned to 67001ec6eb)
Solutions
- Resume/un-pause the agent (resolve the budget or approval gate) and retry the operation.
- If the agent was terminated, select a new Wiki Maintainer agent via select-managed-agent.
- Check the agent status via ctx.agents.get before invoking, and surface a friendlier message upstream.
Example fix
// before: agent.status === 'paused' -> operation blocked // after: resume the agent (clear budget/approval gate) then re-trigger the query
Defensive patterns
Strategy: validation
Validate before calling
async function assertAgentInvokable(ctx: PluginContext, agentId: string, companyId: string) {
const agent = await ctx.agents.get(agentId, companyId);
if (!agent || agent.status === 'paused' || agent.status === 'terminated' || agent.status === 'pending_approval') {
throw new Error(`Wiki Maintainer agent not invokable (status: ${agent?.status ?? 'missing'})`);
}
} Type guard
const INVOKABLE_AGENT_STATUSES = new Set(['active', 'idle', 'running']);
function isAgentInvokable(agent: { status: string } | null): agent is { status: string } {
return !!agent && INVOKABLE_AGENT_STATUSES.has(agent.status);
} Try / catch
try {
await runWikiQuery(ctx, input);
} catch (err) {
if (err instanceof Error && /not invokable while status is/.test(err.message)) {
// resume agent (clear budget/approval) then retry
} else throw err;
} Prevention
- Check agent status before issuing a query.
- Resolve budget hard-stop / approval gates that auto-pause agents.
When it happens
Trigger: The selected Wiki Maintainer agent has status 'paused' (e.g. budget hard-stop auto-pause), 'terminated', or 'pending_approval' at the moment a query operation tries to create a session for it.
Common situations: Agent was auto-paused by the budget hard-stop; agent is awaiting first-run approval; an operator terminated the agent but the Wiki selection still points to it.
Related errors
- LLM Wiki space status must be active or archived.
- No configured Wiki Maintainer agent is available for this co
- Wiki Maintainer agent could not be loaded.
- LLM Wiki plugin has not been set up
- agentId is required
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/edbf385a0e0c37c5.
Report an issue: GitHub.