Back Home

GitHub Repo

Dify Community Reports Missing Loop Variable Field; Published Workflows May Also Fail to Run

A November 17 Dify issue report says saved data may be missing a required field after changing a loop variable’s type or input mode, causing workflow execution to fail. The reporter says published versions may also be affected; no official fix has been confirmed.

The original uploader was Ggia at Greek Wikipedia. · CC BY-SA 2.5 · Image source
zh-Hant

On November 17, a Dify community member filed issue #46550, reporting that the Loop node in self-hosted Docker environments may produce a configuration that “can be saved and published, but cannot be run.” The report lists versions 1.19.0, 1.18.0, and 1.17.x. The issue is triggered by adding a loop variable and then changing its type or its Constant/Variable input mode; the actual scope of impact has yet to be confirmed upstream. Issue report

The reporter found that the frontend’s default-value function returns undefined in several cases. When serialized as JSON, the variable’s value field is omitted. Draft saves pass a lighter structural check, but execution runs into backend validation for required fields and throws an error saying loop_variables.N.value is missing. A contributor said the same day that they would fix the default value and add regression tests, but that comment does not mean the fix has been merged. Issue and remediation discussion

This issue concerns state management in AI workflows. According to the official documentation, each Loop iteration carries forward the previous iteration’s result, variables can persist across iterations, and they remain accessible after the loop ends. The documentation’s example uses a counter and text state to control an LLM as it revises content iteratively. For applications that repeatedly generate, score, and revise content, the integrity of the loop configuration directly affects whether the entire workflow can start. Official Loop documentation

The reporter also noted that if a configuration with a missing field has already become part of a published snapshot, fixing the frontend alone may not repair existing versions. The engineering questions to watch are whether the fix covers both new configurations and historical data, and whether node-structure validation will be added before publication. Teams can first check in a test environment that loop variables retain valid values, then verify API calls after republishing. Current evidence comes mainly from a single reporter, so it does not establish that every workflow containing a Loop will fail. Published snapshot impact discussion

Sources

  1. Dify Issue #46550:切換迴圈變數設定後缺少必要 value 欄位
  2. Loop — Dify Docs