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.
Source
Thrown at server/src/services/tool-gateway.ts:1556
errorCode?: string | null;
errorMessage?: string | null;
resultSummary?: string | null;
}): Promise<void> {
const [linked] = await db
.select({
companyId: toolActionRequests.companyId,
interactionId: toolActionRequests.interactionId,
})
.from(toolActionRequests)
.where(eq(toolActionRequests.id, input.actionRequestId))
.limit(1);
if (!linked?.interactionId) return;
const [interaction] = await db
.select({
status: issueThreadInteractions.status,
result: issueThreadInteractions.result,
})
.from(issueThreadInteractions)
.where(and(
eq(issueThreadInteractions.id, linked.interactionId),
eq(issueThreadInteractions.companyId, linked.companyId),
))
.limit(1);
if (!interaction) return;
const currentResult = interaction.result && typeof interaction.result === "object"
? interaction.result as unknown as Record<string, unknown>
: null;
const outcome = typeof currentResult?.outcome === "string"
? currentResult.outcome
: interaction.status === "accepted"
? "accepted"
: interaction.status === "rejected"
? "rejected"
: interaction.status === "expired" || input.status === "expired"View on GitHub (pinned to 5716fe907e)
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@5716fe907e (2026-08-18).
Data as JSON: /api/errors/e31ddffad958cba4.
Report an issue: GitHub.