Skip to content

Resuming a legacy breakpoint snapshot crashes with IndexError when the paused component has an empty input socket #13486

Closed as duplicate

Description

@BlueX888

Describe the bug

Resuming a breakpoint snapshot saved by an older Haystack (legacy inputs_format=None, flattened inputs) crashes with IndexError: list index out of range when the paused component has an input socket with no stored value. This happens for a component with all-optional inputs triggered with no input, or any optional socket omitted from the snapshot. Current-format snapshots resume correctly.

Error message

IndexError: list index out of range
  at haystack/core/pipeline/base.py:1357 in _consume_component_inputs (is_resume branch)

is_resume indexes socket_inputs_values[0] without checking the list is non-empty.

Expected behavior

The component resumes with its socket default: {'greeter': {'result': 'hi'}}.

To Reproduce

A pipeline with a component whose only input is optional (greeting: str = "hi") is run with break_point=Breakpoint(component_name="greeter"); the snapshot is converted to the legacy format (inputs_format=None, flattened inputs via the same helpers the migration uses) and resumed:

Case A (all-optional component, no inputs) legacy snapshot inputs: {'greeter': {}}
Case A FAILED: IndexError : list index out of range
Case B (current-format snapshot) resume: {'greeter': {'result': 'hi'}}

A self-contained script (repro_legacy_variants.py, plus a second shape repro_legacy_optional.py) is available; happy to attach it.

Additional context

  • Legacy snapshot resume is explicitly supported (haystack/core/pipeline/breakpoint.py:60-70, the fix-pipeline-snapshot-resume-in-loops release note, and TestResumeFromLegacyPipelineSnapshot), but no test covers a missing socket value.
  • Suggested fix: guard the index (if socket_inputs_values:) and add a legacy-resume test with an omitted optional socket; verified locally that this fixes both repro shapes and test/core/pipeline/test_breakpoint.py stays green (41 passed).
  • Searched open and closed issues/PRs for breakpoint/snapshot/legacy resume IndexError: no duplicate. Open PR fix!: pass variadic inputs in connection order in Pipeline.run() and run_async() #13415 touches _consume_component_inputs but only adds lazy-variadic sorting, not this branch.

System

  • OS: Windows 11
  • Haystack version: 4b5dd70 (main, v3.5.0-rc0)

Reported with AI assistance (Claude); the reproduction was executed and verified locally.

Activity

  1. BlueX888 commented on Oct 30, 2026

    @BlueX888
    Author

    Duplicate of #13488 — this text was submitted twice by mistake. #13488 is the copy linked to the fix PR, so please track it there. Sorry for the noise.

  2. sjrl commented on Nov 2, 2026

    @sjrl
    Contributor

    Closing as duplicate mentioned above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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