langchain-ai/langgraph · error · ValueError

idle_timeout is required when kind='idle'

Error message

idle_timeout is required when kind='idle'

What it means

Raised by GraphTimeoutError.__init__ when kind='idle' is requested but no idle_timeout was passed. The constructor uses the timeout to build its message, so it validates that the required kind-specific timeout argument is present.

Solutions

  1. Pass a positive `idle_timeout` value whenever constructing the error with kind='idle'
  2. Use kind='run' with run_timeout if you meant a total-run timeout
  3. Build the exception via the code path that computes timeouts rather than manually
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at libs/langgraph/langgraph/errors.py:219 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26). Data as JSON: /api/errors/5cf1bb54f31ee609. Report an issue: GitHub.

Appendix: source

Thrown at libs/langgraph/langgraph/errors.py:219

    node: str
    timeout: float
    run_timeout: float | None
    idle_timeout: float | None
    elapsed: float
    kind: Literal["idle", "run"]

    def __init__(
        self,
        node: str,
        elapsed: float,
        *,
        kind: Literal["idle", "run"],
        idle_timeout: float | None = None,
        run_timeout: float | None = None,
    ) -> None:
        if kind == "idle":
            if idle_timeout is None:
                raise ValueError("idle_timeout is required when kind='idle'")
            message = (
                f"Node '{node}' exceeded its idle timeout of "
                f"{idle_timeout:.3f}s without making progress "
                f"(elapsed: {elapsed:.3f}s)."
            )
            self.timeout = idle_timeout
        elif kind == "run":
            if run_timeout is None:
                raise ValueError("run_timeout is required when kind='run'")
            message = (
                f"Node '{node}' exceeded its run timeout of "
                f"{run_timeout:.3f}s (elapsed: {elapsed:.3f}s)."
            )
            self.timeout = run_timeout
        else:
            raise ValueError("kind must be 'idle' or 'run'")
        super().__init__(message)
        self.node = node

View on GitHub (pinned to 38031739e5)