[PR #710] [MERGED] Allow value of NodeInterrupt to be any (JSON-serializable) type. #953

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/710
Author: @jaredhanson
Created: 12/5/2024
Status: Merged
Merged: 12/5/2024
Merged by: @jacoblee93

Base: mainHead: nodeinterrupt-value


📝 Commits (3)

  • 3891950 Allow value of NodeInterrupt to be any (JSON-serializable) type.
  • d73d236 Merge remote-tracking branch 'jared/nodeinterrupt-value' into nodeinterrupt-value
  • 1da86c4 Update errors.ts

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 libs/langgraph/src/errors.ts (+2 -1)

📄 Description

This changes NodeInterrupt's message to allow any type, rather than just a string. This allows steps and tools to bubble up structured objects as interrupts, where they can be handled by the application.

My specific use case is the ability to make an API call and receive a 401 Unauthorized response that contains challenge parameters (such as scope or max_age) that indicate what authorization context is needed. The step/tool throws a structured NodeInterrupt including the parameters from the challenge. Then application then uses these parameters to bring the human in the loop with an OAuth 2.0 authorization request.

I discussed this with @jacoblee93 on an internal Slack channel.

Twitter: @jaredhanson


🔄 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/710 **Author:** [@jaredhanson](https://github.com/jaredhanson) **Created:** 12/5/2024 **Status:** ✅ Merged **Merged:** 12/5/2024 **Merged by:** [@jacoblee93](https://github.com/jacoblee93) **Base:** `main` ← **Head:** `nodeinterrupt-value` --- ### 📝 Commits (3) - [`3891950`](https://github.com/langchain-ai/langgraphjs/commit/38919503d8a93e8b1fac65ad960f4bdc836a30da) Allow value of NodeInterrupt to be any (JSON-serializable) type. - [`d73d236`](https://github.com/langchain-ai/langgraphjs/commit/d73d236ef2cbdc0aaebcfc8862961a1768b9cd8e) Merge remote-tracking branch 'jared/nodeinterrupt-value' into nodeinterrupt-value - [`1da86c4`](https://github.com/langchain-ai/langgraphjs/commit/1da86c407e9012d891936eebc5542176181a8eaa) Update errors.ts ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `libs/langgraph/src/errors.ts` (+2 -1) </details> ### 📄 Description This changes `NodeInterrupt`'s `message` to allow `any` type, rather than just a string. This allows steps and tools to bubble up structured objects as interrupts, where they can be handled by the application. My specific use case is the ability to make an API call and receive a 401 Unauthorized response that contains challenge parameters (such as `scope` or `max_age`) that indicate what authorization context is needed. The step/tool throws a structured `NodeInterrupt` including the parameters from the challenge. Then application then uses these parameters to bring the human in the loop with an OAuth 2.0 authorization request. I discussed this with @jacoblee93 on an internal Slack channel. Twitter: [@jaredhanson](https://x.com/jaredhanson) --- <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:31 -05:00
yindo closed this issue 2026-02-15 19:16:32 -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#953