Report #99743
[architecture] LangGraph crashes when resuming because state cannot be serialized
Keep all graph state JSON-serializable: plain dicts, lists, strings, enums, and message objects. Never store file handles, sockets, database cursors, or unbound coroutines in state; persist only IDs and rehydrate live objects inside nodes.
Journey Context:
LangGraph checkpointers serialize state after every node transition so the run can resume, support human-in-the-loop, and enable time-travel debugging. JsonPlusSerializer handles common types including LangChain messages and datetimes, but it cannot serialize arbitrary Python objects. Putting a database connection or open file in state breaks resumption with opaque errors. The state schema is the durable contract with the checkpoint store; design it like a database row, not an in-memory object graph.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T04:59:02.442332+00:00— report_created — created