{"record":{"id":"976110f18ba53059","repo":"paperclipai/paperclip","slug":"action-request-not-found","errorCode":"action_request_not_found","errorMessage":"Tool action request not found","messagePattern":"Tool action request not found","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":404,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":5343,"sourceCode":"      await runTestToolInvocation({\n        session,\n        tool,\n        parameters,\n        invocationId: invocation.id,\n        companyId: invocation.companyId,\n        agentId,\n        userId,\n        argumentsSummary,\n        reasonCode: \"approval_granted\",\n        matchedPolicyIds: invocation.matchedPolicyIds ?? [],\n      });\n      await reflectToolActionInteractionLifecycle({ actionRequestId, status: \"executed\" });\n    } catch (err) {\n      const message = err instanceof Error ? err.message : String(err);\n      await db\n        .update(toolInvocations)\n        .set({\n          status: \"failed\",\n          errorCode: \"tool_execution_failed\",\n          errorMessage: message,\n          completedAt: new Date(),\n          updatedAt: new Date(),\n        })\n        .where(eq(toolInvocations.id, invocation.id));\n      await reflectToolActionInteractionLifecycle({\n        actionRequestId,\n        status: \"failed\",\n        errorCode: \"tool_execution_failed\",\n        errorMessage: message,\n      });\n    }\n  }\n\n  async function waitForActionRequestExecution(actionRequestId: string) {\n    let deadline = Date.now() + ACTION_REQUEST_EXECUTION_WAIT_MS;\n    while (true) {","sourceCodeStart":5325,"sourceCodeEnd":5361,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/tool-gateway.ts#L5325-L5361","documentation":"Ask-first test-call status polling: the actionRequestId provided by the Test tab does not exist or belongs to a different company than the connection being polled. The 404 keeps the endpoint scoped so it cannot be used to read arbitrary action requests.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:5175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the tool action request ID; it may have expired or been cleaned up. Refresh the review queue."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}