mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-30 19:59:40 +02:00
InMemorySaver.prune now walks the parent chain from the latest checkpoint and keeps all ancestors whose writes are still needed for DeltaChannel reconstruction — i.e. ancestors with DELTA_SENTINEL blobs where no _DeltaSnapshot has been written yet in the kept ancestry. Once a _DeltaSnapshot blob exists for all sentinel channels (provided by snapshot_frequency), the walk terminates and older checkpoints plus their writes and blobs are safely deleted. With snapshot_frequency=None (pure delta), all intermediate checkpoints are retained since the full write history is required. Setting snapshot_frequency=N bounds the kept ancestry to N steps. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>