{"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":4193,"sourceCode":"    });\n  }\n\n  function normalizeMcpContent(content: unknown): string {\n    if (!Array.isArray(content)) throw malformedRemoteMcpResponse();\n    return content.map((item) => {\n      const record = asRecord(item);\n      if (!record || typeof record.type !== \"string\") throw malformedRemoteMcpResponse();\n      if (record.type === \"text\") {\n        if (typeof record.text !== \"string\") throw malformedRemoteMcpResponse();\n        return record.text;\n      }\n      return JSON.stringify(record);\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 = record.isError === true\n      && (sourceTemplateKey === \"gmail\" || 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,\n        structuredContent: record.structuredContent ?? null,\n        isError: record.isError === true,","sourceCodeStart":4175,"sourceCodeEnd":4211,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/tool-gateway.ts#L4175-L4211","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":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}