{"record":{"id":"2dea59e2c1c045a7","repo":"n8n-io/n8n","slug":"agents-chat-delegate-childsuspendunsupported","errorCode":null,"errorMessage":"agents.chat.delegate.childSuspendUnsupported","messagePattern":"agents\\.chat\\.delegate\\.childSuspendUnsupported","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/agents/src/runtime/tools/delegate-sub-agent-tool.ts","lineNumber":828,"sourceCode":"\t\t},\n\t\temitChunk: createEmitChunkHelper(ctx, request),\n\t};\n}\n\nfunction isInterruptibleToolContext(\n\tctx: ToolContext | InterruptibleToolContext,\n): ctx is InterruptibleToolContext {\n\treturn 'suspend' in ctx;\n}\n\nasync function cascadeChildSuspension(\n\tctx: InterruptibleToolContext,\n\trequest: DelegateSubAgentRequest,\n\toutput: DelegateSubAgentToolOutput,\n): Promise<never> {\n\tconst suspension = output.pendingSuspend?.[0];\n\tif (!suspension || !isJsonSchemaObject(suspension.resumeSchema)) {\n\t\tthrow new Error(DELEGATED_CHILD_SUSPEND_UNSUPPORTED_MESSAGE);\n\t}\n\n\treturn await ctx.suspend(suspension.suspendPayload, {\n\t\tresumeSchema: suspension.resumeSchema,\n\t\tcontinuation: {\n\t\t\trunId: suspension.runId,\n\t\t\ttoolCallId: suspension.toolCallId,\n\t\t\ttaskPath: request.taskPath,\n\t\t\tsubAgentId: request.subAgentId,\n\t\t\tchildCount: request.childCount,\n\t\t\t...(output.threadId !== undefined ? { threadId: output.threadId } : {}),\n\t\t\t...(output.resumeContext !== undefined ? { resumeContext: output.resumeContext } : {}),\n\t\t},\n\t});\n}\n\nfunction emitSubAgentStarted(\n\tctx: ToolContext,","sourceCodeStart":810,"sourceCodeEnd":846,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/agents/src/runtime/tools/delegate-sub-agent-tool.ts#L810-L846","documentation":"Thrown by cascadeChildSuspension when the delegated child produced a pendingSuspend entry but its suspendPayload or resumeSchema is missing or malformed (resumeSchema is not a valid JSON Schema object). The constant DELEGATED_CHILD_SUSPEND_UNSUPPORTED_MESSAGE (agents.chat.delegate.childSuspendUnsupported) indicates the parent cannot cascade the child's suspension upward because the suspension metadata is incomplete.","triggerScenarios":"A delegated child agent suspends (returns output.status === 'suspended') but the pendingSuspend[0] entry lacks a valid resumeSchema (isJsonSchemaObject returns false) or is entirely missing. Also possible if a custom child agent returns a suspension without proper schema metadata.","commonSituations":"A child agent using a custom tool with a suspendSchema that is malformed or set to a non-object value. Version mismatch between parent and child agent libraries where the suspension shape changed. A child agent that returns 'suspended' status without populating pendingSuspend correctly.","solutions":["Ensure child agents that suspend populate pendingSuspend with valid resumeSchema objects.","Verify that child agent tools with suspendSchema use proper JSON Schema definitions.","If child suspension is not needed, configure the child to not use suspend/resume tools.","Check for version skew between parent and child agent packages."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function hasValidSuspendSchema(suspension: unknown): boolean {\n  return (\n    typeof suspension === 'object' && suspension !== null &&\n    'resumeSchema' in suspension &&\n    typeof (suspension as any).resumeSchema === 'object' &&\n    (suspension as any).resumeSchema !== null &&\n    typeof (suspension as any).resumeSchema.type === 'string'\n  );\n}","tryCatchPattern":"try {\n  await runDelegation();\n} catch (e) {\n  if (e instanceof Error && e.message === 'agents.chat.delegate.childSuspendUnsupported') {\n    // child suspension cannot cascade; configure child to avoid suspend tools\n  } else throw e;\n}","preventionTips":["Ensure child agents populate pendingSuspend with valid resumeSchema objects.","Do not configure child agents with suspendSchema tools unless the parent supports cascade.","Keep parent and child agent library versions in sync."],"tags":["suspend-resume","delegate-tool","cascade","schema-validation"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}