Skip to content

BUG: interrupt_before breakpoint re-fires on every resume — run livelocks #45

Description

@addadi

Bug: interrupt_before breakpoint re-fires on every resume — run livelocks

Summary

A run interrupted at an interrupt_before breakpoint, when resumed, re-evaluates the same breakpoint condition against state that has not changed (the node still has not executed). The interrupt fires again → the run pauses again → resume → interrupt. The run can never pass the breakpoint: livelock.

Root cause

Breakpoint consumption is not persisted. Whether an interrupt_before for node N has already fired lives only in transient per-tick state (or is never tracked at all), so a resume re-enters the same path. Checkpoint metadata does not record consumed breakpoints, so resumeRun cannot skip them.

Reproduction

  1. Workflow: 2 chained task nodes a → b, with interrupt_before: ["b"] (workflow-level or node-level breakpoint config).
  2. Start the run; it pauses before b (run.interrupted fires).
  3. Resume the run (POST /runs/{id}/resume).
  4. The engine re-evaluates the pre-b breakpoint → interrupts again. Repeat forever; b never executes.

Expected behavior

A consumed breakpoint must be persisted (e.g. in the checkpoint metadata as consumed_breakpoints for the run) and skipped on subsequent evaluations — resume proceeds into b and the run completes. The run.interrupted callback/event should fire exactly once per breakpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions