paperclipai/paperclip · error · ToolGatewayHttpError
action_origin_invalid
action_origin_invalid
Error message
Tool action request is not an agent-origin action
What it means
Guard in executeApprovedAgentInvocation: the claimed tool_action_request was not created by the agent-session path (missing agent-origin metadata), so executing it on the agent's behalf would break provenance. The 409 rejects the execution; the action must go through its intended resolution path instead.
Source
Thrown at server/src/services/tool-gateway.ts:4292
// This call site owns a caller-set budget that can exceed the
// transport's default response deadline, so hand it down rather than
// letting the tighter default cut a legitimately slow tool short.
responseTimeoutMs: ms,
});
let requestHeaders = headers;
if (connection.config.mcpSessionRequired === true) {
requestHeaders = await initializeMcpHttpSession({
send: (init) => dispatchRemote(endpoint, {
...init,
redirect: "manual",
signal: controller.signal,
}),
headers,
requestId,
});
}
// The guard runs inside this call and the connection is pinned to the
// address it approved, so an operator-supplied hostname cannot be rebound
// onto a loopback or metadata address between validation and dispatch
// (PAP-17098).
const requestInit: RequestInit = {
method: "POST",
redirect: "manual",
// MCP Streamable HTTP requires the Accept header advertising both a JSON
// body and an SSE stream; spec-compliant servers 406 without it.
headers: mcpHttpRequestHeaders(requestHeaders),
signal: controller.signal,
body: JSON.stringify({
jsonrpc: "2.0",
id: requestId,
method: "tools/call",
params: {
name: entry.toolName,
arguments: parameters,
},
}),View on GitHub (pinned to 01ad858492)
Solutions
- Only agent-origin tool actions can be executed through this path; board-origin requests follow a different flow.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/tool-gateway.ts:4151 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/2d7d2ecc4cf884fa.
Report an issue: GitHub.