{"record":{"id":"527249fa9c08df95","repo":"paperclipai/paperclip","slug":"action-expired","errorCode":"action_expired","errorMessage":"Tool review has expired","messagePattern":"Tool review has expired","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":409,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":9413,"sourceCode":"          signedPayload.executionOnApprove === true\n        ) {\n          try {\n            await executeApprovedAgentInvocation({ actionRequest, invocation });\n          } catch {\n            // The execution outcome is persisted on the invocation/request and\n            // reflected onto the accepted interaction for the continuation wake.\n          }\n          const [settled] = await db\n            .select()\n            .from(toolActionRequests)\n            .where(eq(toolActionRequests.id, actionRequest.id))\n            .limit(1);\n          return actionRequestResolution(settled ?? actionRequest);\n        }\n        return actionRequest;\n      }\n      if (actionRequest.expiresAt && actionRequest.expiresAt <= new Date())\n        throw new ToolGatewayHttpError(\n          409,\n          \"Tool review has expired\",\n          \"action_expired\",\n        );\n      if (\n        !isTestOriginInvocation(invocation) &&\n        signedPayload.executionOnApprove === true\n      ) {\n        const [issue] = await db\n          .select()\n          .from(issues)\n          .where(\n            and(\n              eq(issues.id, invocation.issueId!),\n              eq(issues.companyId, input.companyId),\n            ),\n          )\n          .limit(1);","sourceCodeStart":9395,"sourceCodeEnd":9431,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L9395-L9431","documentation":"Expiry sweep during approved-action replay: actionRequest.expiresAt has passed, so the request is transitioned to expired with resolvedAt stamped before the 403/409 is returned. The approval is no longer valid; the agent must request a fresh approval if the action is still needed.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:5591 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The approval expired. Request a fresh approval and execute within its validity window."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-18T08:03:59.046Z","contentChangedAt":"2026-09-18T08:03:59.046Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}