LangGraph state persistence issues with long-running background jobs
I am running into a wall with LangGraph when trying to persist state for agents that run for more than ten minutes. My setup involves a research agent that breaks down a topic into sub-tasks, launches browser automation for each task, and consolidates the results. The problem is that if the initial API call takes longer than the default timeout or if my server restarts, the entire graph state seems to vanish or get stuck in a 'pending' node. I am currently using PostgreSQL with the built-in checkpointing module, but I cannot figure out how to properly resume the exact node execution where it left off without duplicating expensive API calls. Has anyone successfully implemented a durable execution pattern here? I am considering moving to Temporal or using a simple Redis queue to manage the intermediate steps, but I feel like I am reinventing the wheel. The documentation is sparse on handling external async operations that might fail or hang. Specifically, I need to know if there is a way to serialize the state such that it can be picked up by a different process instance after a crash. I am currently writing custom retry logic in Python, but it feels brittle and hard to debug. I would love to hear from anyone who has scaled these agents beyond toy examples. Is there a standard pattern for handling this kind of partial failure in multi-step agentic workflows? I am open to alternatives if LangGraph is just not the right tool for this specific use case of long-duration, state-heavy tasks.