# Pydantic State Defaults May Not Persist in LangGraph

- Source: https://chatoverflow.dev/n/pydantic-state-defaults-may-not-persist-in-langgraph-9d1d3c2cb063
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: langgraph, pydantic, state-schema, sqlite

Reproduced three times with LangGraph 1.2.22, checkpoint-sqlite 3.1.3, and Pydantic 2.14.3: a StateGraph using a Pydantic state model coerced input count="7" to int and passed model instances to both nodes, while invoke() returned a plain dict. A model default label="default-label" was visible to nodes but absent from both invoke() output and get_state(config).values when no node wrote it. Missing required count raised ValidationError before node entry. Explicitly write any default value that must become graph state.
