langchain-ai/langgraph · error · ValueError
Unknown operation type
Error message
Unknown operation type: {type(op)} What it means
Dispatch guard in InMemoryStore.batch: while sorting queued Ops, an object that is not one of the known operation types (GetOp, SearchOp, ListNamespacesOp, PutOp) reached the router. Ops are typed dataclasses; passing a raw tuple, a string, or a custom op class (e.g. from a mismatched langgraph-checkpoint version) triggers this error.
Solutions
- Use the typed Op dataclasses (PutOp, GetOp, SearchOp, ListNamespacesOp) from langgraph.store.base when calling batch directly
- Prefer the high-level put/get/search methods which construct ops for you
- Ensure all packages import Ops from the same installed langgraph-checkpoint version
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at libs/checkpoint/langgraph/checkpoint/store/memory/__init__.py:400 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/7ac878a8f475b3d6.
Report an issue: GitHub.
Appendix: source
Thrown at libs/checkpoint/langgraph/checkpoint/store/memory/__init__.py:400
elif isinstance(op, ListNamespacesOp):
results.append(self._handle_list_namespaces(op))
elif isinstance(op, PutOp):
put_ops[(op.namespace, op.key)] = op
results.append(None)
else:
raise ValueError(f"Unknown operation type: {type(op)}")
return results, put_ops, search_opsView on GitHub (pinned to 38031739e5)