{"record":{"id":"1c0933e98659b6df","repo":"FlowiseAI/Flowise","slug":"end-must-have-a-predecessor","errorCode":null,"errorMessage":"End must have a predecessor!","messagePattern":"End must have a predecessor!","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/sequentialagents/End/End.ts","lineNumber":42,"sourceCode":"        this.category = 'Sequential Agents'\n        this.description = 'End conversation'\n        this.baseClasses = [this.type]\n        this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-10.-end-node'\n        this.inputs = [\n            {\n                label: 'Sequential Node',\n                name: 'sequentialNode',\n                type: 'Agent | Condition | LLMNode | ToolNode | CustomFunction | ExecuteFlow',\n                description:\n                    'Can be connected to one of the following nodes: Agent, Condition, LLM Node, Tool Node, Custom Function, Execute Flow'\n            }\n        ]\n        this.hideOutput = true\n    }\n\n    async init(nodeData: INodeData): Promise<any> {\n        const sequentialNode = nodeData.inputs?.sequentialNode as ISeqAgentNode\n        if (!sequentialNode) throw new Error('End must have a predecessor!')\n\n        const returnOutput: ISeqAgentNode = {\n            id: nodeData.id,\n            node: END,\n            name: END,\n            label: END,\n            type: 'end',\n            output: END,\n            predecessorAgents: [sequentialNode]\n        }\n\n        return returnOutput\n    }\n}\n\nmodule.exports = { nodeClass: End_SeqAgents }\n","sourceCodeStart":24,"sourceCodeEnd":59,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/sequentialagents/End/End.ts#L24-L59","documentation":"The End node terminates the sequential graph; at init it records its single predecessor so LangGraph routes into the END node. Thrown when nodeData.inputs.sequentialNode is falsy — the End node has no incoming sequential edge.","triggerScenarios":"End node placed on the canvas with no connection from a sequential node (Agent/Condition/LLMNode/ToolNode/CustomFunction/ExecuteFlow); the edge was lost during import/copy.","commonSituations":"Same wiring hazards as the other predecessor checks: forgotten wire, stale saved chatflow, copy without edges.","solutions":["Connect an upstream sequential node's output into the End node's 'Sequential Node' input.","Save the chatflow so the edge serializes into inputs.sequentialNode."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const pred = nodeData.inputs?.sequentialNode\nif (!pred) throw new Error('End node must be wired to a predecessor sequential node')","typeGuard":"const hasEndPredecessor = (n: INodeData): boolean => !!n.inputs?.sequentialNode","tryCatchPattern":null,"preventionTips":["Treat the End node like any graph terminator: wire it last and verify the edge before save.","Lint the graph for an End node with no incoming edge."],"tags":["sequential-agents","end-node","graph-wiring","init"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}