langchain-ai/langgraph · error · InvalidUpdateError
At key ' ': Value not in
Error message
At key '{self.key}': Value {value} not in {self.names} What it means
Raised by NamedBarrierValue.update when a node writes a value that is not one of the barrier's configured names. The channel only accepts writes whose value is in self.names; any other value is rejected during channel update.
Solutions
- Write only values that appear in the barrier's `names` collection
- Check the names passed when the NamedBarrierValue channel was constructed and align node outputs with them
- Debug-print the incoming values and self.names before the failing superstep to find the mismatched writer
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at libs/langgraph/langgraph/channels/named_barrier_value.py:64 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/93ccf4e3df625c82.
Report an issue: GitHub.
Appendix: source
Thrown at libs/langgraph/langgraph/channels/named_barrier_value.py:64
def checkpoint(self) -> set[Value]:
return self.seen
def from_checkpoint(self, checkpoint: set[Value]) -> Self:
empty = self.__class__(self.typ, self.names)
empty.key = self.key
if checkpoint is not MISSING:
empty.seen = checkpoint
return empty
def update(self, values: Sequence[Value]) -> bool:
updated = False
for value in values:
if value in self.names:
if value not in self.seen:
self.seen.add(value)
updated = True
else:
raise InvalidUpdateError(
f"At key '{self.key}': Value {value} not in {self.names}"
)
return updated
def get(self) -> Value:
if self.seen != self.names:
raise EmptyChannelError()
return None
def is_available(self) -> bool:
return self.seen == self.names
def consume(self) -> bool:
if self.seen == self.names:
self.seen = set()
return True
return False
View on GitHub (pinned to 38031739e5)