Error reported in the modify Agent plug-in delivery context #570

Closed
opened 2026-02-16 10:19:46 -05:00 by yindo · 3 comments
Owner

Originally created by @hyqf98 on GitHub (Aug 19, 2025).

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

Failed to transform agent message: req_id: 0f1fe59bdd PluginInvokeError: {"args":{},"error_type":"ValueError","message":"Invalid parameters: 3 validation errors for ReActParams\ncontext.0.content\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing\ncontext.0.title\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing\ncontext.0.metadata\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing"}

Image

✔️ Expected Behavior

normal execution

Actual Behavior

Failed to transform agent message: req_id: 0f1fe59bdd PluginInvokeError: {"args":{},"error_type":"ValueError","message":"Invalid parameters: 3 validation errors for ReActParams\ncontext.0.content\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing\ncontext.0.title\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing\ncontext.0.metadata\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing"}

Image
Originally created by @hyqf98 on GitHub (Aug 19, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] 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 Failed to transform agent message: req_id: 0f1fe59bdd PluginInvokeError: {"args":{},"error_type":"ValueError","message":"Invalid parameters: 3 validation errors for ReActParams\ncontext.0.content\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing\ncontext.0.title\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing\ncontext.0.metadata\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing"} <img width="1131" height="742" alt="Image" src="https://github.com/user-attachments/assets/8168d2b7-b6e5-4ed7-909d-3d013eb745d1" /> ### ✔️ Expected Behavior normal execution ### ❌ Actual Behavior Failed to transform agent message: req_id: 0f1fe59bdd PluginInvokeError: {"args":{},"error_type":"ValueError","message":"Invalid parameters: 3 validation errors for ReActParams\ncontext.0.content\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing\ncontext.0.title\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing\ncontext.0.metadata\n Field required [type=missing, input_value={'result': [{'TABLE_COMME...atermark_camera_data'}]}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.11/v/missing"} <img width="1131" height="742" alt="Image" src="https://github.com/user-attachments/assets/93e05840-db77-42f3-912d-ace211c88128" />
yindo added the bug label 2026-02-16 10:19:46 -05:00
yindo closed this issue 2026-02-16 10:19:46 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 19, 2025):

The error happens because the agent plugin is returning a context object that doesn't match the required schema: each context entry must include content, title, and metadata fields. Instead, your plugin/tool is returning a dictionary with only a result key, which fails Pydantic validation for ReActParams and triggers the error.

To fix this, ensure that every context item passed to the agent plugin has the required structure. For example:

{
  "content": "Extracted table names: TABLE_COMME, ... , watermark_camera_data",
  "title": "SQL Table Extraction",
  "metadata": {"source": "SQL Execute"}
}

If your plugin or tool outputs only a result, add a transformation step before invoking the agent to wrap the result in an object with these fields. This can be done in your plugin code or by preprocessing the output in your workflow.

Also, make sure your plugin/tool is up to date, as some similar issues have been resolved by updating to the latest version or fixing the response structure in the plugin code [source].

If you are customizing the agent or plugin code, look for the transformation logic that builds the context and ensure it always outputs the required fields as described above. This should resolve the validation error and allow normal execution.

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Aug 19, 2025): <!-- Answer --> The error happens because the agent plugin is returning a context object that doesn't match the required schema: each context entry must include `content`, `title`, and `metadata` fields. Instead, your plugin/tool is returning a dictionary with only a `result` key, which fails Pydantic validation for `ReActParams` and triggers the error. To fix this, ensure that every context item passed to the agent plugin has the required structure. For example: ```json { "content": "Extracted table names: TABLE_COMME, ... , watermark_camera_data", "title": "SQL Table Extraction", "metadata": {"source": "SQL Execute"} } ``` If your plugin or tool outputs only a `result`, add a transformation step before invoking the agent to wrap the result in an object with these fields. This can be done in your plugin code or by preprocessing the output in your workflow. Also, make sure your plugin/tool is up to date, as some similar issues have been resolved by updating to the latest version or fixing the response structure in the plugin code [[source]](https://github.com/langgenius/dify-official-plugins/issues/1116#issuecomment-2982775119). If you are customizing the agent or plugin code, look for the transformation logic that builds the context and ensure it always outputs the required fields as described above. This should resolve the validation error and allow normal execution. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/7b65b02d-5d3c-446e-9952-d8a4077f91ee?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7b65b02d-5d3c-446e-9952-d8a4077f91ee?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7b65b02d-5d3c-446e-9952-d8a4077f91ee?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7b65b02d-5d3c-446e-9952-d8a4077f91ee?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7b65b02d-5d3c-446e-9952-d8a4077f91ee?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7b65b02d-5d3c-446e-9952-d8a4077f91ee?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7b65b02d-5d3c-446e-9952-d8a4077f91ee?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/24172)
Author
Owner

