{"record":{"id":"09cb03fd38db84c2","repo":"langchain-ai/langgraph","slug":"runnableseq-must-have-at-least-2-steps-got-len-s","errorCode":null,"errorMessage":"RunnableSeq must have at least 2 steps, got {len(steps_flat)}","messagePattern":"RunnableSeq must have at least 2 steps, got (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/_internal/_runnable.py","lineNumber":616,"sourceCode":"        \"\"\"Create a new RunnableSeq.\n\n        Args:\n            steps: The steps to include in the sequence.\n            name: The name of the `Runnable`.\n\n        Raises:\n            ValueError: If the sequence has less than 2 steps.\n        \"\"\"\n        steps_flat: list[Runnable] = []\n        for step in steps:\n            if isinstance(step, RunnableSequence):\n                steps_flat.extend(step.steps)\n            elif isinstance(step, RunnableSeq):\n                steps_flat.extend(step.steps)\n            else:\n                steps_flat.append(coerce_to_runnable(step, name=None, trace=True))\n        if len(steps_flat) < 2:\n            raise ValueError(\n                f\"RunnableSeq must have at least 2 steps, got {len(steps_flat)}\"\n            )\n        self.steps = steps_flat\n        self.name = name\n        self.trace_inputs = trace_inputs\n        self.trace_outputs = trace_outputs\n\n    def __or__(\n        self,\n        other: Any,\n    ) -> Runnable:\n        if isinstance(other, RunnableSequence):\n            return RunnableSeq(\n                *self.steps,\n                other.first,\n                *other.middle,\n                other.last,\n                name=self.name or other.name,","sourceCodeStart":598,"sourceCodeEnd":634,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/_internal/_runnable.py#L598-L634","documentation":"Error \"RunnableSeq must have at least 2 steps, got {len(steps_flat)}\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/_internal/_runnable.py:616 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}