{"record":{"id":"199771cbb5f73cbc","repo":"paperclipai/paperclip","slug":"action-not-approved","errorCode":"action_not_approved","errorMessage":"Tool action request is not approved or was already consumed","messagePattern":"Tool action request is not approved or was already consumed","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":409,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":5831,"sourceCode":"        reasonCode: \"approved_action_executed\",\n        argumentsSummary,\n        resultSummary: resultValidation.summary,\n        metadata: { durationMs: Date.now() - startedAt, timeoutMs: executionTimeoutMs },\n        tool,\n      });\n      return resultValidation.value;\n    } catch (error) {\n      const { reasonCode } = await markApprovedActionFailed({\n        actionRequestId: claimed.id,\n        invocationId: invocation.id,\n        claimUpdatedAt: claimed.updatedAt,\n        expectedInvocationStatus: \"executing\",\n        error,\n      });\n      await writeToolCallEvent({\n        invocationId: invocation.id,\n        actionRequestId: claimed.id,\n        session,\n        eventType: \"call_failed\",\n        outcome: \"failure\",\n        toolName: tool.name,\n        policyDecision: \"deny\",\n        reasonCode,\n        argumentsSummary,\n        metadata: { durationMs: Date.now() - startedAt },\n        tool,\n      });\n      throw error;\n    }\n  }\n\n  async function matchingAgentActionRequest(input: {\n    session: ToolGatewaySession;\n    toolName: string;\n    argumentsHash: string;\n  }) {","sourceCodeStart":5813,"sourceCodeEnd":5849,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/tool-gateway.ts#L5813-L5849","documentation":"Claim guard in the replay path: the approved action request could not be claimed for execution — it is not in approved state anymore or was already consumed by another replay. The 409 prevents double execution of a single approval across concurrent sessions or retries.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:5644 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The request is not in an approved, unconsumed state. Re-check status and request a new approval if needed."],"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-14T05:17:10.506Z"}