paperclipai/paperclip · error · ToolGatewayHttpError
approval_request_missing
approval_request_missing
Error message
Approval request was not created
What it means
Consistency guard after the policy engine returned require_approval: the expected tool_action_requests row was never created. The invocation is set to denied with errorCode approval_request_missing, indicating an internal invariant break between the policy decision and action-request creation rather than a client input problem.
Solutions
- Approval creation failed internally. Retry; if persistent, check server logs for the approval insert failure.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/tool-gateway.ts:1556 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-09-18).
Data as JSON: /api/errors/e31ddffad958cba4.
Report an issue: GitHub.
Appendix: source
Thrown at server/src/services/tool-gateway.ts:2230
instructions:
"This session is not attached to a task, so an approval card cannot be posted. Re-run this action from a run that has the task checked out.",
},
);
}
if (!input.actionRequest) {
await db
.update(toolInvocations)
.set({
status: "denied",
errorCode: "approval_request_missing",
errorMessage:
"Approval-required policy decision did not create an action request",
completedAt: new Date(),
updatedAt: new Date(),
})
.where(eq(toolInvocations.id, input.invocation.id));
throw new ToolGatewayHttpError(
500,
"Approval request was not created",
"approval_request_missing",
{
invocationId: input.invocation.id,
tool: input.tool.name,
},
);
}
const actionRequest = input.actionRequest;
const expiresAt = new Date(Date.now() + 60 * 60 * 1000);
let signedArguments: ReturnType<typeof signToolArguments>;
try {
signedArguments = signToolArguments({
invocationId: input.invocation.id,
toolName: input.tool.name,
canonicalArguments,View on GitHub (pinned to 3f1d897a7c)