paperclipai/paperclip · error · ToolGatewayHttpError
approval_request_superseded
approval_request_superseded
Error message
The approval request was resolved before it could be signed
What it means
The conditional update that stamps the formal approval id and expiry onto the pending tool_action_request matched zero rows, meaning another actor (board decision, expiry sweep, or superseding approval) already resolved it. The invocation is marked failed with approvalState expired (approval_request_superseded) so the stale approval cannot be signed or executed.
Source
Thrown at server/src/services/tool-gateway.ts:1777
await db
.update(toolActionRequests)
.set({
status: "cancelled",
resolvedAt: new Date(),
updatedAt: new Date(),
})
.where(and(eq(toolActionRequests.id, actionRequest.id), eq(toolActionRequests.status, "pending")));
if (error instanceof ToolActionSigningSecretMissingError) {
await db
.update(toolInvocations)
.set({
status: "failed",
errorCode: "signing_secret_unconfigured",
errorMessage: error.message,
completedAt: new Date(),
updatedAt: new Date(),
})
.where(eq(toolInvocations.id, input.invocation.id));
throw new ToolGatewayHttpError(500, error.message, "signing_secret_unconfigured", {
invocationId: input.invocation.id,
tool: input.tool.name,
});
}
throw error;
}
// Board-only technical detail for the formal-approval interaction (target=custom).
const detailsMarkdown = [
`Tool: \`${input.tool.name}\``,
`Risk: \`${input.tool.risk}\``,
"",
"Arguments reviewed for execution:",
"",
"```json",
input.argumentsSummary.summary,
"```",
].join("\n");View on GitHub (pinned to 01ad858492)
Solutions
- The approval was resolved concurrently before signing. Re-read the approval state and create a new approval request if still needed.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/tool-gateway.ts:1730 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/b5f5b18737e873a4.
Report an issue: GitHub.