paperclipai/paperclip · error
${existing.orgChainHealth?.repairGuidance ?? "Repair this ag
Error message
${existing.orgChainHealth?.repairGuidance ?? "Repair this agent's reporting chain before resuming it"} What it means
Org-health conflict guard on POST /agents/:id/resume: the agent's reporting chain is currently invalid (orgChainHealth status 'invalid_org_chain' — e.g. its manager no longer exists), so resuming is blocked with 409 and the agent-specific repair guidance text is returned.
Source
Thrown at server/src/routes/agents.ts:3883
agent.id,
req.actor.type === "board" ? (req.actor.userId ?? null) : null,
);
await builtInAgentService(db).ensureCompanyDefaultAgentGrants(companyId);
if (agent.budgetMonthlyCents > 0) {
await budgets.upsertPolicy(
companyId,
{
scopeType: "agent",
scopeId: agent.id,
amount: agent.budgetMonthlyCents,
windowKind: "calendar_month_utc",
},
actor.actorType === "user" ? actor.actorId : null,
);
}
res.status(201).json(agent);
});
router.patch("/agents/:id/permissions", validate(updateAgentPermissionsSchema), async (req, res) => {
const id = req.params.id as string;
const existing = await getAccessibleResource(req, res, svc.getById(id), "Agent not found");
if (!existing) return;
if (req.actor.type === "agent") {
const actorAgent = req.actor.agentId ? await svc.getById(req.actor.agentId) : null;
if (!actorAgent || actorAgent.companyId !== existing.companyId) {
res.status(403).json({ error: "Forbidden" });
return;
}
if (actorAgent.role !== "ceo") {
res.status(403).json({ error: "Only CEO can manage permissions" });
return;
}
} else {View on GitHub (pinned to 5716fe907e)
Solutions
- Repair the agent's reporting chain per the repair guidance, then resume the agent.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/routes/agents.ts:3955 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-08-18).
Data as JSON: /api/errors/a7ef29192e686dcd.
Report an issue: GitHub.