paperclipai/paperclip · error
Agent can only invoke itself
Error message
Agent can only invoke itself
What it means
Self-invocation guard in the wakeup route helper: the caller authenticated as an agent but addressed a different agent's id. Agents may only trigger their own heartbeats/wakeups, so the cross-agent invocation is refused with 403.
Source
Thrown at server/src/routes/agents.ts:4802
},
});
res.json(result.bundle);
});
router.patch("/agents/:id", validate(updateAgentSchema), 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 (hasOwn(req.body as object, "permissions")) {
res.status(422).json({ error: "Use /api/agents/:id/permissions for permission changes" });
return;
}
const patchData = { ...(req.body as Record<string, unknown>) };
const replaceAdapterConfig = patchData.replaceAdapterConfig === true;
delete patchData.replaceAdapterConfig;
// The apply-existing flag is not an agent column. The server binds the fixed
// reference to the owner stored value with no login round trip. Remove it
// from the patch so it never reaches the update values.
const applyStoredClaudeLogin = patchData.applyStoredClaudeLogin === true;
delete patchData.applyStoredClaudeLogin;
if (hasOwn(patchData, "adapterConfig")) {
const adapterConfig = asRecord(patchData.adapterConfig);
if (!adapterConfig) {
res.status(422).json({ error: "adapterConfig must be an object" });
return;
}
assertNoAgentAdapterConfigMutation(req, adapterConfig);
const changingInstructionsConfig = adapterConfigTouchesInstructionsConfig(adapterConfig);
if (changingInstructionsConfig) {
await assertCanManageInstructionsPath(req, existing);
}
patchData.adapterConfig = adapterConfig;
}View on GitHub (pinned to 01ad858492)
Solutions
- Invoke the agent using its own API key; agents cannot invoke other agents via this route.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/routes/agents.ts:4257 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/918e934ffdc36072.
Report an issue: GitHub.