mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-10-17 13:45:30 +02:00
A thread stream's unsolicited error frame (`{"type": "error", "id": null}`)
was dropped, so `thread.output` failed with a generic "lifecycle stream
ended before terminal event" error, and the sync client's `thread.output`
blocked forever on the same clean close. The lifecycle watcher now fails
the run with the frame's error on both clients, and the shared stream logs
it instead of dropping it.
A 4xx other than 408 and 429, as an HTTP status or as a WebSocket close
code of 4000 plus the status, now ends the stream at once with that error
instead of being retried. A WebSocket closed this way after a successful
connect no longer reconnects forever.
The lifecycle watcher for a minted thread_id now starts after run.start
creates the thread, so under custom auth it no longer opens a stream for a
thread that doesn't exist yet. The sync client starts it under a lock,
since run.start can be called from several threads. Also drops a dead
duplicate of SyncStreamController._reconnect_shared_stream.