deepset-ai/haystack · error · PipelineInvalidPipelineSnapshotError

The provided break_point targets the same component and visi

Error message

The provided break_point targets the same component and visit count as the break_point of the pipeline_snapshot. It would trigger again before the resumed component runs, so the pipeline could not make any progress. Provide a break_point with a different component or visit count.

What it means

Haystack raises PipelineInvalidPipelineSnapshotError during Pipeline.run when resuming a pipeline from a snapshot with a break_point identical to the one that produced the snapshot. Since the breakpoint condition (same component and visit count) is still true at resume time, it would fire again immediately before the paused component executes, making progress impossible. This is a snapshot/interruption API guard in run (pipeline.py:341).

Source

Thrown at haystack/core/pipeline/pipeline.py:341

        :raises PipelineMaxComponentRuns:
            If a Component reaches the maximum number of times it can be run in this Pipeline.
        :raises PipelineBreakpointException:
            When a pipeline_breakpoint is triggered. Contains the component name, state, and partial results.
        """
        pipeline_running(self)  # telemetry

        if (
            break_point
            and pipeline_snapshot
            and break_point.component_name == pipeline_snapshot.break_point.component_name
            and break_point.visit_count == pipeline_snapshot.break_point.visit_count
        ):
            msg = (
                "The provided break_point targets the same component and visit count as the break_point of the "
                "pipeline_snapshot. It would trigger again before the resumed component runs, so the pipeline "
                "could not make any progress. Provide a break_point with a different component or visit count."
            )
            raise PipelineInvalidPipelineSnapshotError(message=msg)

        # make sure all breakpoints are valid, i.e. reference components in the pipeline
        if break_point:
            _validate_break_point_against_pipeline(break_point, self.graph)

        # warm up the pipeline by running each component's warm_up method
        self.warm_up()

        if include_outputs_from is None:
            include_outputs_from = set()

        pipeline_outputs: dict[str, Any] = {}
        # Set when resuming from a snapshot that predates `INTERNAL_INPUTS_FORMAT` and therefore lost the sender of
        # each input. Cleared as soon as the paused component has run.
        legacy_resume_component: str | None = None

        if not pipeline_snapshot:
            # normalize `data`

View on GitHub (pinned to e318778c9b)

Solutions

  1. Omit the break_point argument entirely when resuming with a pipeline_snapshot (the snapshot already carries its breakpoint).
  2. Provide a Breakpoint with a different component_name, or an advanced visit_count (e.g. visit_count+1) so the resumed component runs first.
  3. Check whether you accidentally replayed the original run call instead of the resume call; ensure you are not reusing the same arguments.

Example fix

# before
result = pipe.run(data, pipeline_snapshot=snapshot,
                  break_point=Breakpoint(component_name="llm", visit_count=1))
# after
result = pipe.run(data, pipeline_snapshot=snapshot)  # snapshot's break_point reused
Defensive patterns

Strategy: validation

Validate before calling

if snapshot.break_point and break_point and \
        snapshot.break_point.component_name == break_point.component_name and \
        snapshot.break_point.visit_count == break_point.visit_count:
    break_point = None  # let the snapshot's breakpoint govern the resume

Type guard

def is_same_breakpoint(a, b) -> bool:
    return a is not None and b is not None and \
        a.component_name == b.component_name and a.visit_count == b.visit_count

Try / catch

try:
    result = pipe.run(data, pipeline_snapshot=snapshot, break_point=bp)
except PipelineInvalidPipelineSnapshotError:
    result = pipe.run(data, pipeline_snapshot=snapshot)

Prevention

When it happens

Trigger: Calling pipeline.run(data=..., pipeline_snapshot=snapshot, break_point=Breakpoint(component_name=X, visit_count=N)) where the snapshot's own break_point is also Breakpoint(component_name=X, visit_count=N).

Common situations: Re-running the same resume call twice (idempotent retry of run after a breakpoint); copying the snapshot's breakpoint into the resume call instead of advancing it; passing a breakpoint built from stale state after a failed resume attempt.

Related errors


AI-assisted analysis of deepset-ai/haystack@e318778c9b (2026-08-30). Data as JSON: /api/errors/f2f51b73d3ffdbca. Report an issue: GitHub.