Skip to content

Do not re-execute a node that interrupted unless all of its interrupts have been resumed #6208

@casparb

Description

@casparb

Privileged issue

  • I am a LangGraph maintainer, or was asked directly by a LangGraph maintainer to create an issue here.

Issue Content

See #6158 optimization, which stalls node re-execution until its (single) interrupt has been resumed.

There is still more to be optimized: a node with two interrupts will rerun after only one resume. We can't solve this without knowing how many resumes are pending per task, which would require tracking interrupt ids. This isn't possible with currently stored metadata.

We can sidestep this limitation by suggesting that users avoid multiple interrupts per node and instead chain multiple nodes. But I would like to store all interrupts in a PregelLoop instance so that this optimization is possible.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions