{"record":{"id":"fc41eeb9f4972491","repo":"langchain-ai/langgraph","slug":"streammux-make-child-requires-the-mux-to-be-const","errorCode":null,"errorMessage":"StreamMux._make_child requires the mux to be constructed with `factories=`; pre-built transformers can't be cloned to a new scope.","messagePattern":"StreamMux\\._make_child requires the mux to be constructed with `factories=`; pre-built transformers can't be cloned to a new scope\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/stream/_mux.py","lineNumber":210,"sourceCode":"\n    def _make_child(self, scope: tuple[str, ...]) -> StreamMux:\n        \"\"\"Build a mini-mux with the same factories scoped to `scope`.\n\n        Used by `SubgraphTransformer` to attach a fresh transformer\n        pipeline to each discovered subgraph handle. The child mux\n        inherits the current pump bindings (so cursors on its\n        projection logs drive the root pump), carries the same factory\n        list forward to any grandchild subgraphs, and does not assign\n        `seq` numbers so forwarded events can be shared without\n        mutating their envelope.\n\n        Raises:\n            RuntimeError: If the mux was not constructed with\n                `factories=`. Mini-muxes require factories so each scope\n                gets its own fresh transformer instances.\n        \"\"\"\n        if self._factories is None:\n            raise RuntimeError(\n                \"StreamMux._make_child requires the mux to be constructed \"\n                \"with `factories=`; pre-built transformers can't be \"\n                \"cloned to a new scope.\"\n            )\n        child = StreamMux(\n            factories=self._factories,\n            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.","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/stream/_mux.py#L192-L228","documentation":"Error \"StreamMux._make_child requires the mux to be constructed with `factories=`; pre-built transformers can't be cloned to a new scope.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/stream/_mux.py:210 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"}