You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8cae5c5
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(langgraph): adopt a transport-created thread id instead of aborting the run (#1005)
* fix(langgraph): adopt a transport-created thread id instead of aborting the run
The bridge treated the first non-null thread id as a thread SWITCH whenever
its own currentThreadId was still null, which aborted the in-flight run that
had just created that thread. Only the fallback FetchStreamTransport got the
wrappedOnThreadId interceptor, so a consumer-supplied transport left
currentThreadId at null and every adoption looked like a switch.
shouldReset now requires a KNOWN current thread: a null currentThreadId is
adoption, never a switch. hasSeenThreadId is subsumed by that check and is
removed. A genuine switch (known id -> different id, or -> null) still aborts
and resets exactly as before.
Also corrects the wrappedOnThreadId comment, which claimed a guarantee it only
provides on the default transport, and documents on AgentConfig.transport /
AgentOptions.transport that a custom transport must report created thread ids
through onThreadId or the threadId signal.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* chore(docs): regenerate api docs
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: apps/website/content/docs/langgraph/api/api-docs.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -949,7 +949,7 @@
949
949
{
950
950
"name": "transport",
951
951
"type": "AgentTransport",
952
-
"description": "Custom transport. Defaults to FetchStreamTransport.",
952
+
"description": "Custom transport. Defaults to FetchStreamTransport.\n\nA custom transport owns its own thread creation, so the runtime cannot\nobserve it directly: report every thread id the transport creates through\nAgentConfig.onThreadId or through the `threadId` signal, otherwise\nthe runtime keeps sending `null` and a new thread is created on each submit.",
953
953
"optional": true
954
954
}
955
955
],
@@ -1091,7 +1091,7 @@
1091
1091
{
1092
1092
"name": "transport",
1093
1093
"type": "AgentTransport",
1094
-
"description": "Custom transport. Defaults to FetchStreamTransport.",
1094
+
"description": "Custom transport. Defaults to FetchStreamTransport.\n\nA custom transport owns its own thread creation, so the runtime cannot\nobserve it directly: report every thread id the transport creates through\nthis config's AgentOptions.onThreadId or through the `threadId`\nsignal, otherwise the runtime keeps sending `null` and a new thread is\ncreated on each submit.",
0 commit comments