n8n-io/n8n · warning · StaleResumeError
No suspended run found for runId: ${this.runId}
Error message
No suspended run found for runId: ${this.runId} What it means
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.
Source
Thrown at packages/@n8n/agents/src/runtime/loop/agent-runtime.ts:360
async resume(
method: 'generate',
data: unknown,
options: ResumeOptions & ExecutionOptions,
): Promise<GenerateResult>;
async resume(
method: 'stream',
data: unknown,
options: ResumeOptions & ExecutionOptions,
): Promise<StreamResult>;
async resume(
method: 'generate' | 'stream',
data: unknown,
options: ResumeOptions & ExecutionOptions,
): Promise<GenerateResult | StreamResult> {
this.runId = options.runId;
const state = await this.runState.resume(this.runId);
if (!state) {
throw new StaleResumeError(`No suspended run found for runId: ${this.runId}`);
}
const toolCall = state.pendingToolCalls[options.toolCallId];
if (!toolCall) {
throw new StaleResumeError(`No tool call found for toolCallId: ${options.toolCallId}`);
}
const list = AgentMessageList.deserialize(state.messageList);
this.context.hydrateDeferredToolsFromList(list);
await hydrateFileParts(list.messages(), this.config.fileStore, {
threadId: state.persistence?.threadId,
});
const tool = this.context
.getCurrentTools(state.persistence)
.find((t) => t.name === toolCall.toolName);
if (!tool) throw new Error(`Tool ${toolCall.toolName} not found`);
View on GitHub (pinned to 5ac6606e81)
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.
Example fix
// before
httpRequest({
name: 'Call API',
authentication: 'genericCredentialType',
genericAuthType: 'httpBearerAuth',
credentials: { httpBearerAuth: newCredential('My Bearer') },
});
// after
httpRequest({
name: 'Call API',
authentication: 'genericCredentialType',
genericAuthType: 'httpTemplatedCustomAuth',
credentials: { httpTemplatedCustomAuth: newCredential('My API Auth') },
}); Defensive patterns
Strategy: validation
Validate before calling
const TEMPLATABLE = new Set(['httpBearerAuth', 'httpHeaderAuth', 'httpQueryAuth', 'httpCustomAuth']);
function isPlainNewGenericAuth(params: Record<string, unknown>, credentials?: Record<string, unknown>): boolean {
const t = params.genericAuthType;
return params.authentication === 'genericCredentialType' && typeof t === 'string' && TEMPLATABLE.has(t) &&
(credentials?.[t] === undefined || isNewCredentialSentinel(credentials?.[t]));
}
function isNewCredentialSentinel(v: unknown): boolean {
return typeof v === 'object' && v !== null && '__newCredential' in v && !(v as { id?: string }).id;
} Type guard
function isNewCredentialSentinel(v: unknown): boolean {
return typeof v === 'object' && v !== null && '__newCredential' in v && !(v as { id?: string }).id;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- LangSmithTelemetry creates its own tracer — do not use .otlp
- Invalid resume payload: ${parseResult.error}
- Failed to retrieve access token
- Failed to retrieve OAuth2 access token
- API Key is missing in the selected Azure OpenAI API credenti
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/e4e1e3529353dff2.
Report an issue: GitHub.