paperclipai/paperclip · error
Use /api/agents/:id/permissions for permission changes
Error message
Use /api/agents/:id/permissions for permission changes
What it means
Contract guard on PATCH /agents/:id: the request body contains a 'permissions' key, but permissions must be changed through the dedicated permission endpoint (with its own authorization rules), so the general update route rejects the body with 422.
Source
Thrown at server/src/routes/agents.ts:3687
metadata: requestedMetadata,
agentId: agent.id,
requestedByAgentId: actor.actorType === "agent" ? actor.actorId : null,
requestedConfigurationSnapshot: {
adapterType: requestedAdapterType,
adapterConfig: requestedAdapterConfig,
runtimeConfig: requestedRuntimeConfig,
desiredSkills: desiredSkillAssignment.desiredSkills,
},
},
decisionNote: null,
decidedByUserId: null,
decidedAt: null,
updatedAt: new Date(),
});
if (sourceIssueIds.length > 0) {
await issueApprovalsSvc.linkManyForApproval(approval.id, sourceIssueIds, {
agentId: actor.actorType === "agent" ? actor.actorId : null,
userId: actor.actorType === "user" ? actor.actorId : null,
});
}
}
await logActivity(db, {
companyId,
actorType: actor.actorType,
actorId: actor.actorId,
agentId: actor.agentId,
runId: actor.runId,
agentApiKeyId: actor.agentApiKeyId,
action: "agent.hire_created",
entityType: "agent",
entityId: agent.id,
details: {
name: agent.name,
role: agent.role,View on GitHub (pinned to 5716fe907e)
Solutions
- Use the /api/agents/:id/permissions endpoint for permission changes instead of this route.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/routes/agents.ts:3754 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/d1c407e6d6066eec.
Report an issue: GitHub.