mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-26 09:32:25 +02:00
In async (default) durability mode, put_writes is fire-and-forget. If checkpoint_writes fails but put succeeds, the sentinel blob has no backing writes — reads silently reconstruct empty/wrong state. Fix: track futures returned by put_writes submissions in _pending_write_futs. Before committing a checkpoint that contains any DELTA_SENTINEL blob, call .result() on all pending write futures, blocking until they complete. This ensures checkpoint_writes are durable before the sentinel blob is committed. The flush only triggers when DELTA_SENTINEL is present, so graphs without DeltaChannel channels are unaffected. Snapshot steps (_DeltaSnapshot blobs) are self-contained and do not need the flush. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>