{"record":{"id":"a2a7941457813b64","repo":"paperclipai/paperclip","slug":"action-execution-in-progress","errorCode":"action_execution_in_progress","errorMessage":"Approved tool action is still executing","messagePattern":"Approved tool action is still executing","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":409,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":5713,"sourceCode":"    if (!Array.isArray(content)) throw malformedRemoteMcpResponse();\n    return content\n      .map((item) => {\n        const record = asRecord(item);\n        if (!record || typeof record.type !== \"string\")\n          throw malformedRemoteMcpResponse();\n        if (record.type === \"text\") {\n          if (typeof record.text !== \"string\")\n            throw malformedRemoteMcpResponse();\n          return record.text;\n        }\n        return JSON.stringify(record);\n      })\n      .join(\"\\n\");\n  }\n\n  function normalizeMcpToolResult(\n    result: unknown,\n    transport: \"mcp_http\" | \"local_stdio\" = \"mcp_http\",\n    spawnedLocalProcess = false,\n    sourceTemplateKey?: string | null,\n  ) {\n    const record = asRecord(result);\n    if (!record) throw malformedRemoteMcpResponse();\n    const providerContent = normalizeMcpContent(record.content);\n    const googleWorkspacePermissionDenied =\n      record.isError === true &&\n      (sourceTemplateKey === \"gmail\" ||\n        sourceTemplateKey?.startsWith(\"google-\") === true) &&\n      /caller does not have permission/i.test(providerContent);\n    const content = googleWorkspacePermissionDenied\n      ? \"Google rejected this call. Google Workspace MCP is a Developer Preview: enroll the signed-in Workspace account and this OAuth client's Google Cloud project in Google's Developer Preview Program, wait for Google's registration confirmation, then reconnect and try again.\"\n      : providerContent;\n    return {\n      content,\n      data: {\n        content: record.content,","sourceCodeStart":5695,"sourceCodeEnd":5731,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L5695-L5731","documentation":"waitForActionRequestExecution polled the executing action request for ~500x25ms without it leaving the executing state (or the row disappeared). The thrown gateway error signals that an approved tool action is stuck executing — the worker may have died mid-execution; investigate the invocation/execution rather than blindly re-approving.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:4052 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The approved action is already executing; wait for its completion instead of re-triggering."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}