Stream values not resetting in useStream when changing threadId while stream running #354

Closed
opened 2026-02-15 18:16:08 -05:00 by yindo · 0 comments
Owner

Originally created by @SeveHo on GitHub (Sep 9, 2025).

Example Code

Please find a reproducible example here: https://github.com/SeveHo/debug-langgraph

Description

What I did:

  • Start new thread by submitting a message using stream.submit
  • stream.messages returns the new messages for the thread. so far so good
  • Create a new thread by passing threadId undefined to useStream while the stream is running

Expected behavior:

  • stream.messages resets and returns an empty array.

Actual behavior:

  • stream.messages returns the list of messages from the previous thread.

The same behavior appears when changing a thread ID from e.g. 123 to 456 while stream 123 is running.

System Info

See repo.

Originally created by @SeveHo on GitHub (Sep 9, 2025). ### Example Code Please find a reproducible example here: https://github.com/SeveHo/debug-langgraph ### Description What I did: - Start new thread by submitting a message using `stream.submit` - `stream.messages` returns the new messages for the thread. so far so good - Create a new thread by passing threadId undefined to `useStream` **while the stream is running** Expected behavior: - `stream.messages` resets and returns an empty array. Actual behavior: - `stream.messages` returns the list of messages from the previous thread. The same behavior appears when changing a thread ID from e.g. `123` to `456` while stream `123` is running. ### System Info See repo.
yindo added the bug label 2026-02-15 18:16:08 -05:00
yindo closed this issue 2026-02-15 18:16:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#354