LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
  • Ui
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Utils
  • Server
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
WebChannelsPregelPrebuiltRemote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
UiClientAuthReactLoggingReact UiUtilsServer
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-sdkuiPendingRunsTracker
Class●Since v1.7

PendingRunsTracker

Tracks pending server-side runs created via multitaskStrategy: "enqueue".

Uses the same subscribe/getSnapshot pattern as StreamManager to integrate with framework-specific reactivity systems.

Copy
class PendingRunsTracker

Constructors

constructor
constructor

Properties

property
entries: readonly QueueEntry<StateType, OptionsType>[]
property
size: number

Methods

method
add→ string | null
method
getSnapshot→ number

Return the current version number, incremented on each state change. Useful as a cache key for external sync (e.g. useSyncExternalStore).

method
remove→ boolean

Remove a specific entry by ID.

method
removeAll→ QueueEntry<StateType, OptionsType>[]

Remove all entries from the tracker.

method
shift→ QueueEntry<StateType, OptionsType> | undefined

Remove and return the next pending entry (FIFO).

method
subscribe→ () => void

Register a listener that is called whenever the orchestrator state changes.

View source on GitHub