{"record":{"id":"e4e1e3529353dff2","repo":"n8n-io/n8n","slug":"no-suspended-run-found-for-runid-this-runid","errorCode":null,"errorMessage":"No suspended run found for runId: ${this.runId}","messagePattern":"No suspended run found for runId: (.+?)","errorType":"exception","errorClass":"StaleResumeError","httpStatus":null,"severity":"warning","filePath":"packages/@n8n/agents/src/runtime/loop/agent-runtime.ts","lineNumber":360,"sourceCode":"\tasync resume(\n\t\tmethod: 'generate',\n\t\tdata: unknown,\n\t\toptions: ResumeOptions & ExecutionOptions,\n\t): Promise<GenerateResult>;\n\tasync resume(\n\t\tmethod: 'stream',\n\t\tdata: unknown,\n\t\toptions: ResumeOptions & ExecutionOptions,\n\t): Promise<StreamResult>;\n\tasync resume(\n\t\tmethod: 'generate' | 'stream',\n\t\tdata: unknown,\n\t\toptions: ResumeOptions & ExecutionOptions,\n\t): Promise<GenerateResult | StreamResult> {\n\t\tthis.runId = options.runId;\n\t\tconst state = await this.runState.resume(this.runId);\n\t\tif (!state) {\n\t\t\tthrow new StaleResumeError(`No suspended run found for runId: ${this.runId}`);\n\t\t}\n\n\t\tconst toolCall = state.pendingToolCalls[options.toolCallId];\n\t\tif (!toolCall) {\n\t\t\tthrow new StaleResumeError(`No tool call found for toolCallId: ${options.toolCallId}`);\n\t\t}\n\n\t\tconst list = AgentMessageList.deserialize(state.messageList);\n\t\tthis.context.hydrateDeferredToolsFromList(list);\n\t\tawait hydrateFileParts(list.messages(), this.config.fileStore, {\n\t\t\tthreadId: state.persistence?.threadId,\n\t\t});\n\n\t\tconst tool = this.context\n\t\t\t.getCurrentTools(state.persistence)\n\t\t\t.find((t) => t.name === toolCall.toolName);\n\t\tif (!tool) throw new Error(`Tool ${toolCall.toolName} not found`);\n","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/agents/src/runtime/loop/agent-runtime.ts#L342-L378","documentation":"Thrown when an HTTP Request node creates a brand-new credential of a 'plain' generic auth type (httpBearerAuth, httpHeaderAuth, httpQueryAuth, httpCustomAuth). Credential setup rejects these for new credentials, so the validator steers you to httpTemplatedCustomAuth, whose template can express 'Authorization: Bearer <token>'. Plain generic types are only valid when referencing an already-existing credential id.","triggerScenarios":"params.authentication === 'genericCredentialType' AND params.genericAuthType is one of the four TEMPLATABLE_PLAIN_AUTH_TYPES, AND node.config.credentials[genericAuthType] is either undefined or a new-credential sentinel (an object with __newCredential but no id). Any of those conditions for a brand-new credential trips it.","commonSituations":"An AI agent sees 'Authorization: Bearer <token>' in provider docs and picks genericAuthType='httpBearerAuth' with newCredential('Bearer Auth'); upgrading a workflow where the old plain type used to be accepted; the model reusing a pattern from a different provider that genuinely supports bearer auth credentials.","solutions":["Switch genericAuthType to 'httpTemplatedCustomAuth' and supply a template like {\"headers\":{\"Authorization\":\"Bearer {{api_key}}\"}} (or {\"query\":{...}} / {\"body\":{...}} as the provider requires).","If you intend to reuse an existing credential, pass its id in credentials[genericAuthType] so it is not treated as new.","Remove genericAuthType entirely and use a dedicated credential type if the provider has a first-class one."],"exampleFix":"// before\nhttpRequest({\n  name: 'Call API',\n  authentication: 'genericCredentialType',\n  genericAuthType: 'httpBearerAuth',\n  credentials: { httpBearerAuth: newCredential('My Bearer') },\n});\n\n// after\nhttpRequest({\n  name: 'Call API',\n  authentication: 'genericCredentialType',\n  genericAuthType: 'httpTemplatedCustomAuth',\n  credentials: { httpTemplatedCustomAuth: newCredential('My API Auth') },\n});","handlingStrategy":"validation","validationCode":"const TEMPLATABLE = new Set(['httpBearerAuth', 'httpHeaderAuth', 'httpQueryAuth', 'httpCustomAuth']);\n\nfunction isPlainNewGenericAuth(params: Record<string, unknown>, credentials?: Record<string, unknown>): boolean {\n  const t = params.genericAuthType;\n  return params.authentication === 'genericCredentialType' && typeof t === 'string' && TEMPLATABLE.has(t) &&\n    (credentials?.[t] === undefined || isNewCredentialSentinel(credentials?.[t]));\n}\n\nfunction isNewCredentialSentinel(v: unknown): boolean {\n  return typeof v === 'object' && v !== null && '__newCredential' in v && !(v as { id?: string }).id;\n}","typeGuard":"function isNewCredentialSentinel(v: unknown): boolean {\n  return typeof v === 'object' && v !== null && '__newCredential' in v && !(v as { id?: string }).id;\n}","tryCatchPattern":null,"preventionTips":["Default new generic auth to httpTemplatedCustomAuth; only use plain types to reference existing credential ids.","When generating workflows from provider docs, translate 'Authorization: Bearer <token>' into a templated-auth template immediately.","Reject genericAuthType values outside the templated set for any new credential in your generator."],"tags":["credentials","http-request","authentication","ai-generated"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}