@hyqf98 commented on GitHub (Aug 19, 2025):

My plugin is the latest version 0.0.23,There was a problem of conversion failure,And when I added the output of a node and then deleted the node, the agent plug-in failed to execute

Image
@hyqf98 commented on GitHub (Aug 19, 2025): My plugin is the latest version 0.0.23,There was a problem of conversion failure,And when I added the output of a node and then deleted the node, the agent plug-in failed to execute <img width="1592" height="792" alt="Image" src="https://github.com/user-attachments/assets/0237b33e-2042-473c-9557-1e0af0424fc0" />
Author
Owner

@dosubot[bot] commented on GitHub (Aug 19, 2025):

This error is usually caused by the agent plugin receiving an unexpected or incomplete context after node output changes. When you delete a node output, any variables or data that downstream nodes (like your agent plugin) depend on may become missing or malformed, leading to validation errors like missing content, title, or metadata fields in the context [source].

To fix this, make sure every context item passed to the agent plugin matches the required schema—each should be a dictionary with content, title, and metadata. If your plugin or tool only outputs a result, add a transformation step to wrap it in the expected structure before invoking the agent. Also, check your workflow configuration: after deleting a node output, verify that all variable assignments and downstream references are updated and valid.

If you’re using custom plugins or MCP integrations, ensure their output format matches Dify’s expectations. Version mismatches between Dify core and plugin-daemon can also cause similar issues, so confirm both are aligned [source].

Troubleshooting steps: review your agent node configuration and variable assignments, check logs for errors during the agent exception phase, and simplify your toolset to isolate the problem. Updating to the latest Dify version and plugin may help if regressions are involved [source].

If you need more targeted help, sharing relevant log snippets and clarifying your agent node’s variable assignments and tool outputs will make it easier to diagnose.

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Aug 19, 2025): <!-- Answer --> This error is usually caused by the agent plugin receiving an unexpected or incomplete context after node output changes. When you delete a node output, any variables or data that downstream nodes (like your agent plugin) depend on may become missing or malformed, leading to validation errors like missing `content`, `title`, or `metadata` fields in the context [[source]](https://github.com/langgenius/dify-official-plugins/issues/1244). To fix this, make sure every context item passed to the agent plugin matches the required schema—each should be a dictionary with `content`, `title`, and `metadata`. If your plugin or tool only outputs a `result`, add a transformation step to wrap it in the expected structure before invoking the agent. Also, check your workflow configuration: after deleting a node output, verify that all variable assignments and downstream references are updated and valid. If you’re using custom plugins or MCP integrations, ensure their output format matches Dify’s expectations. Version mismatches between Dify core and plugin-daemon can also cause similar issues, so confirm both are aligned [[source]](https://github.com/langgenius/dify-official-plugins/issues/1244). Troubleshooting steps: review your agent node configuration and variable assignments, check logs for errors during the agent exception phase, and simplify your toolset to isolate the problem. Updating to the latest Dify version and plugin may help if regressions are involved [[source]](https://github.com/langgenius/dify/issues/20766). If you need more targeted help, sharing relevant log snippets and clarifying your agent node’s variable assignments and tool outputs will make it easier to diagnose. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b23ff32d-e060-4bb2-9226-98bc1b0b8972?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b23ff32d-e060-4bb2-9226-98bc1b0b8972?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b23ff32d-e060-4bb2-9226-98bc1b0b8972?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b23ff32d-e060-4bb2-9226-98bc1b0b8972?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b23ff32d-e060-4bb2-9226-98bc1b0b8972?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b23ff32d-e060-4bb2-9226-98bc1b0b8972?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b23ff32d-e060-4bb2-9226-98bc1b0b8972?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/24172)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#570