langchain-ai/langgraph · error · GraphDrained

shutdown

Error message

shutdown

What it means

Error "shutdown" thrown in langchain-ai/langgraph.

Source

Thrown at libs/langgraph/langgraph/pregel/main.py:3015

                version,
                _output_mapper,
                _state_mapper,
            )
            # handle exit
            if loop.status == "out_of_steps":
                msg = create_error_message(
                    message=(
                        f"Recursion limit of {config['recursion_limit']} reached "
                        "without hitting a stop condition. You can increase the "
                        "limit by setting the `recursion_limit` config key."
                    ),
                    error_code=ErrorCode.GRAPH_RECURSION_LIMIT,
                )
                raise GraphRecursionError(msg)
            elif loop.status == "draining":
                if loop.control is None:
                    raise RuntimeError("Draining status requires run control")
                raise GraphDrained(loop.control.drain_reason or "shutdown")
            # set final channel values as run output
            run_manager.on_chain_end(loop.output)
        except BaseException as e:
            if run_manager is not None:
                run_manager.on_chain_error(e)
            raise

    @overload
    def astream(
        self,
        input: InputT | Command | None,
        config: RunnableConfig | None = None,
        *,
        context: ContextT | None = None,
        stream_mode: StreamMode | Sequence[StreamMode] | None = None,
        print_mode: StreamMode | Sequence[StreamMode] = (),
        output_keys: str | Sequence[str] | None = None,
        interrupt_before: All | Sequence[str] | None = None,

View on GitHub (pinned to 38031739e5)

When it happens

Trigger: Thrown at libs/langgraph/langgraph/pregel/main.py:3015 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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