{"record":{"id":"2831a38bdbd83c3c","repo":"langchain-ai/langgraph","slug":"syncthreadstream-is-closed","errorCode":null,"errorMessage":"SyncThreadStream is closed.","messagePattern":"SyncThreadStream is closed\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"libs/sdk-py/langgraph_sdk/_sync/stream.py","lineNumber":189,"sourceCode":"    def done(self) -> bool:\n        return self._event.is_set()\n\n\nclass _SyncAgentModule:\n    \"\"\"Assistant graph helpers scoped to one sync thread stream.\"\"\"\n\n    def __init__(self, owner: SyncThreadStream) -> None:\n        self._owner = owner\n\n    def get_tree(\n        self,\n        *,\n        xray: int | bool = False,\n        headers: Mapping[str, str] | None = None,\n        params: QueryParamTypes | None = None,\n    ) -> dict[str, list[dict[str, Any]]]:\n        if self._owner._closed:\n            raise RuntimeError(\"SyncThreadStream is closed.\")\n        query_params: dict[str, Any] = {}\n        if xray:\n            query_params[\"xray\"] = xray\n        if params:\n            query_params.update(dict(params))\n        request_headers = {**self._owner._headers, **dict(headers or {})}\n        return self._owner._http.get(\n            f\"/assistants/{self._owner.assistant_id}/graph\",\n            params=query_params,\n            headers=request_headers or None,\n        )\n\n\nclass SyncRunModule:\n    \"\"\"Command dispatcher for `run.start`.\n\n    Bound to one `SyncThreadStream`; accesses its transport and id allocator.\n    \"\"\"","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/sdk-py/langgraph_sdk/_sync/stream.py#L171-L207","documentation":"Error \"SyncThreadStream is closed.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/sdk-py/langgraph_sdk/_sync/stream.py:189 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"}