Repository navigation
Description
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.18.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- Create a new workflow/chatflow app natively in the 1.18.0 console (no DSL import involved).
- Add an Agent node (e.g.
langgenius/agent→function_calling), configure a model; leave optional params (files / allowed_tools) untouched. - Save and publish.
Result
The stored graph (draft and published) contains entries generated by the canvas for the unset optional strategy params:
"files": {"type": "variable", "value": null}
"allowed_tools": {"type": "variable", "value": null}Every chat request that reaches the Agent node then fails deterministically:
Node 1800000000009 failed to run
Traceback (most recent call last):
File ".../graphon/nodes/base/node.py", line 664, in run
yield from self._run_events()
File ".../api/core/workflow/nodes/agent/agent_node.py", line 123, in _run
parameters = self._runtime_support.build_parameters(...)
File ".../api/core/workflow/nodes/agent/runtime_support.py", line 58, in build_parameters
variable = variable_pool.get(agent_input.value)
File ".../graphon/runtime/variable_pool.py", line 211, in get
if len(selector) < SELECTORS_LENGTH:
TypeError: object of type 'NoneType' has no len()
workflow_node_executions.status = failed with error = "object of type 'NoneType' has no len()", zero output — in chatflow apps the user just sees the round fail.
We also reproduced it the other way around: an app whose Agent node was imported via DSL (clean, no files/allowed_tools entries) published a clean version first; the poisoning appeared after the node was edited via the canvas. So the canvas save path is what writes these entries.
✔️ Expected Behavior
Unset optional strategy params must not break the node at runtime. Either:
- the canvas should not write
{type: variable, value: null}entries for untouched params, or AgentRuntimeSupport.build_parametersshould treatagent_input.value is None(typevariable) as "not provided" and passNoneto the strategy (thelanggenius/agentplugin already handlesNonecorrectly forfilesandallowed_tools:fc_params.files or [], andfilter_allowed_tools(None) → no restriction).
Suggested fix
case "variable":
if agent_input.value is None: # unconfigured optional param
result[parameter_name] = None
continue
variable = variable_pool.get(agent_input.value)Verified locally that with this guard the Agent node works end-to-end (intent routing → agent strategy → MCP tool calls → answer) on Dify 1.18.0 + plugin langgenius/agent:0.0.51, model doubao-seed-2-1-lite-260915 via the volcengine plugin.
Notes
- The failure is unrelated to DSL provenance: reproduced on a natively created 1.18.0 app.
- Related context: graphon
variable_pool.getcrashes on aNoneselector; a defensivelen()guard there would also mask misconfigured selectors, but the agent node should not emit them in the first place.
❌ Actual Behavior
No response
Activity
dosubot commentedon Nov 9, 2026
Hi @devyangss! I'm Dosu and I'm helping the Dify team.
There are already upstream changes tracking both sides of this failure. As of November 9, 2026:
anyinputs withnull,'', or[]selectors are omitted, including untouched null defaults when another field changes. This prevents writing those entries, but does not repair existing saved graphs. The corresponding filtering is present in the current checkout. [1]The single-node path matters too:
AgentNode._extract_variable_selector_to_variable_mapping()currently emits variable selectors without checking for null, separately frombuild_parameters(). That gives maintainers an additional execution path to cover alongside your successful end-to-end test. [2]To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.