I’m using langsmith with deploy. We have an interrupt for human in the loop. The frontend gets the interrupt and we have a way to resolve it. This is ideal flow.
However, if on an interrupt, the user reloads the session, the front end has no way to know its in an interrupt state.
How do you recommend we resolve this issue? I was thinking of potentially storing a pending interrupt in another store where the FE can check for it, but that doesn’t strike me as the correct way, and I believe I won’t have the interrupt ID that the graph generates and needs for resolution.
Hey @michael6 ,
I wouldn’t store interrupts in a separate store. That can easily get out of sync. Instead, treat the persisted graph state (via your checkpointer) as the source of truth.
On reload, have the frontend call the backend to fetch the current thread/run state. If the graph is paused at an interrupt, your backend can detect that and return something like waiting_for_human along with the necessary metadata.
This way, reloads are safe and you don’t rely on the FE to remember interrupt state.
Thank you, yes I missed that interrupts show up in the state when you hit GET ../state.