langchain-ai/langgraph · error · ValueError
END cannot be a start node
Error message
END cannot be a start node
What it means
Error "END cannot be a start node" thrown in langchain-ai/langgraph.
Source
Thrown at libs/langgraph/langgraph/graph/state.py:953
Args:
start_key: The key(s) of the start node(s) of the edge.
end_key: The key of the end node of the edge.
Raises:
ValueError: If the start key is `'END'` or if the start key or end key is not present in the graph.
Returns:
Self: The instance of the `StateGraph`, allowing for method chaining.
"""
if self.compiled:
logger.warning(
"Adding an edge to a graph that has already been compiled. This will "
"not be reflected in the compiled graph."
)
if isinstance(start_key, str):
if start_key == END:
raise ValueError("END cannot be a start node")
if end_key == START:
raise ValueError("START cannot be an end node")
# run this validation only for non-StateGraph graphs
if not hasattr(self, "channels") and start_key in set(
start for start, _ in self.edges
):
raise ValueError(
f"Already found path for node '{start_key}'.\n"
"For multiple edges, use StateGraph with an Annotated state key."
)
self.edges.add((start_key, end_key))
return self
for start in start_key:
if start == END:
raise ValueError("END cannot be a start node")View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/langgraph/langgraph/graph/state.py:953 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/2f097b8864460426.
Report an issue: GitHub.