paperclipai/paperclip · error · ToolGatewayHttpError
invocation_not_found
invocation_not_found
Error message
Tool invocation not found
What it means
Ask-first test-call status follow-up: the action request exists but the tool invocation it references is missing or in another company. The 404 invocation_not_found indicates data inconsistency between the action request and its invocation, or cross-company access.
Source
Thrown at server/src/services/tool-gateway.ts:5351
argumentsSummary,
reasonCode: "approval_granted",
matchedPolicyIds: invocation.matchedPolicyIds ?? [],
});
await reflectToolActionInteractionLifecycle({ actionRequestId, status: "executed" });
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
await db
.update(toolInvocations)
.set({
status: "failed",
errorCode: "tool_execution_failed",
errorMessage: message,
completedAt: new Date(),
updatedAt: new Date(),
})
.where(eq(toolInvocations.id, invocation.id));
await reflectToolActionInteractionLifecycle({
actionRequestId,
status: "failed",
errorCode: "tool_execution_failed",
errorMessage: message,
});
}
}
async function waitForActionRequestExecution(actionRequestId: string) {
let deadline = Date.now() + ACTION_REQUEST_EXECUTION_WAIT_MS;
while (true) {
const [match] = await db
.select({
actionRequest: toolActionRequests,
invocationStatus: toolInvocations.status,
invocationStartedAt: toolInvocations.startedAt,
})
.from(toolActionRequests)
.innerJoin(toolInvocations, eq(toolInvocations.id, toolActionRequests.invocationId))View on GitHub (pinned to 01ad858492)
Solutions
- Verify the tool invocation ID; refresh the invocation list and use a current ID.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/tool-gateway.ts:5183 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/aee367fe66f024bd.
Report an issue: GitHub.