Repository navigation
Conversation
…session Angular agent() accepts a null threadId, creates the thread on the first submit and reports it through onThreadId. The React runtime createSession required a threadId, so apps had to create a thread before the user typed anything, and a "New chat" that was never sent left an empty thread behind. threadId is now optional (string | null). Without it the session sends no request until the first submit, which calls the new optional transport.createThread() once before the run (the owned SDK transport uses client.threads.create() under the owned maxRetries policy, 0 by default). The id is reported through onThreadId and read from session.threadId. A replacing submit shares the pending request, stop keeps a thread it creates, and dispose aborts it. A failed creation settles the submit with the generic request error (status only, never the body) and is retryable, since no run started. Before the thread exists, load and checkStatus resolve without a request and fork/regenerate reject. A string threadId behaves exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blove
enabled auto-merge
November 18, 2026 01:14
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Angular
agent()acceptsthreadIdasnull, creates the thread on the first submit and reports it viaonThreadId(libs/langgraph/src/lib/agent.types.ts,FetchStreamTransport.streamcallsclient.threads.create()). The React LangGraph runtimecreateSessionrequiredthreadId: string, so an app had to create a thread before the user typed anything, and an unsent "New chat" left an empty thread behind.SessionOptions.threadIdis now optional (string | null); a string behaves exactly as before.onThreadId?(threadId)option and a read-onlysession.threadIdgetter (string | undefined). The id is not added to the snapshot, so existing snapshot shapes are unchanged.AgentTransport.createThread(signal);FetchStreamTransportimplements it withclient.threads.create({ signal })(same call Angular makes, no metadata/graph options), under the ownedmaxRetriespolicy (0 by default). A supplied transport without it makes a thread-less construction throwTypeError.errorwith the genericThe LangGraph request failed.message; only an unprotected SDK error's numeric status is read (401/403 ->auth), never its message/body. No run started, so it isrecovery: 'retry'whenretry()exists, otherwisenone; the next submit orretry()makes a new request.load()/checkStatus()resolve with no request;fork()/regenerate()reject;reconnect()/resume()reject as they already do with nothing to join/answer. NoswitchThread(one session per thread stays the React model).Verification
NX_DAEMON=false npx nx run-many -t runtime-quality runtime-type-tests type-tests lint test -p langgraph— pass (newlazy-thread.spec.ts: 14 tests;lazy-thread.type-test.ts).TMPDIR=... node scripts/react-parity/verify-langgraph-candidate.mjs(after its documented prerequisite build) — pass, 31 modules, React 30 / Angular 27 scenarios; no module count change needed.NX_DAEMON=false npx nx run-many -t test lint type-tests -p react— pass (100 files).node --test scripts/react-parity/verify-packages.spec.mjs— 103 pass.node scripts/react-parity/inventory.mjs --check --drift warn— valid.apps/websitenpx vitest run— docs rules pass; 4 environment failures (missingposthog-nodeand api-docs fixture path from the symlinked node_modules; two 5s timeouts under machine load that pass alone with--testTimeout=60000).🤖 Generated with Claude Code