Skip to content

Run failed: Variable '' does not exist #24462

Closed as not planned
Closed as not planned

Description

@alin132

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.7.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I run the second Agent node in Chatflow, an error occurs. I've tried running several models, but the error persists.

✔️ Expected Behavior

Run successfully

❌ Actual Behavior

Run failed: Variable '' does not exist

Image Image Image

Activity

  1. added
    🐞 bug
    on Aug 25, 2025
  2. dosubot commented on Aug 25, 2025

    @dosubot

    The error "Variable '' does not exist" happens when an Agent node in your workflow tries to reference a variable, but the variable name is empty or missing in the node's configuration. This is enforced in the code: if a parameter is set to type "variable" but the variable name is blank or not found in the workflow's variable pool, the node run fails with this error.

    This usually means that in your Agent node's configuration (specifically in the agent_parameters section), a required variable name is not set or is set to an empty string. This can happen if a previous node didn't output the expected variable, or if the variable mapping in the workflow builder is incomplete.

    To fix this, check the agent_parameters for your second Agent node and make sure every parameter that expects a variable has a valid, non-empty variable name, and that the variable is actually produced by a previous node in the workflow. Pay special attention to any custom or toolbox-related parameters, as these often require explicit variable mapping. If you see any parameter with an empty variable name, update it to reference the correct variable from earlier in your workflow.

    For more technical details, see how the error is raised in the code here.

    To reply, just mention @dosu.


    How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

  3. DavideDelbianco commented on Aug 26, 2025

    @DavideDelbianco
    Contributor

    Maybe you added something in the "context" input and then removed it ?
    It would be a known bug that can be fixed only by recreating the node

  4. dosubot commented on Sep 26, 2025

    @dosubot

    Hi, @alin132. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

    Issue Summary:

    • You encountered a "Run failed: Variable '' does not exist" error when running the second Agent node in Chatflow on Dify v1.7.2 self-hosted via Docker.
    • The error occurs due to an Agent node referencing a variable with an empty or missing name, often from incomplete variable mapping or missing outputs.
    • It was identified that adding then removing input in the "context" field causes this bug.
    • The current workaround is to recreate the Agent node, which resolves the error.
    • I have noted the potential to improve error messaging or address the need for node recreation.

    Next Steps:

    • Please confirm if this issue is still relevant with the latest version of Dify; if so, you can keep the discussion open by commenting here.
    • Otherwise, this issue will be automatically closed in 15 days.

    Thank you for your understanding and contribution!

  5. he-ding commented on Jan 15, 2026

    @he-ding

    Maybe you added something in the "context" input and then removed it ? It would be a known bug that can be fixed only by recreating the node

    by the way, the problem is still exist in version 1.11.3

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

    🐞 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions