langchain-ai/langgraph · error · LangGraphDeprecatedSinceV11

Accessing GraphOutput via `key in result` is deprecated. Use

Error message

Accessing GraphOutput via `key in result` is deprecated. Use `result.value` to access the output value directly, or `result.interrupts` for interrupts.

What it means

Error "Accessing GraphOutput via `key in result` is deprecated. Use `result.value` to access the output value directly, or `result.interrupts` for interrupts." thrown in langchain-ai/langgraph.

Source

Thrown at libs/langgraph/langgraph/types.py:401

        """Backward compat: `result['__interrupt__']` and dict-key access."""
        warn(
            "Accessing GraphOutput via `result[key]` is deprecated. "
            "Use `result.value` to access the output value directly, "
            "or `result.interrupts` for interrupts.",
            LangGraphDeprecatedSinceV11,
            stacklevel=2,
        )
        if key == _INTERRUPT_KEY:
            return self.interrupts
        if isinstance(self.value, dict):
            return self.value[key]
        try:
            return getattr(self.value, key)
        except AttributeError:
            raise KeyError(key)

    def __contains__(self, key: object) -> bool:
        warn(
            "Accessing GraphOutput via `key in result` is deprecated. "
            "Use `result.value` to access the output value directly, "
            "or `result.interrupts` for interrupts.",
            LangGraphDeprecatedSinceV11,
            stacklevel=2,
        )
        if key == _INTERRUPT_KEY:
            return bool(self.interrupts)
        if isinstance(self.value, dict):
            return key in self.value
        return isinstance(key, str) and hasattr(self.value, key)


_DC_KWARGS = {"kw_only": True, "slots": True, "frozen": True}


class RetryPolicy(NamedTuple):
    """Configuration for retrying nodes.

View on GitHub (pinned to 38031739e5)

When it happens

Trigger: Thrown at libs/langgraph/langgraph/types.py:401 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/e81ce1d8646dde83. Report an issue: GitHub.