{"record":{"id":"5518dfa1bb23082c","repo":"langchain-ai/langgraph","slug":"cannot-apply-multiple-updates-when-clearing-state","errorCode":null,"errorMessage":"Cannot apply multiple updates when clearing state","messagePattern":"Cannot apply multiple updates when clearing state","errorType":"exception","errorClass":"InvalidUpdateError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/pregel/main.py","lineNumber":1680,"sourceCode":"                },\n            )\n            if saved:\n                checkpoint_config = patch_configurable(config, saved.config[CONF])\n            channels, managed = channels_from_checkpoint(\n                self.channels,\n                checkpoint,\n                saver=self.checkpointer\n                if saved is not None\n                and isinstance(self.checkpointer, BaseCheckpointSaver)\n                else None,\n                config=saved.config if saved is not None else None,\n            )\n            values, as_node = updates[0][:2]\n\n            # no values as END, just clear all tasks\n            if values is None and as_node == END:\n                if len(updates) > 1:\n                    raise InvalidUpdateError(\n                        \"Cannot apply multiple updates when clearing state\"\n                    )\n\n                if saved is not None:\n                    # tasks for this checkpoint\n                    next_tasks = prepare_next_tasks(\n                        checkpoint,\n                        saved.pending_writes or [],\n                        self.nodes,\n                        channels,\n                        managed,\n                        saved.config,\n                        step + 1,\n                        step + 3,\n                        for_execution=True,\n                        store=self.store,\n                        checkpointer=checkpointer,\n                        manager=None,","sourceCodeStart":1662,"sourceCodeEnd":1698,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/pregel/main.py#L1662-L1698","documentation":"Error \"Cannot apply multiple updates when clearing state\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/pregel/main.py:1680 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"}