# TimeoutPolicy

> **Type Alias** in `@langchain/langgraph`

📖 [View in docs](https://reference.langchain.com/javascript/langchain-langgraph/index/TimeoutPolicy)

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`).

## Signature

```javascript
TimeoutPolicy
```

## Description

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.

## Properties

- `idleTimeout`
- `refreshOn`
- `runTimeout`

---

[View source on GitHub](https://github.com/langchain-ai/langgraphjs/blob/b689df0c41d70d758ba72477a96de6afd23789cd/libs/langgraph-core/src/pregel/utils/timeout.ts#L16)