[PR #797] [MERGED] fix(langgraph): make sure the pregel loop aborts on cancellation #1019

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/797
Author: @benjamincburns
Created: 1/23/2025
Status: Merged
Merged: 1/23/2025
Merged by: @benjamincburns

Base: mainHead: ben/better-abort


📝 Commits (1)

  • 5d20cf3 fix(langgraph): make sure the pregel loop aborts on cancellation

📊 Changes

4 files changed (+30 additions, -16 deletions)

View changed files

📝 libs/langgraph/src/pregel/retry.ts (+7 -1)
📝 libs/langgraph/src/pregel/runner.ts (+19 -15)
📝 libs/langgraph/src/pregel/utils/config.ts (+1 -0)
📝 libs/langgraph/src/tests/pregel.test.ts (+3 -0)

📄 Description

This is a follow-up to #795. The change in #795 caused the stream to abort, but not the pregel loop execution.

This change

  • prevents the AbortSignal from being filtered out of the config object that's handed off to the PregelRunner
  • ensures that the abort error type is consistent
  • checks the abort signal in the retry loop so we don't retry tasks after abort

🔄 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/797 **Author:** [@benjamincburns](https://github.com/benjamincburns) **Created:** 1/23/2025 **Status:** ✅ Merged **Merged:** 1/23/2025 **Merged by:** [@benjamincburns](https://github.com/benjamincburns) **Base:** `main` ← **Head:** `ben/better-abort` --- ### 📝 Commits (1) - [`5d20cf3`](https://github.com/langchain-ai/langgraphjs/commit/5d20cf392b1390f05b8cd9838e85fe7a6854cb68) fix(langgraph): make sure the pregel loop aborts on cancellation ### 📊 Changes **4 files changed** (+30 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `libs/langgraph/src/pregel/retry.ts` (+7 -1) 📝 `libs/langgraph/src/pregel/runner.ts` (+19 -15) 📝 `libs/langgraph/src/pregel/utils/config.ts` (+1 -0) 📝 `libs/langgraph/src/tests/pregel.test.ts` (+3 -0) </details> ### 📄 Description This is a follow-up to #795. The change in #795 caused the stream to abort, but not the pregel loop execution. This change - prevents the `AbortSignal` from being filtered out of the config object that's handed off to the `PregelRunner` - ensures that the abort error type is consistent - checks the abort signal in the retry loop so we don't retry tasks after abort --- <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:16:49 -05:00
yindo closed this issue 2026-02-15 19:16:49 -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#1019