[PR #1068] [MERGED] fix(langgraph): goto + interrupt handling #1216

Closed
opened 2026-02-15 19:17:41 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/1068
Author: @dqbd
Created: 4/1/2025
Status: Merged
Merged: 4/9/2025
Merged by: @dqbd

Base: mainHead: dqbd/interrupt-goto


📝 Commits (4)

  • 13bd756 fix(langgraph): goto + interrupt handling
  • 2f65956 Revert isResuming behavior in _first
  • 61112eb Create a new checkpoint when we do Command(goto=...) or Command(update=...)
  • ad18c0f Make the PR smaller

📊 Changes

2 files changed (+76 additions, -4 deletions)

View changed files

📝 libs/langgraph/src/pregel/loop.ts (+25 -4)
📝 libs/langgraph/src/tests/pregel.test.ts (+51 -0)

📄 Description

  1. Command(goto=...) needs to be treated separately from Command(update=...) and Command(goto=....) w.r.t. writes and checkpoints. If a checkpoint is not created, the pending write will get lost if the Command(goto=...) enters into a node that interrupts
  2. We actually did create a new checkpoint pre-#1023 (isResuming=false), but because we mapped and wrote the input twice, it also scheduled the start node. Thus, adding a new branch for non-resume Command seems reasonable to me.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/1068 **Author:** [@dqbd](https://github.com/dqbd) **Created:** 4/1/2025 **Status:** ✅ Merged **Merged:** 4/9/2025 **Merged by:** [@dqbd](https://github.com/dqbd) **Base:** `main` ← **Head:** `dqbd/interrupt-goto` --- ### 📝 Commits (4) - [`13bd756`](https://github.com/langchain-ai/langgraphjs/commit/13bd75621db2ddb59bba970a65d891e17ebdf5b5) fix(langgraph): goto + interrupt handling - [`2f65956`](https://github.com/langchain-ai/langgraphjs/commit/2f65956e35f1e20478b22a34c98f03f92b84f633) Revert isResuming behavior in _first - [`61112eb`](https://github.com/langchain-ai/langgraphjs/commit/61112eb225bd4ecd4b32f9480a9edc969ed5f1b0) Create a new checkpoint when we do Command(goto=...) or Command(update=...) - [`ad18c0f`](https://github.com/langchain-ai/langgraphjs/commit/ad18c0fb11e2bd40ad8b803cbb43d7580b6cabdf) Make the PR smaller ### 📊 Changes **2 files changed** (+76 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `libs/langgraph/src/pregel/loop.ts` (+25 -4) 📝 `libs/langgraph/src/tests/pregel.test.ts` (+51 -0) </details> ### 📄 Description 1. `Command(goto=...)` needs to be treated separately from `Command(update=...)` and `Command(goto=....)` w.r.t. writes and checkpoints. If a checkpoint is not created, the pending write will get lost if the `Command(goto=...)` enters into a node that interrupts 2. We actually did create a new checkpoint pre-#1023 (`isResuming=false`), but because we mapped and wrote the input twice, it also scheduled the start node. Thus, adding a new branch for non-resume Command seems reasonable to me. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:17:41 -05:00
yindo closed this issue 2026-02-15 19:17:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#1216