LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
  • Stream
LangGraph SDK
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
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
ClientAuthReactLoggingReact UiServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
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/langgraphwebTimeoutPolicy
Typeā—Since v1.4

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.

Maximum time (in milliseconds) a single node attempt may go without observable progress before timing out.

Refreshed by writes, custom stream writer calls, child-task scheduling, LangChain callback events emitted under the node's run, and explicit runtime.heartbeat() calls (see TimeoutPolicy.refreshOn).

Which signals refresh TimeoutPolicy.idleTimeout.

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

Hard wall-clock cap (in milliseconds) for a single node attempt.

This timeout is never refreshed by progress signals or runtime.heartbeat().