Skip to content

StartNode DFE variables not bound when InputMessageNode is first gate — downstream nodes receive empty values #155

@groganz

Description

@groganz

Summary

When a WayflowFlow has an InputMessageNode as its first gate (the bug described in #151), any data flow edges (DFEs) originating from StartNode are never populated. Downstream nodes — such as LlmNode or ApiCallNode — receive empty strings or None for all StartNode-sourced variables, even when the triggering message/send call carries those values in the task input.

Root cause

The pre-execute bug (#151) means StartNode is never processed against the trigger payload: the pre-execute runs the flow before the incoming message (which carries the StartNode inputs) is appended, so StartNode.output_data is empty when execute_async() first runs. Any DFE edges wired from StartNode → LlmNode.system_message or StartNode → ApiCallNode.body therefore receive empty values for the entire lifetime of the task — including after the user later resumes the task via subsequent message/send calls.

Steps to reproduce

  1. Create a WayflowFlow where:
    • StartNode has one or more input_descriptors (e.g. run_id: str).
    • The first node after StartNode is an InputMessageNode.
    • A later LlmNode or ApiCallNode has a DFE wired from StartNode.run_id.
  2. Send an initial message/send with {"input": {"run_id": "abc123"}}.
  3. Resume the task after the InputMessageNode gate.
  4. Observe: the LlmNode/ApiCallNode receives "" or None for run_id instead of "abc123".

Expected behaviour

Values supplied in the initial message/send input should be bound to StartNode.output_data and propagated along DFE edges regardless of whether an InputMessageNode appears as the first gate.

Actual behaviour

StartNode.output_data is empty because the node processes its inputs during the pre-execute phase — before the trigger message is appended to the conversation. All DFE-sourced variables from StartNode arrive at downstream nodes as empty strings for the full duration of the task.

Impact

Any integration that relies on passing per-task metadata (e.g. correlation IDs, tenant IDs, run identifiers) through StartNode DFE edges into LlmNode or ApiCallNode is broken when an InputMessageNode is the first gate. The workaround is to inject the metadata through some other mechanism (e.g. system-message templating outside the flow, or a custom ContextVar propagation layer), which defeats the purpose of DFE wiring for these values.

Context

Suggested fix

Same as #151: guard the pre-execute so it does not run (or runs differently) when InputMessageNode is the first gate. When the pre-execute is skipped or corrected, StartNode will process its inputs from the trigger payload before any DFE evaluation occurs, and downstream nodes will receive the correct values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions