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/langgraphindexTimeoutPolicy
Typeā—Since v0.3

TimeoutPolicy

Copy
TimeoutPolicy

Properties

View source on GitHub
property
idleTimeout: number
property
refreshOn: "auto" | "heartbeat"
property
runTimeout: number

Configuration for timing out node attempts.

A timeout applies to a single attempt of a node/task. When a node has a RetryPolicy, the timer resets for each retry attempt.

Timeouts are expressed in milliseconds, matching other LangGraph.js durations (e.g. RetryPolicy intervals and stepTimeout).

Cooperative cancellation: timeouts rely on aborting the node's AbortSignal and dropping its buffered writes. A node that ignores its signal and performs blocking work cannot be interrupted mid-operation, but its writes are still discarded and NodeTimeoutError is raised.

Configured idle timeout (ms), if any.

Which signals refresh TimeoutPolicy.idleTimeout.

  • "auto" (default): refreshes on standard graph progress signals and explicit heartbeats.
  • "heartbeat": refreshes only on explicit runtime.heartbeat() calls.

Configured run timeout (ms), if any.