langchain-ai/langgraph · error · RuntimeError
AsyncThreadStream is closed.
Error message
AsyncThreadStream is closed.
What it means
Error "AsyncThreadStream is closed." thrown in langchain-ai/langgraph.
Source
Thrown at libs/sdk-py/langgraph_sdk/_async/stream.py:146
return False
return data.get("event") in _ROOT_TERMINAL_LIFECYCLE_EVENTS
class _AgentModule:
"""Assistant graph helpers scoped to one thread stream."""
def __init__(self, owner: AsyncThreadStream) -> None:
self._owner = owner
async def get_tree(
self,
*,
xray: int | bool = False,
headers: Mapping[str, str] | None = None,
params: QueryParamTypes | None = None,
) -> dict[str, list[dict[str, Any]]]:
if self._owner._closed:
raise RuntimeError("AsyncThreadStream is closed.")
query_params: dict[str, Any] = {}
if xray:
query_params["xray"] = xray
if params:
query_params.update(dict(params))
request_headers = {**self._owner._headers, **dict(headers or {})}
return await self._owner._http.get(
f"/assistants/{self._owner.assistant_id}/graph",
params=query_params,
headers=request_headers or None,
)
class RunModule:
"""Command dispatcher for `run.start`.
Bound to one `AsyncThreadStream`; accesses its transport and id allocator.
"""View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/sdk-py/langgraph_sdk/_async/stream.py:146 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26).
Data as JSON: /api/errors/68fcd2b1b7df11cc.
Report an issue: GitHub.