LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
  • Stream
LangGraph SDK
  • Ui
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Utils
  • Server
  • Stream
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemoteStream
LangGraph SDK
UiClientAuthReactLoggingReact UiUtilsServerStream
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/langgraph-sdkindexThreadStreamstartLifecycleWatcher
Method●Since v1.9

startLifecycleWatcher

Public, idempotent entry point to start the wildcard lifecycle watcher.

The watcher is normally started lazily by submitRun / respondInput because for fresh (self-created) threads the SSE stream would 404 if opened before the server has the thread row. Callers that already know the thread exists server-side (StreamController.hydrate of an existing thread) can use this to start the watcher up front. The watcher subscribes to wildcard lifecycle events across every namespace, so it sees arbitrarily- nested subagent lifecycle messages that the narrow root content pump (running at depth: 1) wouldn't reach — that's what makes subagent discovery work for historical thread loads.

Idempotent — repeat calls reuse the in-flight start promise.

Copy
startLifecycleWatcher()
View source on GitHub