{"record":{"id":"b742df0a32db8ca2","repo":"langchain-ai/langgraph","slug":"cannot-push-to-a-closed-streamchannel","errorCode":null,"errorMessage":"Cannot push to a closed StreamChannel","messagePattern":"Cannot push to a closed StreamChannel","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/stream/stream_channel.py","lineNumber":136,"sourceCode":"    # ------------------------------------------------------------------\n\n    def push(self, item: T) -> None:\n        \"\"\"Append an item. Auto-forwards if wired.\n\n        The local buffer append is a no-op when no subscriber is\n        registered, but auto-forwarding always fires so wired events\n        reach the main event log regardless of subscription state.\n\n        Items are stored as `(stamp, item)` tuples where stamp is a\n        monotonic counter from the owning mux. Stamps are stripped by\n        the default cursors; raw stamped tuples are visible on `_items`.\n\n        Raises:\n            RuntimeError: If the channel is closed (and subscribed).\n        \"\"\"\n        if self._subscribed:\n            if self._closed:\n                raise RuntimeError(\"Cannot push to a closed StreamChannel\")\n            stamp = self._mux._next_push_seq() if self._mux is not None else 0\n            self._items.append((stamp, item))\n        if self._wire_fn is not None:\n            self._wire_fn(item)\n\n    def close(self) -> None:\n        \"\"\"Mark the channel as complete.\"\"\"\n        self._closed = True\n\n    def fail(self, err: BaseException) -> None:\n        \"\"\"Mark the channel as errored.\n\n        Args:\n            err: The exception to surface to the subscriber.\n        \"\"\"\n        self._error = err\n        self._closed = True\n","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/stream/stream_channel.py#L118-L154","documentation":"Error \"Cannot push to a closed StreamChannel\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/stream/stream_channel.py:136 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"}