{"record":{"id":"02441df04476ad2e","repo":"langchain-ai/langgraph","slug":"type-transformer-name-requires-an-async-run","errorCode":null,"errorMessage":"{type(transformer).__name__} requires an async run — it overrides aprocess/afinalize/afail or sets requires_async=True. Use astream(), not stream().","messagePattern":"(.+?) requires an async run — it overrides aprocess/afinalize/afail or sets requires_async=True\\. Use astream\\(\\), not stream\\(\\)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/stream/_mux.py","lineNumber":235,"sourceCode":"            is_async=self.is_async,\n            scope=scope,\n            _assign_seq=False,\n        )\n        if self._pump_fn is not None:\n            child.bind_pump(self._pump_fn)\n        if self._apump_fn is not None:\n            child.bind_apump(self._apump_fn)\n        return child\n\n    def _register(self, transformer: StreamTransformer) -> None:\n        \"\"\"Register a single transformer.\n\n        Calls `transformer.init()`, stores the transformer for event\n        processing, binds any StreamChannel instances in the projection,\n        and merges the projection into `extensions`.\n        \"\"\"\n        if transformer_requires_async(transformer) and not self.is_async:\n            raise RuntimeError(\n                f\"{type(transformer).__name__} requires an async run — \"\n                \"it overrides aprocess/afinalize/afail or sets \"\n                \"requires_async=True. Use astream(), not stream().\"\n            )\n        projection = transformer.init()\n        if not isinstance(projection, dict):\n            raise TypeError(\n                f\"StreamTransformer.init() must return a dict, \"\n                f\"got {type(projection).__name__}\"\n            )\n        conflicts = set(projection) & set(self.extensions)\n        if conflicts:\n            attributions = \", \".join(\n                f\"{key!r} (owned by {self._projection_owners[key]})\"\n                for key in sorted(conflicts)\n            )\n            raise ValueError(\n                f\"Transformer {type(transformer).__name__} returned \"","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/stream/_mux.py#L217-L253","documentation":"Error \"{type(transformer).__name__} requires an async run — it overrides aprocess/afinalize/afail or sets requires_async=True. Use astream(), not stream().\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/stream/_mux.py:235 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"}