{"record":{"id":"1670ee12480798b1","repo":"paperclipai/paperclip","slug":"legacy-approved-action-inert","errorCode":"legacy_approved_action_inert","errorMessage":"This approval predates execute-on-approve and must remain inert","messagePattern":"This approval predates execute-on-approve and must remain inert","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":409,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":4366,"sourceCode":"            updatedAt: new Date(options.now?.() ?? Date.now()),\n          }).where(and(\n            eq(connectionGrants.id, grant.id),\n            eq(connectionGrants.companyId, connection.companyId),\n          ));\n        }\n      }\n      if (\n        response.status === 401\n        && connection.authKind === \"oauth\"\n        && connection.credentialSource === \"paperclip_vault\"\n        && !isPaperclipCloudConnectorStrategy(oauth?.strategy)\n        && options.oauthGrantRefresher\n      ) {\n        credentialHeaders = {\n          ...projectedConnectionHeaders(connection),\n          ...await resolveCredentialHeaders(session, connection, grant, { forceRefresh: true }),\n        };\n        builtHeaders = buildRemoteHeaders({ session, connection, credentialHeaders, callerHeaders });\n        headers = builtHeaders.headers;\n        headerSummary = builtHeaders.summary;\n        response = await dispatchRemote(endpoint, {\n          ...requestInit,\n          headers: mcpHttpRequestHeaders(headers),\n        });\n      }\n      if (response.status === 401 && connection.credentialSource === \"vercel_connect\") {\n        if (!connection.externalCredential || !vercelConnect) {\n          throw new ToolGatewayHttpError(503, \"Vercel Connect is not configured\", \"vercel_connect_unavailable\", {\n            connectionId: connection.id,\n          });\n        }\n        const tokenRequest = vercelTokenRequest({\n          credential: connection.externalCredential,\n          grant,\n          connectionId: connection.id,\n          companyId: connection.companyId,","sourceCodeStart":4348,"sourceCodeEnd":4384,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/tool-gateway.ts#L4348-L4384","documentation":"Migration-era guard: an approved action request predates the execute-on-approve mechanism (it carries no signed arguments payload / required metadata), so executing it automatically is intentionally refused. The approval stays inert; the action must be re-requested through the current flow so it can be signed and executed on approval.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:4198 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Legacy approvals from before execute-on-approve cannot execute. Create a new approval for the action."],"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"}