LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
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
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

Copy
class PendingRunsTracker

Constructors

Properties

Methods

View source on GitHub
constructor
constructor
property
entries: readonly QueueEntry<StateType, OptionsType>[]
property
size: number
method
add→ string | null
method
getSnapshot→ number

Snapshot token for useSyncExternalStore compatibility.

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

Subscribe to state changes. Returns an unsubscribe function.

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

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